9#include "../weak_or_unique_ptr.hpp"
14class system_menu_widget;
25 template<
typename Title>
27 super(
window,
nullptr), title(std::forward<Title>(title)), _content_delegate(
std::move(delegate))
53 void init() noexcept override;
54 [[nodiscard]]
bool constrain(utc_nanoseconds display_time_point,
bool need_reconstrain) noexcept override;
55 [[nodiscard]]
void layout(utc_nanoseconds display_time_point,
bool need_layout) noexcept;
56 [[nodiscard]]
hitbox hitbox_test(
point2 position) const noexcept override;
59 decltype(title)::callback_ptr_type _title_callback;
64#if TT_OPERATING_SYSTEM == TT_OS_WINDOWS
68 bool _left_resize_border_has_priority =
true;
69 bool _right_resize_border_has_priority =
true;
70 bool _bottom_resize_border_has_priority =
true;
71 bool _top_resize_border_has_priority =
true;
This is a RGBA floating point color.
Definition color.hpp:36
Definition gui_window.hpp:39
A value which can be observed for modifications.
Definition observable.hpp:464
Definition grid_delegate.hpp:13
A GUI widget that lays out child-widgets in a grid with variable sized cells.
Definition grid_widget.hpp:37
Definition system_menu_widget.hpp:16
A toolbar widget is located at the top of a window and lays out its children horizontally.
Definition toolbar_widget.hpp:28
An interactive graphical object as part of the user-interface.
Definition widget.hpp:37
gui_window & window
Convenient reference to the Window.
Definition widget.hpp:41
widget(gui_window &window, widget *parent) noexcept
Definition window_widget.hpp:18
color background_color() noexcept
The background color of the window.
grid_widget & content() noexcept
Get a reference to the window's content widget.
void set_resize_border_priority(bool left, bool right, bool bottom, bool top) noexcept
Defining on which edges the resize handle has priority over widget at a higher layer.
toolbar_widget & toolbar() noexcept
Get a reference to window's toolbar widget.