diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-25 13:40:57 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-25 13:40:57 +0200 |
commit | d12857fc36879cddfaf2d0c7f607454ab7a96958 (patch) | |
tree | 0ef12fd702005855ba32868cec0e73b38e67b8d9 /LibGUI/GAbstractButton.h | |
parent | e478a2fb0ab8b1b392e4dd0bfaa7eafb7d12c6a4 (diff) | |
download | serenity-d12857fc36879cddfaf2d0c7f607454ab7a96958.zip |
LibGUI: Notify widgets when their enabled state changes.
This is done by dispatching a (synchronous) "EnabledChange" event that can
be picked up in change_event(). Use this event to kick widgets out of their
"being pressed"-type modes if the user is interacting with them while the
state is programmatically changed.
Diffstat (limited to 'LibGUI/GAbstractButton.h')
-rw-r--r-- | LibGUI/GAbstractButton.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/LibGUI/GAbstractButton.h b/LibGUI/GAbstractButton.h index 75627e5e0e..fdbb6a7a8c 100644 --- a/LibGUI/GAbstractButton.h +++ b/LibGUI/GAbstractButton.h @@ -37,6 +37,7 @@ protected: virtual void keydown_event(GKeyEvent&) override; virtual void enter_event(CEvent&) override; virtual void leave_event(CEvent&) override; + virtual void change_event(GEvent&) override; void paint_text(GPainter&, const Rect&, const Font&, TextAlignment); |