diff options
Diffstat (limited to 'src/ui/inputbox.h')
-rw-r--r-- | src/ui/inputbox.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ui/inputbox.h b/src/ui/inputbox.h index 557ca6c..961bbcf 100644 --- a/src/ui/inputbox.h +++ b/src/ui/inputbox.h @@ -20,10 +20,19 @@ public: ~InputBox(); /// set the text displayed by the label - void set_text(std::string const &text); + void set_text(const std::string &text); /// set the text displayed by the label void set_text(const char *text); + + /// set the prompt + void set_prompt(const std::string &prompt); + + /// set the prompt + void set_prompt(const char *prompt); + + /// set the maximal input width + void set_max(const size_t max); /// return the text displayed by the label inline std::string const &text() const { @@ -46,7 +55,9 @@ protected: private: std::string input_text; + std::string input_prompt; size_t input_pos; + size_t input_max; }; } |