From dc1528e89d48947780e00fc1a49ce57cccdfbfe5 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 20 Jul 2021 09:01:25 +0300 Subject: Revising InputWidget `InputWidget` needs to be better at handling multiple lines. The previous implementation assumed that the content was short enough to be fully redrawn each frame, which is not a great idea when you have thousands of lines. --- src/ui/inputwidget.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/inputwidget.h') diff --git a/src/ui/inputwidget.h b/src/ui/inputwidget.h index c70d9ad6..4fb2c9dc 100644 --- a/src/ui/inputwidget.h +++ b/src/ui/inputwidget.h @@ -47,9 +47,9 @@ void setMaxLen_InputWidget (iInputWidget *, size_t maxLen); void setText_InputWidget (iInputWidget *, const iString *text); void setTextCStr_InputWidget (iInputWidget *, const char *cstr); void setFont_InputWidget (iInputWidget *, int fontId); -void setCursor_InputWidget (iInputWidget *, size_t pos); +//void setCursor_InputWidget (iInputWidget *, size_t pos); void setContentPadding_InputWidget (iInputWidget *, int left, int right); /* only affects the text entry */ -void setMaxLayoutLines_InputWidget (iInputWidget *, size_t maxLayoutLines); +void setLineLimits_InputWidget (iInputWidget *, int minVis, int maxVis); void setValidator_InputWidget (iInputWidget *, iInputWidgetValidatorFunc validator, void *context); void setEnterInsertsLF_InputWidget (iInputWidget *, iBool enterInsertsLF); void setEnterKeyEnabled_InputWidget (iInputWidget *, iBool enterKeyEnabled); -- cgit v1.2.3