9#include "../GUI/gui_system.hpp"
10#include "../GFX/gfx_surface_delegate_vulkan.hpp"
12#include <vulkan/vulkan.hpp>
14namespace hi {
inline namespace v1 {
25 window.surface->add_delegate(
this);
30 window.surface->remove_delegate(
this);
36 return _constraints = {{100, 50}, {200, 100}, {300, 100},
theme().margin};
41 if (compare_store(_layout,
layout)) {}
44 void draw(hi::draw_context
const& context)
noexcept override
47 context.make_hole(_layout, _layout.rectangle());
49 draw_vulkan(aarectangle{_layout.to_window * _layout.rectangle()}, context.scissor_rectangle);
@ invisible
The widget is invisible.
DOXYGEN BUG.
Definition algorithm.hpp:15
The HikoGUI namespace.
Definition ascii.hpp:19
A widget that draws directly into the swap-chain.
Definition vulkan_widget.hpp:19
widget_constraints const & set_constraints() noexcept override
Update the constraints of the widget.
Definition vulkan_widget.hpp:33
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
hi::theme const & theme() const noexcept
Get the theme.
observer< widget_mode > mode
The widget mode.
Definition widget.hpp:62
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