mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
LibGUI: Add a GToolBar class that can be populated with GActions.
The same action can be added to both a menu and a toolbar. Use this to put a toolbar into FileManager. This is pretty neat. :^)
This commit is contained in:
parent
4804609b7e
commit
b704d3d295
24 changed files with 196 additions and 44 deletions
|
@ -9,7 +9,7 @@ public:
|
|||
enum Type { Invalid, Action, Separator };
|
||||
|
||||
explicit GMenuItem(Type);
|
||||
explicit GMenuItem(OwnPtr<GAction>&&);
|
||||
explicit GMenuItem(RetainPtr<GAction>&&);
|
||||
~GMenuItem();
|
||||
|
||||
Type type() const { return m_type; }
|
||||
|
@ -21,6 +21,6 @@ public:
|
|||
private:
|
||||
Type m_type { Invalid };
|
||||
unsigned m_identifier { 0 };
|
||||
OwnPtr<GAction> m_action;
|
||||
RetainPtr<GAction> m_action;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue