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 const &> children(
bool include_invisible)
const 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(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:184
#define hi_axiom(expression,...)
Specify an axiom; an expression that is true.
Definition assert.hpp:238
@ rectangle
The gui_event has rectangle data.
DOXYGEN BUG.
Definition algorithm.hpp:13
geometry/margins.hpp
Definition cache.hpp:11
This is a RGBA floating point color.
Definition color.hpp:42
Draw context for drawing using the HikoGUI shaders.
Definition draw_context.hpp:211
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: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:301
The layout of a widget.
Definition widget_layout.hpp:38