1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:28:11 +00:00

WindowServer: Give menu items an identifier field and add a simple callback.

Eventually these identifiers will be sent to the userspace client who created
the menu. None of that is hooked up yet though.
This commit is contained in:
Andreas Kling 2019-02-11 10:55:02 +01:00
parent 78fc7a9ef2
commit 145aa27b8f
5 changed files with 41 additions and 9 deletions

View file

@ -57,7 +57,11 @@ public:
WSMenuItem* item_at(const Point&);
void redraw();
Function<void(WSMenuItem&)> on_item_activation;
private:
void did_activate(WSMenuItem&);
String m_name;
Rect m_rect_in_menubar;
Rect m_text_rect_in_menubar;