6#include "TTauri/Widgets/Widget.hpp"
7#include "TTauri/Foundation/Path.hpp"
20 static constexpr float GLYPH_SIZE = 5.0f;
21 static constexpr float RADIUS = 5.5f;
22 static constexpr float DIAMETER = RADIUS * 2.0f;
23 static constexpr float MARGIN = 10.0f;
24 static constexpr float SPACING = 8.0f;
35 aarect closeWindowGlyphRectangle;
36 aarect minimizeWindowGlyphRectangle;
37 aarect maximizeWindowGlyphRectangle;
38 aarect restoreWindowGlyphRectangle;
40 bool hoverClose =
false;
41 bool hoverMinimize =
false;
42 bool hoverMaximize =
false;
44 bool pressedClose =
false;
45 bool pressedMinimize =
false;
46 bool pressedMaximize =
false;
63 static vec calculateExtent(
Window &window)
noexcept;
Class which represents an axis-aligned rectangle.
Definition aarect.hpp:13
A 4D vector.
Definition vec.hpp:37
Draw context for drawing using the TTauri shaders.
Definition DrawContext.hpp:30
Definition MouseEvent.hpp:12
Definition Window_vulkan_win32.hpp:15
Definition FontGlyphIDs.hpp:77
Definition WindowTrafficLightsWidget.hpp:18
void handleMouseEvent(MouseEvent const &event) noexcept override
void layout(hires_utc_clock::time_point displayTimePoint) noexcept override
Layout the widget.
HitBox hitBoxTest(vec position) const noexcept override
Find the widget that is under the mouse cursor.
void draw(DrawContext const &drawContext, hires_utc_clock::time_point displayTimePoint) noexcept override
Draw widget.