diff options
Diffstat (limited to 'src/gui/widgets/textfield.h')
-rw-r--r-- | src/gui/widgets/textfield.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h index 3a5db3c3c..ffd956ed2 100644 --- a/src/gui/widgets/textfield.h +++ b/src/gui/widgets/textfield.h @@ -69,6 +69,9 @@ #include "listeners/focuslistener.h" #include "listeners/keylistener.h" #include "listeners/mouselistener.h" +#include "listeners/widgetlistener.h" + +#include "gui/fonts/textchunk.h" #include "gui/widgets/widget.h" @@ -82,7 +85,8 @@ class TextField notfinal : public Widget, public FocusListener, public KeyListener, - public MouseListener + public MouseListener, + public WidgetListener { public: /** @@ -223,6 +227,10 @@ class TextField notfinal : public Widget, void mouseDragged(MouseEvent& event) override final; + void widgetHidden(const Event &event) override final; + + void setParent(Widget *widget) override final; + protected: void drawCaret(Graphics* graphics, int x); @@ -241,6 +249,8 @@ class TextField notfinal : public Widget, */ std::string mText; + TextChunk mTextChunk; + /** * Holds the caret position. */ @@ -265,6 +275,7 @@ class TextField notfinal : public Widget, bool mLoseFocusOnTab; bool mAllowSpecialActions; bool mSendAlwaysEvents; + bool mTextChanged; }; #endif // GUI_WIDGETS_TEXTFIELD_H |