#include <nxt/tui.hpp>
template <Layout FalseLayout, Layout TrueLayout>
nxt::tui::Either struct

Conditional layout that delegates to one of two child layouts.

Public functions

auto height_hint() const →  HeightHint constexpr
Height hint of the selected child.
void render(RasterView& raster, Size size) const
Render the selected child.
auto width_hint() const →  WidthHint constexpr
Width hint of the selected child.

Public variables

bool choose_true
Render true_layout when set, otherwise false_layout.
FalseLayout false_layout
Layout used when choose_true is false.
TrueLayout true_layout
Layout used when choose_true is true.