13namespace hi {
inline namespace v1 {
61 template<
typename Widget,
typename... Args>
67 auto tmp = std::make_unique<Widget>(
this, std::forward<Args>(args)...);
74 [[nodiscard]] generator<widget_intf &> children(
bool include_invisible)
noexcept override
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(point2 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:199
#define hi_axiom(expression,...)
Specify an axiom; an expression that is true.
Definition assert.hpp:253
DOXYGEN BUG.
Definition algorithm.hpp:13
geometry/margins.hpp
Definition cache.hpp:11
This is a RGBA floating point color.
Definition color.hpp:42
Class which represents an axis-aligned rectangle.
Definition aarectangle.hpp:26
A rectangle / parallelogram in 3D space.
Definition rectangle.hpp:20
Draw context for drawing using the HikoGUI shaders.
Definition draw_context.hpp:209
widget_intf * parent
Pointer to the parent widget.
Definition widget_intf.hpp:27
The layout of a widget.
Definition widget_layout.hpp:35
2D constraints.
Definition box_constraints.hpp:22
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:36
void scroll_to_show() noexcept
Scroll to show the important part of the widget.
Definition widget_intf.hpp:195
widget(widget *parent) noexcept