diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-14 07:24:32 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-14 07:24:32 +0300 |
commit | fe59111e9671fba8d1c64def9831716860ea5e44 (patch) | |
tree | fdb44222af394b4924ade2715205a813f1db2f1b /src/ui/widget.h | |
parent | 713dcca5da21897fd8f5d7519112429273d7233e (diff) |
InputWidget: Fixed cursor moving; scroll the dialog
Up/down movement sometimes ended up in the wrong cursor position.
Now the nearest overflow-scrollable parent scrolls to keep the cursor visible.
Diffstat (limited to 'src/ui/widget.h')
-rw-r--r-- | src/ui/widget.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/widget.h b/src/ui/widget.h index 5c05e917..13f400d1 100644 --- a/src/ui/widget.h +++ b/src/ui/widget.h | |||
@@ -193,6 +193,7 @@ iAny * findChild_Widget (const iWidget *, const char *id); | |||
193 | const iPtrArray *findChildren_Widget (const iWidget *, const char *id); | 193 | const iPtrArray *findChildren_Widget (const iWidget *, const char *id); |
194 | iAny * findParentClass_Widget (const iWidget *, const iAnyClass *class); | 194 | iAny * findParentClass_Widget (const iWidget *, const iAnyClass *class); |
195 | iAny * findFocusable_Widget (const iWidget *startFrom, enum iWidgetFocusDir focusDir); | 195 | iAny * findFocusable_Widget (const iWidget *startFrom, enum iWidgetFocusDir focusDir); |
196 | iAny * findOverflowScrollable_Widget (iWidget *); | ||
196 | size_t childCount_Widget (const iWidget *); | 197 | size_t childCount_Widget (const iWidget *); |
197 | void draw_Widget (const iWidget *); | 198 | void draw_Widget (const iWidget *); |
198 | void drawBackground_Widget (const iWidget *); | 199 | void drawBackground_Widget (const iWidget *); |
@@ -262,6 +263,7 @@ iAny * child_Widget (iWidget *, size_t index); /* O(n) */ | |||
262 | size_t childIndex_Widget (const iWidget *, const iAnyObject *child); /* O(n) */ | 263 | size_t childIndex_Widget (const iWidget *, const iAnyObject *child); /* O(n) */ |
263 | void arrange_Widget (iWidget *); | 264 | void arrange_Widget (iWidget *); |
264 | void resetSize_Widget (iWidget *); | 265 | void resetSize_Widget (iWidget *); |
266 | iBool scrollOverflow_Widget (iWidget *, int delta); /* moves the widget */ | ||
265 | iBool dispatchEvent_Widget (iWidget *, const SDL_Event *); | 267 | iBool dispatchEvent_Widget (iWidget *, const SDL_Event *); |
266 | iBool processEvent_Widget (iWidget *, const SDL_Event *); | 268 | iBool processEvent_Widget (iWidget *, const SDL_Event *); |
267 | void postCommand_Widget (const iAnyObject *, const char *cmd, ...); | 269 | void postCommand_Widget (const iAnyObject *, const char *cmd, ...); |