diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-02-17 11:13:25 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-19 01:09:09 +0100 |
commit | 8f717927f29400a0e73309bb1b0d64f4f40787a1 (patch) | |
tree | d34d3e306a7d970116f563e39b52e6abb680a23e /Userland/Libraries/LibGUI/Button.h | |
parent | af03cf9e8091e8fcbe50d07f1a7707ae59f16de4 (diff) | |
download | serenity-8f717927f29400a0e73309bb1b0d64f4f40787a1.zip |
LibGUI: Add Button double-click callback
Diffstat (limited to 'Userland/Libraries/LibGUI/Button.h')
-rw-r--r-- | Userland/Libraries/LibGUI/Button.h | 2 |
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; |