class Impl : public ComponentBase {
private:
bool checked[3] = {false, false, false};
float slider = 50;
public:
Impl() {
Slider(
"Slider", &slider, 0.f, 100.f),
}));
}
};
return Make<Impl>();
}
int main() {
int window_1_left = 20;
int window_1_top = 10;
int window_1_width = 40;
int window_1_height = 20;
.inner = DummyWindowContent(),
.title = "First window",
.left = &window_1_left,
.top = &window_1_top,
.width = &window_1_width,
.height = &window_1_height,
});
.inner = DummyWindowContent(),
.title = "My window",
.left = 40,
.top = 20,
});
.inner = DummyWindowContent(),
.title = "My window",
.left = 60,
.top = 30,
});
.inner = DummyWindowContent(),
});
window_1,
window_2,
window_3,
window_4,
window_5,
});
return text(
"window_1: " +
});
display_win_1,
window_container,
});
screen.Loop(layout);
return EXIT_SUCCESS;
}
static ScreenInteractive Fullscreen()
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...
Component Stacked(Components children)
A list of components to be stacked on top of each other. Events are propagated to the first component...
std::shared_ptr< ComponentBase > Component
Component Renderer(Component child, std::function< Element()>)
Return a new Component, similar to |child|, but using |render| as the Component::Render() event.
Component Window(WindowOptions option)
A draggeable / resizeable window. To use multiple of them, they must be stacked using Container::Stac...
std::string to_string(const std::wstring &s)
Convert a UTF8 std::string into a std::wstring.
Element text(std::wstring text)
Display a piece of unicode text.
Component Slider(SliderOption< T > options)
A slider in any direction.
Component Checkbox(CheckboxOption options)
Draw checkable element.