neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
widget.hpp
Go to the documentation of this file.
1// widget.hpp
2/*
3 neogfx C++ App/Game Engine
4 Copyright (c) 2015, 2020 Leigh Johnston. All Rights Reserved.
5
6 This program is free software: you can redistribute it and / or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <neogfx/neogfx.hpp>
30
31namespace neogfx
32{
33 template <typename Interface = i_widget>
34 class widget : public layout_item<object<Interface>>
35 {
38 public:
39 define_declared_event(DeviceMetricsUpdated, device_metrics_updated, const i_widget&)
41 define_declared_event(ChildRemoved, child_removed, i_widget&)
42 define_declared_event(VisibilityChanged, visibility_changed)
43 define_declared_event(PositionChanged, position_changed)
44 define_declared_event(ParentPositionChanged, parent_position_changed)
45 define_declared_event(SizeChanged, size_changed)
46 define_declared_event(LayoutCompleted, layout_completed)
55 public:
56 using typename base_type::no_parent;
57 using typename base_type::no_root;
58 using typename base_type::no_surface;
59 using typename base_type::no_children;
60 using typename base_type::not_child;
61 using typename base_type::no_update_rect;
62 using typename base_type::widget_not_entered;
63 using typename base_type::widget_cannot_capture;
64 using typename base_type::widget_not_focused;
65 using typename base_type::widget_cannot_defer_layout;
66 using typename base_type::layout_already_set;
67 using typename base_type::no_layout;
68 public:
71 private:
73 public:
74 widget();
75 widget(const widget&) = delete;
76 widget(i_widget& aParent);
77 widget(i_layout& aLayout);
78 ~widget();
79 // i_object
80 public:
81 void property_changed(i_property& aProperty) override;
82 // i_widget
83 public:
84 bool is_singular() const final;
85 void set_singular(bool aSingular) final;
86 bool is_root() const final;
87 bool has_root() const final;
88 const i_window& root() const final;
89 i_window& root() final;
90 void set_root(i_window& aRoot) final;
91 bool is_surface() const override;
92 bool has_surface() const override;
93 const i_surface& surface() const override;
94 i_surface& surface() override;
95 const i_surface& real_surface() const override;
96 i_surface& real_surface() override;
97 bool has_parent() const final;
98 const i_widget& parent() const final;
99 i_widget& parent() final;
100 void set_parent(i_widget& aParent) override;
101 void parent_changed() final;
102 bool adding_child() const override;
103 i_widget& add(i_widget& aChild) override;
104 i_widget& add(const i_ref_ptr<i_widget>& aChild) override;
105 void remove(i_widget& aChild, bool aSingular, i_ref_ptr<i_widget>& aChildRef) override;
106 void remove_all() override;
107 bool has_children() const override;
108 const widget_list& children() const override;
109 widget_list::const_iterator last() const override;
110 widget_list::iterator last() override;
111 widget_list::const_iterator find(const i_widget& aChild, bool aThrowIfNotFound = true) const override;
112 widget_list::iterator find(const i_widget& aChild, bool aThrowIfNotFound = true) override;
113 public:
114 void bring_child_to_front(const i_widget& aChild) override;
115 void send_child_to_back(const i_widget& aChild) override;
116 layer_t layer() const override;
117 void set_layer(layer_t aLayer) override;
118 public:
119 const i_widget& before() const override;
120 i_widget& before() override;
121 const i_widget& after() const override;
122 i_widget& after() override;
123 void link_before(i_widget* aPreviousWidget) override;
124 void link_after(i_widget* aNextWidget) override;
125 void unlink() override;
126 bool has_layout() const override;
127 void set_layout(i_layout& aLayout, bool aMoveExistingItems = true) override;
128 void set_layout(const i_ref_ptr<i_layout>& aLayout, bool aMoveExistingItems = true) override;
129 const i_layout& layout() const override;
130 i_layout& layout() override;
131 bool can_defer_layout() const override;
132 bool is_managing_layout() const override;
134 void layout_items(bool aDefer = false) override;
135 void layout_items_started() override;
136 bool layout_items_in_progress() const override;
137 void layout_items_completed() override;
138 // i_units_context
139 public:
140 bool device_metrics_available() const override;
141 const i_device_metrics& device_metrics() const override;
142 // i_geometry
143 public:
144 neogfx::size_policy size_policy() const override;
145 size minimum_size(optional_size const& aAvailableSpace = {}) const override;
146 size maximum_size(optional_size const& aAvailableSpace = {}) const override;
147 neogfx::padding padding() const override;
148 public:
149 rect element_rect(skin_element aElement) const override;
150 // i_widget
151 public:
152 bool has_logical_coordinate_system() const override;
154 void set_logical_coordinate_system(const optional_logical_coordinate_system& aLogicalCoordinateSystem) override;
155 rect non_client_rect() const override;
156 rect client_rect(bool aExtendIntoPadding = true) const override;
157 void move(const point& aPosition) override;
158 void moved() override;
159 void parent_moved() override;
160 bool resizing() const override;
161 void resize(const size& aSize) override;
162 void resized() override;
163 const i_widget& get_widget_at(const point& aPosition) const override;
164 i_widget& get_widget_at(const point& aPosition) override;
165 neogfx::widget_type widget_type() const override;
166 bool part_active(widget_part aPart) const override;
167 widget_part part(const point& aPosition) const override;
168 widget_part hit_test(const point& aPosition) const override;
169 // i_layout_item
170 public:
171 bool has_parent_layout() const final;
172 const i_layout& parent_layout() const final;
173 i_layout& parent_layout() final;
174 void set_parent_layout(i_layout* aParentLayout) final;
175 bool has_parent_widget() const final;
176 const i_widget& parent_widget() const final;
177 i_widget& parent_widget() final;
178 void set_parent_widget(i_widget* aParentWidget) final;
179 public:
180 void layout_as(const point& aPosition, const size& aSize) override;
181 // i_widget
182 public:
183 neogfx::view const& view() const override;
184 neogfx::view& view() override;
185 layer_t render_layer() const override;
186 void set_render_layer(const std::optional<layer_t>& aLayer) override;
187 bool can_update() const override;
188 bool update(bool aIncludeNonClient = false) override;
189 bool update(const rect& aUpdateRect) override;
190 bool requires_update() const override;
191 rect update_rect() const override;
192 rect default_clip_rect(bool aIncludeNonClient = false) const override;
193 bool ready_to_render() const override;
194 void render(i_graphics_context& aGc) const override;
195 void paint_non_client(i_graphics_context& aGc) const override;
196 void paint(i_graphics_context& aGc) const override;
197 void paint_non_client_after(i_graphics_context& aGc) const override;
198 public:
199 double opacity() const override;
200 void set_opacity(double aOpacity) override;
201 bool has_background_opacity() const override;
202 double background_opacity() const override;
203 void set_background_opacity(double aOpacity) override;
204 bool has_palette() const override;
205 const i_palette& palette() const override;
206 void set_palette(const i_palette& aPalette) override;
207 bool has_palette_color(color_role aColorRole) const override;
208 color palette_color(color_role aColorRole) const override;
209 void set_palette_color(color_role aColorRole, const optional_color& aColor) override;
210 color container_background_color() const override;
211 bool has_font_role() const override;
212 neogfx::font_role font_role() const override;
213 void set_font_role(const optional_font_role& aFontRole) override;
214 bool has_font() const override;
215 const neogfx::font& font() const override;
216 void set_font(optional_font const& aFont) override;
217 public:
218 bool visible() const override;
219 bool effectively_visible() const override;
220 bool hidden() const override;
221 bool effectively_hidden() const override;
222 bool show(bool aVisible) override;
223 bool enabled() const override;
224 bool effectively_enabled() const override;
225 bool disabled() const override;
226 bool effectively_disabled() const override;
227 bool enable(bool aEnable) override;
228 bool entered(bool aChildEntered = false) const override;
229 bool can_capture() const override;
230 bool capturing() const override;
231 const optional_point& capture_position() const override;
232 void set_capture(capture_reason aReason = capture_reason::Other, const optional_point& aPosition = {}) override;
233 void release_capture(capture_reason aReason = capture_reason::Other) override;
234 void non_client_set_capture() override;
235 void non_client_release_capture() override;
236 void captured() override;
237 void capture_released() override;
238 bool has_focus_policy() const override;
239 neogfx::focus_policy focus_policy() const override;
240 void set_focus_policy(const optional_focus_policy& aFocusPolicy) override;
241 bool can_set_focus(focus_reason aFocusReason) const override;
242 bool has_focus() const override;
243 bool child_has_focus() const override;
244 bool set_focus(focus_reason aFocusReason = focus_reason::Other) override;
245 bool release_focus() override;
246 void focus_gained(focus_reason aFocusReason) override;
247 void focus_lost(focus_reason aFocusReason) override;
248 public:
249 bool consider_ancestors_for_mouse_events() const override;
250 void set_consider_ancestors_for_mouse_events(bool aConsiderAncestors = true) override;
251 bool ignore_mouse_events(bool aConsiderAncestors = true) const override;
252 void set_ignore_mouse_events(bool aIgnoreMouseEvents) override;
253 bool ignore_non_client_mouse_events(bool aConsiderAncestors = true) const override;
254 void set_ignore_non_client_mouse_events(bool aIgnoreNonClientMouseEvents) override;
256 bool mouse_wheel_scrolled(mouse_wheel aWheel, const point& aPosition, delta aDelta, key_modifiers_e aKeyModifiers) override;
257 void mouse_button_pressed(mouse_button aButton, const point& aPosition, key_modifiers_e aKeyModifiers) override;
258 void mouse_button_double_clicked(mouse_button aButton, const point& aPosition, key_modifiers_e aKeyModifiers) override;
259 void mouse_button_released(mouse_button aButton, const point& aPosition) override;
260 void mouse_moved(const point& aPosition, key_modifiers_e aKeyModifiers) override;
261 void mouse_entered(const point& aPosition) override;
262 void mouse_left() override;
263 point mouse_position() const override;
264 neogfx::mouse_cursor mouse_cursor() const override;
265 public:
266 bool key_pressed(scan_code_e aScanCode, key_code_e aKeyCode, key_modifiers_e aKeyModifiers) override;
267 bool key_released(scan_code_e aScanCode, key_code_e aKeyCode, key_modifiers_e aKeyModifiers) override;
268 bool text_input(i_string const& aText) override;
269 bool sys_text_input(i_string const& aText) override;
270 public:
271 const i_widget& widget_for_mouse_event(const point& aPosition, bool aForHitTest = false) const override;
272 i_widget& widget_for_mouse_event(const point& aPosition, bool aForHitTest = false) override;
273 // helpers
274 public:
275 using base_type::set_size_policy;
276 public:
277 using base_type::is_surface;
278 using base_type::has_surface;
279 using base_type::surface;
280 using base_type::same_surface;
281 public:
282 using base_type::is_parent_of;
283 using base_type::is_ancestor_of;
284 using base_type::is_descendent_of;
285 using base_type::is_sibling_of;
286 using base_type::remove;
287 public:
288 using base_type::to_window_coordinates;
289 using base_type::to_client_coordinates;
290 public:
291 using base_type::can_update;
292 using base_type::update;
293 public:
294 using base_type::show;
295 using base_type::hide;
296 using base_type::enable;
297 using base_type::disable;
298 public:
299 using base_type::has_background_color;
300 using base_type::background_color;
301 using base_type::set_background_color;
302 using base_type::has_foreground_color;
303 using base_type::foreground_color;
304 using base_type::set_foreground_color;
305 using base_type::has_base_color;
306 using base_type::base_color;
307 using base_type::set_base_color;
308 using base_type::has_alternate_base_color;
309 using base_type::alternate_base_color;
310 using base_type::set_alternate_base_color;
311 // state
312 private:
313 bool iSingular;
314 i_widget* iParent;
315 mutable std::optional<const i_window*> iRoot;
316 mutable std::optional<const i_device_metrics*> iDeviceMetrics;
317 widget_list iChildren;
318 bool iAddingChild;
319 i_widget* iLinkBefore;
320 i_widget* iLinkAfter;
321 i_layout* iParentLayout;
322 bool iResizing;
323 bool iLayoutPending;
324 uint32_t iLayoutInProgress;
325 optional<neogfx::layout_reason> iLayoutReason;
326 ref_ptr<i_layout> iLayout;
327 mutable std::pair<optional_rect, optional_rect> iDefaultClipRect;
328 optional_point iCapturePosition;
329 int32_t iLayer;
330 neogfx::view iView;
331 std::optional<int32_t> iRenderLayer;
332 // properties / anchors
333 public:
334 define_property(property_category::hard_geometry, optional_logical_coordinate_system, LogicalCoordinateSystem, logical_coordinate_system)
335 define_property(property_category::hard_geometry, bool, Visible, visible, true)
336 define_property(property_category::other_appearance, bool, Enabled, enabled, true)
337 define_property(property_category::other, optional_focus_policy, FocusPolicy, focus_policy)
338 define_property(property_category::other_appearance, double, Opacity, opacity, 1.0)
339 define_property(property_category::other_appearance, optional<double>, BackgroundOpacity, background_opacity)
340 define_property(property_category::other_appearance, optional<neogfx::palette>, Palette, palette)
341 define_property(property_category::font, optional_font_role, FontRole, font_role)
342 define_property(property_category::font, optional_font, Font, font)
343 define_property(property_category::other, bool, ConsiderAncestorsForMouseEvents, consider_ancestors_for_mouse_events, true)
344 define_property(property_category::other, bool, IgnoreMouseEvents, ignore_mouse_events, false)
345 define_property(property_category::other, bool, IgnoreNonClientMouseEvents, ignore_non_client_mouse_events, true)
346 };
347}
neogfx::size_policy size_policy() const override
Definition widget.ipp:1010
const i_widget & after() const override
Definition widget.ipp:512
bool has_children() const override
Definition widget.ipp:383
bool has_surface() const override
Definition widget.ipp:229
void paint_non_client_after(i_graphics_context &aGc) const override
Definition widget.ipp:1353
bool has_logical_coordinate_system() const override
Definition widget.ipp:820
bool can_capture() const override
Definition widget.ipp:1691
bool sys_text_input(i_string const &aText) override
Definition widget.ipp:2063
void move(const point &aPosition) override
Definition widget.ipp:840
bool show(bool aVisible) override
Definition widget.ipp:1618
const i_palette & palette() const override
Definition widget.ipp:1486
void resized() override
Definition widget.ipp:912
void set_focus_policy(const optional_focus_policy &aFocusPolicy) override
Definition widget.ipp:1793
bool device_metrics_available() const override
Definition widget.ipp:140
void parent_moved() override
Definition widget.ipp:876
bool ignore_mouse_events(bool aConsiderAncestors=true) const override
Definition widget.ipp:1883
void set_opacity(double aOpacity) override
Definition widget.ipp:1446
void moved() override
Definition widget.ipp:852
void set_font(optional_font const &aFont) override
Definition widget.ipp:1581
void link_before(i_widget *aPreviousWidget) override
Definition widget.ipp:550
void set_root(i_window &aRoot) final
Definition widget.ipp:223
void bring_child_to_front(const i_widget &aChild) override
Definition widget.ipp:447
neogfx::mouse_cursor mouse_cursor() const override
Definition widget.ipp:1992
void set_parent_widget(i_widget *aParentWidget) final
Definition widget.ipp:691
void set_singular(bool aSingular) final
Definition widget.ipp:168
widget_list::const_iterator find(const i_widget &aChild, bool aThrowIfNotFound=true) const override
Definition widget.ipp:423
double background_opacity() const override
Definition widget.ipp:1462
bool effectively_disabled() const override
Definition widget.ipp:1659
bool can_defer_layout() const override
Definition widget.ipp:627
void mouse_entered(const point &aPosition) override
Definition widget.ipp:1968
const widget_list & children() const override
Definition widget.ipp:389
const i_widget & parent() const final
Definition widget.ipp:271
void parent_changed() final
Definition widget.ipp:307
bool key_pressed(scan_code_e aScanCode, key_code_e aKeyCode, key_modifiers_e aKeyModifiers) override
Definition widget.ipp:2045
neogfx::mouse_event_location mouse_event_location() const override
Definition widget.ipp:1909
void set_capture(capture_reason aReason=capture_reason::Other, const optional_point &aPosition={}) override
Definition widget.ipp:1709
const i_widget & get_widget_at(const point &aPosition) const override
Definition widget.ipp:955
i_widget visibility_changed parent_position_changed layout_completed i_graphics_context const neogfx::mouse_event neogfx::mouse_cursor focus_event
Definition widget.hpp:54
void layout_items_completed() override
Definition widget.ipp:806
void mouse_moved(const point &aPosition, key_modifiers_e aKeyModifiers) override
Definition widget.ipp:1962
void link_after(i_widget *aNextWidget) override
Definition widget.ipp:556
void mouse_button_pressed(mouse_button aButton, const point &aPosition, key_modifiers_e aKeyModifiers) override
Definition widget.ipp:1929
bool set_focus(focus_reason aFocusReason=focus_reason::Other) override
Definition widget.ipp:1835
void remove_all() override
Definition widget.ipp:376
void property_changed(i_property &aProperty) override
Definition widget.ipp:110
bool enable(bool aEnable) override
Definition widget.ipp:1665
const i_widget & parent_widget() const final
Definition widget.ipp:679
neogfx::focus_policy focus_policy() const override
Definition widget.ipp:1785
bool has_focus() const override
Definition widget.ipp:1823
void set_palette(const i_palette &aPalette) override
Definition widget.ipp:1494
void set_font_role(const optional_font_role &aFontRole) override
Definition widget.ipp:1556
void layout_items_started() override
Definition widget.ipp:790
void set_parent_layout(i_layout *aParentLayout) final
Definition widget.ipp:665
bool has_background_opacity() const override
Definition widget.ipp:1456
void set_render_layer(const std::optional< layer_t > &aLayer) override
Definition widget.ipp:1143
bool adding_child() const override
Definition widget.ipp:320
bool consider_ancestors_for_mouse_events() const override
Definition widget.ipp:1871
color container_background_color() const override
Definition widget.ipp:1530
bool enabled() const override
Definition widget.ipp:1641
void unlink() override
Definition widget.ipp:562
bool can_set_focus(focus_reason aFocusReason) const override
Definition widget.ipp:1799
bool can_update() const override
Definition widget.ipp:1153
void set_background_opacity(double aOpacity) override
Definition widget.ipp:1470
void set_logical_coordinate_system(const optional_logical_coordinate_system &aLogicalCoordinateSystem) override
Definition widget.ipp:834
bool is_singular() const final
Definition widget.ipp:162
bool has_parent_widget() const final
Definition widget.ipp:673
bool has_focus_policy() const override
Definition widget.ipp:1779
bool is_root() const final
Definition widget.ipp:181
bool effectively_hidden() const override
Definition widget.ipp:1612
const optional_point & capture_position() const override
Definition widget.ipp:1703
bool has_parent() const final
Definition widget.ipp:265
const i_widget & widget_for_mouse_event(const point &aPosition, bool aForHitTest=false) const override
Definition widget.ipp:2069
bool has_palette() const override
Definition widget.ipp:1480
bool update(bool aIncludeNonClient=false) override
Definition widget.ipp:1159
bool capturing() const override
Definition widget.ipp:1697
rect client_rect(bool aExtendIntoPadding=true) const override
Definition widget.ipp:943
bool part_active(widget_part aPart) const override
Definition widget.ipp:987
bool has_palette_color(color_role aColorRole) const override
Definition widget.ipp:1504
double opacity() const override
Definition widget.ipp:1440
const i_device_metrics & device_metrics() const override
Definition widget.ipp:154
const i_window & root() const final
Definition widget.ipp:204
neogfx::view const & view() const override
Definition widget.ipp:1123
bool visible() const override
Definition widget.ipp:1594
void focus_gained(focus_reason aFocusReason) override
Definition widget.ipp:1857
void remove(i_widget &aChild, bool aSingular, i_ref_ptr< i_widget > &aChildRef) override
Definition widget.ipp:351
bool has_font_role() const override
Definition widget.ipp:1542
void non_client_release_capture() override
Definition widget.ipp:1763
bool release_focus() override
Definition widget.ipp:1846
bool is_surface() const override
Definition widget.ipp:235
void layout_items(bool aDefer=false) override
Definition widget.ipp:711
bool effectively_visible() const override
Definition widget.ipp:1600
neolib::vector< ref_ptr< i_widget > > widget_list
Definition widget.hpp:70
void set_ignore_non_client_mouse_events(bool aIgnoreNonClientMouseEvents) override
Definition widget.ipp:1903
point mouse_position() const override
Definition widget.ipp:1980
bool child_has_focus() const override
Definition widget.ipp:1829
i_widget visibility_changed parent_position_changed layout_completed painting_children
Definition widget.hpp:48
bool layout_items_in_progress() const override
Definition widget.ipp:800
void set_palette_color(color_role aColorRole, const optional_color &aColor) override
Definition widget.ipp:1516
neogfx::padding padding() const override
Definition widget.ipp:1095
widget_list::const_iterator last() const override
Definition widget.ipp:395
bool effectively_enabled() const override
Definition widget.ipp:1647
bool has_root() const final
Definition widget.ipp:190
void mouse_button_double_clicked(mouse_button aButton, const point &aPosition, key_modifiers_e aKeyModifiers) override
Definition widget.ipp:1940
bool ignore_non_client_mouse_events(bool aConsiderAncestors=true) const override
Definition widget.ipp:1896
layer_t render_layer() const override
Definition widget.ipp:1135
void set_consider_ancestors_for_mouse_events(bool aConsiderAncestors=true) override
Definition widget.ipp:1877
bool entered(bool aChildEntered=false) const override
Definition widget.ipp:1685
rect default_clip_rect(bool aIncludeNonClient=false) const override
Definition widget.ipp:1196
const neogfx::font & font() const override
Definition widget.ipp:1572
bool disabled() const override
Definition widget.ipp:1653
bool key_released(scan_code_e aScanCode, key_code_e aKeyCode, key_modifiers_e aKeyModifiers) override
Definition widget.ipp:2051
bool requires_update() const override
Definition widget.ipp:1182
size maximum_size(optional_size const &aAvailableSpace={}) const override
Definition widget.ipp:1059
void resize(const size &aSize) override
Definition widget.ipp:893
const i_surface & real_surface() const override
Definition widget.ipp:253
bool has_parent_layout() const final
Definition widget.ipp:645
bool is_managing_layout() const override
Definition widget.ipp:633
void capture_released() override
Definition widget.ipp:1774
color palette_color(color_role aColorRole) const override
Definition widget.ipp:1510
define_declared_event(DeviceMetricsUpdated, device_metrics_updated, const i_widget &) define_declared_event(ChildAdded
void captured() override
Definition widget.ipp:1769
neogfx::font_role font_role() const override
Definition widget.ipp:1548
void set_layer(layer_t aLayer) override
Definition widget.ipp:477
void set_parent(i_widget &aParent) override
Definition widget.ipp:285
const i_widget & before() const override
Definition widget.ipp:487
const i_layout & parent_layout() const final
Definition widget.ipp:651
void focus_lost(focus_reason aFocusReason) override
Definition widget.ipp:1864
bool has_layout() const override
Definition widget.ipp:573
void set_layout(i_layout &aLayout, bool aMoveExistingItems=true) override
Definition widget.ipp:579
bool mouse_wheel_scrolled(mouse_wheel aWheel, const point &aPosition, delta aDelta, key_modifiers_e aKeyModifiers) override
Definition widget.ipp:1918
void set_ignore_mouse_events(bool aIgnoreMouseEvents) override
Definition widget.ipp:1890
neogfx::logical_coordinate_system logical_coordinate_system() const override
Definition widget.ipp:826
void release_capture(capture_reason aReason=capture_reason::Other) override
Definition widget.ipp:1734
void mouse_button_released(mouse_button aButton, const point &aPosition) override
Definition widget.ipp:1951
void non_client_set_capture() override
Definition widget.ipp:1754
bool text_input(i_string const &aText) override
Definition widget.ipp:2057
layer_t layer() const override
Definition widget.ipp:471
bool ready_to_render() const override
Definition widget.ipp:1210
bool has_font() const override
Definition widget.ipp:1566
i_widget visibility_changed parent_position_changed layout_completed i_graphics_context const neogfx::mouse_event query_mouse_cursor
Definition widget.hpp:52
void mouse_left() override
Definition widget.ipp:1974
void layout_as(const point &aPosition, const size &aSize) override
Definition widget.ipp:1104
rect update_rect() const override
Definition widget.ipp:1188
void render(i_graphics_context &aGc) const override
Definition widget.ipp:1216
void paint_non_client(i_graphics_context &aGc) const override
Definition widget.ipp:1334
neogfx::widget_type widget_type() const override
Definition widget.ipp:981
i_widget & add(i_widget &aChild) override
Definition widget.ipp:326
bool hidden() const override
Definition widget.ipp:1606
bool resizing() const override
Definition widget.ipp:887
rect non_client_rect() const override
Definition widget.ipp:936
size minimum_size(optional_size const &aAvailableSpace={}) const override
Definition widget.ipp:1027
widget_part part(const point &aPosition) const override
Definition widget.ipp:993
widget_part hit_test(const point &aPosition) const override
Definition widget.ipp:1004
const i_surface & surface() const override
Definition widget.ipp:241
void paint(i_graphics_context &aGc) const override
Definition widget.ipp:1434
void send_child_to_back(const i_widget &aChild) override
Definition widget.ipp:459
rect element_rect(skin_element aElement) const override
Definition widget.ipp:639
logical_coordinate_system
basic_mouse_event< mouse_event_location::NonClient > non_client_mouse_event
optional< point > optional_point
optional< color > optional_color
Definition color.hpp:1069
mouse_wheel
Definition i_mouse.hpp:42
basic_delta< coordinate > delta
optional< focus_policy > optional_focus_policy
gui_rect rect
layout_reason
Definition i_widget.hpp:43
mouse_button
Definition i_mouse.hpp:31
optional< font_role > optional_font_role
Definition i_style.hpp:74
optional< logical_coordinate_system > optional_logical_coordinate_system
sRGB_color color
Definition color.hpp:1067
basic_point< coordinate > point
basic_size< coordinate > size
Definition plf_hive.h:79
#define meta_object(...)
Definition i_object.hpp:28
#define define_declared_event(name, declName,...)
Definition event.hpp:195
#define define_property(category, type, name, calculator,...)
Definition property.hpp:536