summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSWindowManager.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-28 21:11:53 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-29 06:36:29 +0200
commit63e6b09816c5d144e83138d3fd471b800d29a52a (patch)
tree7daa439cf56e3c9e6131aa7a52fb7432ca0e32e6 /Servers/WindowServer/WSWindowManager.h
parentd3ebd8897f27c75ddf0bb75d401a6ea55761b1bd (diff)
downloadserenity-63e6b09816c5d144e83138d3fd471b800d29a52a.zip
WindowServer+LibGUI: Add support for nested menus
It's now possible to add a GMenu as a submenu of another GMenu. Simply use the GMenu::add_submenu(NonnullOwnPtr<GMenu>) API :^) The WindowServer now keeps track of a stack of open menus rather than just one "current menu". This code needs a bit more work, but the basic functionality is now here!
Diffstat (limited to 'Servers/WindowServer/WSWindowManager.h')
-rw-r--r--Servers/WindowServer/WSWindowManager.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Servers/WindowServer/WSWindowManager.h b/Servers/WindowServer/WSWindowManager.h
index 3c0dabb072..cece8d2de2 100644
--- a/Servers/WindowServer/WSWindowManager.h
+++ b/Servers/WindowServer/WSWindowManager.h
@@ -78,11 +78,14 @@ public:
void draw_window_switcher();
+ WSMenuManager& menu_manager() { return m_menu_manager; }
+ const WSMenuManager& menu_manager() const { return m_menu_manager; }
+
Rect menubar_rect() const;
WSMenuBar* current_menubar() { return m_current_menubar.ptr(); }
void set_current_menubar(WSMenuBar*);
WSMenu* current_menu() { return m_current_menu.ptr(); }
- void set_current_menu(WSMenu*);
+ void set_current_menu(WSMenu*, bool is_submenu = false);
WSMenu* system_menu() { return m_system_menu.ptr(); }
const WSCursor& active_cursor() const;