HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
system_menu_widget.hpp
1// Copyright Take Vos 2020.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "widget.hpp"
8#include "../GUI/pipeline_image_image.hpp"
9#include "../graphic_path.hpp"
10#include "../icon.hpp"
11#include "../stencils/image_stencil.hpp"
12#include <memory>
13#include <string>
14#include <array>
15
16
17namespace tt {
18
19class system_menu_widget final : public widget {
20public:
21 using super = widget;
22
25
26 [[nodiscard]] bool
27 update_constraints(hires_utc_clock::time_point display_time_point, bool need_reconstrain) noexcept override;
28 [[nodiscard]] void update_layout(hires_utc_clock::time_point display_time_point, bool need_layout) noexcept override;
29
30 void draw(draw_context context, hires_utc_clock::time_point display_time_point) noexcept override;
31
32 [[nodiscard]] hit_box hitbox_test(f32x4 window_position) const noexcept override;
33
34private:
36
37 aarect system_menu_rectangle;
38};
39
40}
Draw context for drawing using the TTauri shaders.
Definition draw_context.hpp:33
Definition gui_window.hpp:39
Definition hit_box.hpp:15
An image, in different formats.
Definition icon.hpp:19
Definition system_menu_widget.hpp:19
void update_layout(hires_utc_clock::time_point display_time_point, bool need_layout) noexcept override
Update the internal layout of the widget.
hit_box hitbox_test(f32x4 window_position) const noexcept override
Find the widget that is under the mouse cursor.
void draw(draw_context context, hires_utc_clock::time_point display_time_point) noexcept override
Draw the widget.
bool update_constraints(hires_utc_clock::time_point display_time_point, bool need_reconstrain) noexcept override
Update the constraints of the widget.
Definition widget.hpp:96
widget(gui_window &window, std::shared_ptr< abstract_container_widget > parent) noexcept
gui_window & window
Convenient reference to the Window.
Definition widget.hpp:100
abstract_container_widget const & parent() const noexcept
Get a reference to the parent.