1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:48:14 +00:00
serenity/WindowServer/WSMenuItem.h
Andreas Kling 443b043b49 WindowServer: Start implementing a menu system.
I'm going with a global top-of-the-screen menu instead of per-window menus.
The basic idea is that menus will live in the WindowServer and clients can
create menus via WindowServer requests.
2019-02-11 09:47:10 +01:00

32 lines
601 B
C++

#pragma once
#include <AK/AKString.h>
#include <SharedGraphics/Rect.h>
class WSMenuItem {
public:
enum Type {
None,
Text,
Separator,
};
explicit WSMenuItem(const String& text);
explicit WSMenuItem(Type);
~WSMenuItem();
Type type() const { return m_type; }
bool enabled() const { return m_enabled; }
String text() const { return m_text; }
void set_rect(const Rect& rect) { m_rect = rect; }
Rect rect() const { return m_rect; }
private:
Type m_type { None };
bool m_enabled { true };
String m_text;
Rect m_rect;
};