mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
WindowServer: More work on the menu system.
Menus are now tied to a Process (by WeakPtr.) This will allow us to pass notifications to the correct event stream.
This commit is contained in:
parent
133706d697
commit
15b4c9f9f1
7 changed files with 43 additions and 39 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include "WSMenuItem.h"
|
||||
|
||||
|
@ -9,10 +10,11 @@ class WSMenuBar;
|
|||
class WSMessage;
|
||||
class WSWindow;
|
||||
class Font;
|
||||
class Process;
|
||||
|
||||
class WSMenu {
|
||||
public:
|
||||
WSMenu(int menu_id, String&& name);
|
||||
WSMenu(Process&, int menu_id, String&& name);
|
||||
~WSMenu();
|
||||
|
||||
int menu_id() const { return m_menu_id; }
|
||||
|
@ -80,5 +82,6 @@ private:
|
|||
WSMenuItem* m_hovered_item { nullptr };
|
||||
Vector<OwnPtr<WSMenuItem>> m_items;
|
||||
OwnPtr<WSWindow> m_menu_window;
|
||||
WeakPtr<Process> m_process;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue