diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-30 00:40:28 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-30 00:40:28 (GMT) |
| commit | 259fc2bcf75d754af043a5d3fa39b6ee0c0b1dec (patch) | |
| tree | f0fe2c14499345121371bba0ecc3fe21d17e0953 /src/interface/Textbox.h | |
| parent | fe329e9127ebcb8c89c505c4c120e175810d280c (diff) | |
| download | powder-259fc2bcf75d754af043a5d3fa39b6ee0c0b1dec.zip powder-259fc2bcf75d754af043a5d3fa39b6ee0c0b1dec.tar.gz | |
ASCII for key events, save and Textarea (no caret, yet)
Diffstat (limited to 'src/interface/Textbox.h')
| -rw-r--r-- | src/interface/Textbox.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/interface/Textbox.h b/src/interface/Textbox.h index 82ed648..ac138f4 100644 --- a/src/interface/Textbox.h +++ b/src/interface/Textbox.h @@ -17,6 +17,7 @@ public: }; class Textbox : public Component { +protected: std::string text; ui::Point textPosition; HorizontalAlignment textHAlign; @@ -25,19 +26,17 @@ class Textbox : public Component TextboxAction *actionCallback; bool masked; public: - Textbox(Window* parent_state, std::string textboxText); Textbox(Point position, Point size, std::string textboxText); - Textbox(std::string textboxText); virtual ~Textbox(); - void TextPosition(); - void SetText(std::string text); + virtual void TextPosition(); + virtual void SetText(std::string text); std::string GetText(); HorizontalAlignment GetHAlignment() { return textHAlign; } VerticalAlignment GetVAlignment() { return textVAlign; } void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign) { textHAlign = hAlign; textVAlign = vAlign; TextPosition(); } void SetActionCallback(TextboxAction * action) { actionCallback = action; } - virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); void SetHidden(bool hidden) { masked = hidden; } bool GetHidden() { return masked; } |
