13namespace hi {
inline namespace v1 {
61 template<
typename Widget,
typename... Args>
67 auto tmp = std::make_shared<Widget>(
this, std::forward<Args>(args)...);
74 [[nodiscard]] generator<widget *> children() const noexcept
override
76 co_yield _content.get();
80 void set_layout(
widget_layout const& context) noexcept override;
81 void draw(draw_context const& context) noexcept override;
82 [[nodiscard]] color background_color() const noexcept override;
83 [[nodiscard]] color foreground_color() const noexcept override;
85 [[nodiscard]] hitbox hitbox_test(point2i position) const noexcept override;
92 void draw_background(draw_context const& context) noexcept;
#define hi_assert(expression,...)
Assert if expression is true.
Definition assert.hpp:87
#define hi_axiom(expression,...)
Specify an axiom; an expression that is true.
Definition assert.hpp:133
@ rectangle
The gui_event has rectangle data.
DOXYGEN BUG.
Definition algorithm.hpp:15
geometry/margins.hpp
Definition assert.hpp:18
2D constraints.
Definition box_constraints.hpp:25
Definition box_shape.hpp:15
A GUI widget which may exist anywhere on a window overlaid above any other widget.
Definition overlay_widget.hpp:38
overlay_widget(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:62
An interactive graphical object as part of the user-interface.
Definition widget.hpp:46
widget(widget *parent) noexcept
widget * parent
Pointer to the parent widget.
Definition widget.hpp:51
void scroll_to_show() noexcept
Scroll to show the important part of the widget.
Definition widget.hpp:288
The layout of a widget.
Definition widget_layout.hpp:41