mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
LibGUI: Put all classes in the GUI namespace and remove the leading G
This took me a moment. Welcome to the new world of GUI::Widget! :^)
This commit is contained in:
parent
2d39da5405
commit
c5bd9d4ed1
337 changed files with 5400 additions and 4816 deletions
|
@ -32,24 +32,27 @@
|
|||
#include <LibCore/CObject.h>
|
||||
#include <LibGUI/GMenuItem.h>
|
||||
|
||||
class GAction;
|
||||
class Point;
|
||||
|
||||
class GMenu final : public Core::Object {
|
||||
C_OBJECT(GMenu)
|
||||
public:
|
||||
explicit GMenu(const StringView& name = "");
|
||||
virtual ~GMenu() override;
|
||||
namespace GUI {
|
||||
|
||||
static GMenu* from_menu_id(int);
|
||||
class Action;
|
||||
|
||||
class Menu final : public Core::Object {
|
||||
C_OBJECT(Menu)
|
||||
public:
|
||||
explicit Menu(const StringView& name = "");
|
||||
virtual ~Menu() override;
|
||||
|
||||
static Menu* from_menu_id(int);
|
||||
|
||||
const String& name() const { return m_name; }
|
||||
|
||||
GAction* action_at(int);
|
||||
Action* action_at(int);
|
||||
|
||||
void add_action(NonnullRefPtr<GAction>);
|
||||
void add_action(NonnullRefPtr<Action>);
|
||||
void add_separator();
|
||||
void add_submenu(NonnullRefPtr<GMenu>);
|
||||
void add_submenu(NonnullRefPtr<Menu>);
|
||||
|
||||
void popup(const Point& screen_position);
|
||||
void dismiss();
|
||||
|
@ -57,7 +60,7 @@ public:
|
|||
Function<void(unsigned)> on_item_activation;
|
||||
|
||||
private:
|
||||
friend class GMenuBar;
|
||||
friend class MenuBar;
|
||||
|
||||
int menu_id() const { return m_menu_id; }
|
||||
int realize_menu();
|
||||
|
@ -66,5 +69,7 @@ private:
|
|||
|
||||
int m_menu_id { -1 };
|
||||
String m_name;
|
||||
NonnullOwnPtrVector<GMenuItem> m_items;
|
||||
NonnullOwnPtrVector<MenuItem> m_items;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue