summaryrefslogtreecommitdiff
path: root/plugingui/checkbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/checkbox.h')
-rw-r--r--plugingui/checkbox.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugingui/checkbox.h b/plugingui/checkbox.h
index 093c5c3..927bf6d 100644
--- a/plugingui/checkbox.h
+++ b/plugingui/checkbox.h
@@ -40,6 +40,7 @@ public:
// From Widget:
bool isFocusable() override { return true; }
+ bool catchMouse() override { return true; }
bool checked();
void setChecked(bool checked);
@@ -47,12 +48,12 @@ public:
Notifier<bool> stateChangedNotifier;
protected:
- virtual void clicked() {}
-
// From Widget:
virtual void repaintEvent(RepaintEvent* repaintEvent) override;
virtual void buttonEvent(ButtonEvent* buttonEvent) override;
virtual void keyEvent(KeyEvent* keyEvent) override;
+ virtual void mouseLeaveEvent() override;
+ virtual void mouseEnterEvent() override;
private:
void internalSetChecked(bool checked);
@@ -63,6 +64,8 @@ private:
bool state;
bool middle;
+ bool buttonDown = false;
+ bool inCheckbox = false;
std::string _text;
};