summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/Button.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-12 20:30:33 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-12 20:31:16 +0200
commit977863ea078e829df10d351a2e9ac3097fb8f5d9 (patch)
tree5ea075feaa74d0ff74381399c85cae1bfbaaa6b0 /Libraries/LibGUI/Button.h
parent3a905aed063e84331aec82826926cdb89d777892 (diff)
downloadserenity-977863ea078e829df10d351a2e9ac3097fb8f5d9.zip
LibGUI: Include keyboard modifier state with button on_click calls
This will allow you us to implement special behavior when Ctrl+clicking a button.
Diffstat (limited to 'Libraries/LibGUI/Button.h')
-rw-r--r--Libraries/LibGUI/Button.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibGUI/Button.h b/Libraries/LibGUI/Button.h
index 7ab0d8a9d7..e28972ca4b 100644
--- a/Libraries/LibGUI/Button.h
+++ b/Libraries/LibGUI/Button.h
@@ -47,12 +47,12 @@ public:
void set_text_alignment(Gfx::TextAlignment text_alignment) { m_text_alignment = text_alignment; }
Gfx::TextAlignment text_alignment() const { return m_text_alignment; }
- Function<void()> on_click;
+ Function<void(unsigned modifiers)> on_click;
void set_button_style(Gfx::ButtonStyle style) { m_button_style = style; }
Gfx::ButtonStyle button_style() const { return m_button_style; }
- virtual void click() override;
+ virtual void click(unsigned modifiers = 0) override;
void set_action(Action&);