diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-28 14:02:20 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-28 14:02:20 +0300 |
commit | 408597bd4f71a13a511b6af33601dff0be2ed317 (patch) | |
tree | 44f6b776ddab24bb5d1b18179872546125c3d679 /src/ui/widget.h | |
parent | 852689943bfbbbb933ba617cb0a971f82923a2f3 (diff) |
Working on multiple UI roots
Various refactorings and fixes to handle root-global and window-global state, root-specific palettes, and proper coordinate system changes (e.g., when opening menus).
UI events are posted and handled in the context of a specific root.
Diffstat (limited to 'src/ui/widget.h')
-rw-r--r-- | src/ui/widget.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/ui/widget.h b/src/ui/widget.h index f126d40d..2ef035b6 100644 --- a/src/ui/widget.h +++ b/src/ui/widget.h | |||
@@ -169,16 +169,24 @@ void destroy_Widget (iWidget *); /* widget removed and deleted later | |||
169 | void destroyPending_Widget (void); | 169 | void destroyPending_Widget (void); |
170 | void releaseChildren_Widget (iWidget *); | 170 | void releaseChildren_Widget (iWidget *); |
171 | 171 | ||
172 | /* Coordinate spaces: | ||
173 | - window: 0,0 is at the top left corner of the window | ||
174 | - local: 0,0 is at the top left corner of the parent widget | ||
175 | - inner: 0,0 is at the top left corner of the widget */ | ||
176 | |||
172 | iWidget * root_Widget (const iWidget *); | 177 | iWidget * root_Widget (const iWidget *); |
173 | const iString * id_Widget (const iWidget *); | 178 | const iString * id_Widget (const iWidget *); |
174 | int64_t flags_Widget (const iWidget *); | 179 | int64_t flags_Widget (const iWidget *); |
175 | iRect bounds_Widget (const iWidget *); /* outer bounds */ | 180 | iRect bounds_Widget (const iWidget *); /* outer bounds */ |
176 | iRect innerBounds_Widget (const iWidget *); | 181 | iRect innerBounds_Widget (const iWidget *); |
177 | iRect boundsWithoutVisualOffset_Widget(const iWidget *); | 182 | iRect boundsWithoutVisualOffset_Widget(const iWidget *); |
178 | iInt2 localCoord_Widget (const iWidget *, iInt2 coord); | 183 | iInt2 localToWindow_Widget (const iWidget *, iInt2 localCoord); |
179 | iBool contains_Widget (const iWidget *, iInt2 coord); | 184 | iInt2 windowToLocal_Widget (const iWidget *, iInt2 windowCoord); |
180 | iBool containsExpanded_Widget (const iWidget *, iInt2 coord, int expand); | 185 | iInt2 innerToWindow_Widget (const iWidget *, iInt2 innerCoord); |
181 | iAny * hitChild_Widget (const iWidget *, iInt2 coord); | 186 | iInt2 windowToInner_Widget (const iWidget *, iInt2 windowCoord); |
187 | iBool contains_Widget (const iWidget *, iInt2 windowCoord); | ||
188 | iBool containsExpanded_Widget (const iWidget *, iInt2 windowCoord, int expand); | ||
189 | iAny * hitChild_Widget (const iWidget *, iInt2 windowCoord); | ||
182 | iAny * findChild_Widget (const iWidget *, const char *id); | 190 | iAny * findChild_Widget (const iWidget *, const char *id); |
183 | const iPtrArray *findChildren_Widget (const iWidget *, const char *id); | 191 | const iPtrArray *findChildren_Widget (const iWidget *, const char *id); |
184 | iAny * findParentClass_Widget (const iWidget *, const iAnyClass *class); | 192 | iAny * findParentClass_Widget (const iWidget *, const iAnyClass *class); |