summaryrefslogtreecommitdiff
path: root/src/ui/widget.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-28 14:02:20 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-28 14:02:20 +0300
commit408597bd4f71a13a511b6af33601dff0be2ed317 (patch)
tree44f6b776ddab24bb5d1b18179872546125c3d679 /src/ui/widget.h
parent852689943bfbbbb933ba617cb0a971f82923a2f3 (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.h16
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
169void destroyPending_Widget (void); 169void destroyPending_Widget (void);
170void releaseChildren_Widget (iWidget *); 170void 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
172iWidget * root_Widget (const iWidget *); 177iWidget * root_Widget (const iWidget *);
173const iString * id_Widget (const iWidget *); 178const iString * id_Widget (const iWidget *);
174int64_t flags_Widget (const iWidget *); 179int64_t flags_Widget (const iWidget *);
175iRect bounds_Widget (const iWidget *); /* outer bounds */ 180iRect bounds_Widget (const iWidget *); /* outer bounds */
176iRect innerBounds_Widget (const iWidget *); 181iRect innerBounds_Widget (const iWidget *);
177iRect boundsWithoutVisualOffset_Widget(const iWidget *); 182iRect boundsWithoutVisualOffset_Widget(const iWidget *);
178iInt2 localCoord_Widget (const iWidget *, iInt2 coord); 183iInt2 localToWindow_Widget (const iWidget *, iInt2 localCoord);
179iBool contains_Widget (const iWidget *, iInt2 coord); 184iInt2 windowToLocal_Widget (const iWidget *, iInt2 windowCoord);
180iBool containsExpanded_Widget (const iWidget *, iInt2 coord, int expand); 185iInt2 innerToWindow_Widget (const iWidget *, iInt2 innerCoord);
181iAny * hitChild_Widget (const iWidget *, iInt2 coord); 186iInt2 windowToInner_Widget (const iWidget *, iInt2 windowCoord);
187iBool contains_Widget (const iWidget *, iInt2 windowCoord);
188iBool containsExpanded_Widget (const iWidget *, iInt2 windowCoord, int expand);
189iAny * hitChild_Widget (const iWidget *, iInt2 windowCoord);
182iAny * findChild_Widget (const iWidget *, const char *id); 190iAny * findChild_Widget (const iWidget *, const char *id);
183const iPtrArray *findChildren_Widget (const iWidget *, const char *id); 191const iPtrArray *findChildren_Widget (const iWidget *, const char *id);
184iAny * findParentClass_Widget (const iWidget *, const iAnyClass *class); 192iAny * findParentClass_Widget (const iWidget *, const iAnyClass *class);