From 96c3915adeb68d1dd913d38431540eb52d43ff74 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 10 Mar 2013 10:13:29 +0100 Subject: Make cursor move at mouse click. --- plugingui/lineedit.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugingui/lineedit.h') diff --git a/plugingui/lineedit.h b/plugingui/lineedit.h index f85b7ae..46fa5bc 100644 --- a/plugingui/lineedit.h +++ b/plugingui/lineedit.h @@ -31,6 +31,7 @@ #include #include "widget.h" +#include "font.h" namespace GUI { @@ -44,13 +45,16 @@ public: void setText(std::string text); //protected: - void keyEvent(KeyEvent *e); - void repaintEvent(RepaintEvent *e); + virtual void keyEvent(KeyEvent *e); + virtual void repaintEvent(RepaintEvent *e); + virtual void buttonEvent(ButtonEvent *e); protected: virtual void textChanged() {} private: + Font font; + std::string _text; size_t pos; }; -- cgit v1.2.3