1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:37:45 +00:00

Add API's and plumbing for WindowServer clients to make menus.

This commit is contained in:
Andreas Kling 2019-02-12 00:52:19 +01:00
parent bb31d961b4
commit 133706d697
17 changed files with 322 additions and 24 deletions

View file

@ -12,9 +12,11 @@ class Font;
class WSMenu {
public:
WSMenu(const String& name);
WSMenu(int menu_id, String&& name);
~WSMenu();
int menu_id() const { return m_menu_id; }
WSMenuBar* menu_bar() { return m_menubar; }
const WSMenuBar* menu_bar() const { return m_menubar; }
@ -70,6 +72,7 @@ public:
private:
void did_activate(WSMenuItem&);
int m_menu_id { 0 };
String m_name;
Rect m_rect_in_menubar;
Rect m_text_rect_in_menubar;