13namespace hi {
inline namespace v1 {
62 template<
typename Widget,
typename... Args>
65 hi_axiom(is_gui_thread());
66 hi_axiom(not _content);
68 auto tmp = std::make_unique<Widget>(
window,
this, std::forward<Args>(args)...);
75 [[nodiscard]] generator<widget *> children() const noexcept
override
77 co_yield _content.get();
82 void draw(draw_context const& context) noexcept override;
83 [[nodiscard]] color background_color() const noexcept override;
84 [[nodiscard]] color foreground_color() const noexcept override;
86 [[nodiscard]] hitbox hitbox_test(point3 position) const noexcept override;
91 void draw_background(draw_context const& context) noexcept;
DOXYGEN BUG.
Definition algorithm.hpp:15
The HikoGUI namespace.
Definition ascii.hpp:19
A GUI widget which may exist anywhere on a window overlaid above any other widget.
Definition overlay_widget.hpp:38
overlay_widget(gui_window &window, widget *parent) noexcept
Constructs an empty overlay widget.
Widget & make_widget(Args &&...args) noexcept
Add a content widget directly to this overlay widget.
Definition overlay_widget.hpp:63
An interactive graphical object as part of the user-interface.
Definition widget.hpp:44
widget_layout const & layout() const noexcept
Get the current layout for this widget.
Definition widget.hpp:198
widget *const parent
Pointer to the parent widget.
Definition widget.hpp:53
widget(gui_window &window, widget *parent) noexcept
void scroll_to_show() noexcept
Scroll to show the important part of the widget.
Definition widget.hpp:313
gui_window & window
Convenient reference to the Window.
Definition widget.hpp:48
The constraints of a widget.
Definition widget_constraints.hpp:26
The layout of a widget.
Definition widget_layout.hpp:37