34 void set_layout(
widget_layout const& context)
noexcept override;
35 void draw(draw_context
const& context)
noexcept override;
36 bool handle_event(
gui_event const& event)
noexcept override;
37 [[nodiscard]] hitbox hitbox_test(point3 position)
const noexcept override;
40 static constexpr float GLYPH_SIZE = 5.0f;
41 static constexpr float RADIUS = 5.5f;
42 static constexpr float DIAMETER = RADIUS * 2.0f;
43 static constexpr float MARGIN = 10.0f;
44 static constexpr float SPACING = 8.0f;
46 aarectangle closeRectangle;
47 aarectangle minimizeRectangle;
48 aarectangle maximizeRectangle;
50 glyph_ids closeWindowGlyph;
51 glyph_ids minimizeWindowGlyph;
52 glyph_ids maximizeWindowGlyph;
53 glyph_ids restoreWindowGlyph;
55 aarectangle closeWindowGlyphRectangle;
56 aarectangle minimizeWindowGlyphRectangle;
57 aarectangle maximizeWindowGlyphRectangle;
58 aarectangle restoreWindowGlyphRectangle;
60 bool hoverClose =
false;
61 bool hoverMinimize =
false;
62 bool hoverMaximize =
false;
64 bool pressedClose =
false;
65 bool pressedMinimize =
false;
66 bool pressedMaximize =
false;
68 void drawMacOS(draw_context
const& context)
noexcept;
69 void drawWindows(draw_context
const& context)
noexcept;