summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textfield.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-30 16:00:06 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-30 16:00:06 +0300
commit6e5d8181b830694a90bba7ad5651fa0b726e4a75 (patch)
tree27c2cc174c5b327a75604c1c99a270143879be7c /src/gui/widgets/textfield.h
parent8a24c37deef374bf138569d50221e34fbc97ee98 (diff)
downloadmanaplus-6e5d8181b830694a90bba7ad5651fa0b726e4a75.tar.gz
manaplus-6e5d8181b830694a90bba7ad5651fa0b726e4a75.tar.bz2
manaplus-6e5d8181b830694a90bba7ad5651fa0b726e4a75.tar.xz
manaplus-6e5d8181b830694a90bba7ad5651fa0b726e4a75.zip
Add popup menu for text fields.
This menu allow copy/paste text to/from clipboard.
Diffstat (limited to 'src/gui/widgets/textfield.h')
-rw-r--r--src/gui/widgets/textfield.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index 34ca88b4a..9220f3dd7 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -115,6 +115,12 @@ class TextField : public gcn::TextField,
void setCaretPosition(unsigned int position);
+ void mousePressed(gcn::MouseEvent &mouseEvent) override;
+
+ void handlePaste();
+
+ void handleCopy() const;
+
protected:
void drawCaret(gcn::Graphics* graphics, int x) override;
@@ -127,10 +133,6 @@ class TextField : public gcn::TextField,
static Skin *mSkin;
private:
- void handlePaste();
-
- void handleCopy() const;
-
static int instances;
static float mAlpha;
static ImageRect skin;