summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Button.h
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-02-17 11:13:25 +0000
committerLinus Groh <mail@linusgroh.de>2023-02-19 01:09:09 +0100
commit8f717927f29400a0e73309bb1b0d64f4f40787a1 (patch)
treed34d3e306a7d970116f563e39b52e6abb680a23e /Userland/Libraries/LibGUI/Button.h
parentaf03cf9e8091e8fcbe50d07f1a7707ae59f16de4 (diff)
downloadserenity-8f717927f29400a0e73309bb1b0d64f4f40787a1.zip
LibGUI: Add Button double-click callback
Diffstat (limited to 'Userland/Libraries/LibGUI/Button.h')
-rw-r--r--Userland/Libraries/LibGUI/Button.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/Button.h b/Userland/Libraries/LibGUI/Button.h
index e5301359cf..b91f92ad97 100644
--- a/Userland/Libraries/LibGUI/Button.h
+++ b/Userland/Libraries/LibGUI/Button.h
@@ -37,6 +37,7 @@ public:
Gfx::TextAlignment text_alignment() const { return m_text_alignment; }
Function<void(unsigned modifiers)> on_click;
+ Function<void(unsigned modifiers)> on_double_click;
Function<void(unsigned modifiers)> on_middle_mouse_click;
Function<void(ContextMenuEvent&)> on_context_menu_request;
@@ -44,6 +45,7 @@ public:
Gfx::ButtonStyle button_style() const { return m_button_style; }
virtual void click(unsigned modifiers = 0) override;
+ virtual void double_click(unsigned modifiers = 0) override;
virtual void middle_mouse_click(unsigned modifiers = 0) override;
virtual void context_menu_event(ContextMenuEvent&) override;