mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:57:42 +00:00
LibGUI: Add hook when a context menu is requested on a button
This commit is contained in:
parent
040c75a3cc
commit
28f74df2e6
2 changed files with 10 additions and 0 deletions
|
@ -48,11 +48,13 @@ public:
|
|||
Gfx::TextAlignment text_alignment() const { return m_text_alignment; }
|
||||
|
||||
Function<void(unsigned modifiers)> on_click;
|
||||
Function<void(const ContextMenuEvent&)> on_context_menu_request;
|
||||
|
||||
void set_button_style(Gfx::ButtonStyle style) { m_button_style = style; }
|
||||
Gfx::ButtonStyle button_style() const { return m_button_style; }
|
||||
|
||||
virtual void click(unsigned modifiers = 0) override;
|
||||
virtual void context_menu_event(ContextMenuEvent&) override;
|
||||
|
||||
void set_action(Action&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue