summaryrefslogtreecommitdiff
path: root/src/ui/widget.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-14 07:24:32 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-14 07:24:32 +0300
commitfe59111e9671fba8d1c64def9831716860ea5e44 (patch)
treefdb44222af394b4924ade2715205a813f1db2f1b /src/ui/widget.h
parent713dcca5da21897fd8f5d7519112429273d7233e (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.h2
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);
193const iPtrArray *findChildren_Widget (const iWidget *, const char *id); 193const iPtrArray *findChildren_Widget (const iWidget *, const char *id);
194iAny * findParentClass_Widget (const iWidget *, const iAnyClass *class); 194iAny * findParentClass_Widget (const iWidget *, const iAnyClass *class);
195iAny * findFocusable_Widget (const iWidget *startFrom, enum iWidgetFocusDir focusDir); 195iAny * findFocusable_Widget (const iWidget *startFrom, enum iWidgetFocusDir focusDir);
196iAny * findOverflowScrollable_Widget (iWidget *);
196size_t childCount_Widget (const iWidget *); 197size_t childCount_Widget (const iWidget *);
197void draw_Widget (const iWidget *); 198void draw_Widget (const iWidget *);
198void drawBackground_Widget (const iWidget *); 199void drawBackground_Widget (const iWidget *);
@@ -262,6 +263,7 @@ iAny * child_Widget (iWidget *, size_t index); /* O(n) */
262size_t childIndex_Widget (const iWidget *, const iAnyObject *child); /* O(n) */ 263size_t childIndex_Widget (const iWidget *, const iAnyObject *child); /* O(n) */
263void arrange_Widget (iWidget *); 264void arrange_Widget (iWidget *);
264void resetSize_Widget (iWidget *); 265void resetSize_Widget (iWidget *);
266iBool scrollOverflow_Widget (iWidget *, int delta); /* moves the widget */
265iBool dispatchEvent_Widget (iWidget *, const SDL_Event *); 267iBool dispatchEvent_Widget (iWidget *, const SDL_Event *);
266iBool processEvent_Widget (iWidget *, const SDL_Event *); 268iBool processEvent_Widget (iWidget *, const SDL_Event *);
267void postCommand_Widget (const iAnyObject *, const char *cmd, ...); 269void postCommand_Widget (const iAnyObject *, const char *cmd, ...);