summaryrefslogtreecommitdiff
path: root/plugingui/button.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-03-30 22:02:20 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2013-03-30 22:02:20 +0100
commitbe675587812c27fac9838af844f8ecb44703ff08 (patch)
tree88a5436c5f584991e54bf0d7644d651cc4c67a54 /plugingui/button.cc
parent9f49f84a82073a64e2d8415c60a5b77d724d80dd (diff)
Implemented new mouseLeave/Enter Events. Use for buttons.
Diffstat (limited to 'plugingui/button.cc')
-rw-r--r--plugingui/button.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugingui/button.cc b/plugingui/button.cc
index 05d16a2..2370f29 100644
--- a/plugingui/button.cc
+++ b/plugingui/button.cc
@@ -29,6 +29,7 @@
#include "painter.h"
#include <stdio.h>
+#include <hugin.hpp>
GUI::Button::Button(Widget *parent)
: GUI::Widget(parent)
@@ -110,6 +111,21 @@ void GUI::Button::setText(std::string text)
repaintEvent(NULL);
}
+void GUI::Button::mouseLeaveEvent()
+{
+ DEBUG(button, "Leave\n");
+ if(state == down) {
+ state = up;
+ repaintEvent(NULL);
+ }
+}
+
+void GUI::Button::mouseEnterEvent()
+{
+ DEBUG(button, "Enter\n");
+}
+
+
#ifdef TEST_BUTTON
//Additional dependency files
//deps: