Ben Wiederhake
70fe126d01
LibGUI: Enable icons for SubMenus
...
It doesn't make sense for a top-level menu to have an icon, however
we do not have dedicated classes to distinguish these.
Furthermore, the only other place to store an icon is MenuItem.
Storing it there would be highly confusing, as MenuItem-with-Action
then would have two icons: one in Action and one in MenuItem.
And because we need to be able to replace the icon during realization,
this would need to write-through to Action somehow.
That's why I went with Menu, not MenuItem.
2020-07-28 16:29:44 +02:00
Tom
1c1ab71692
WindowServer/LibGUI: Add default menu items and allow default action for context menu
...
By specifying an optional Action for Menu::popup an application
can specify what item should be displayed as a default item.
2020-07-11 11:45:49 +02:00
Andreas Kling
116cf92156
LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
...
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
2020-06-10 10:59:04 +02:00
Andreas Kling
f0cde70c18
LibGUI: Simplify submenu construction
...
The API for adding a submenu to a menu is now:
auto& submenu = menu.add_submenu("Name");
submenu.add_action(my_action);
2020-04-29 11:48:11 +02:00
Andreas Kling
ceec1a7d38
AK: Make Vector use size_t for its size and capacity
2020-02-25 14:52:35 +01:00
Andreas Kling
189fa68c0b
LibGUI: Expose GUI::Menu::menu_id() and also allow forced realization
...
Menu realization is when we instruct WindowServer to create the
server-side menu objects on our behalf.
2020-02-17 20:04:05 +01:00
Andreas Kling
2143da6434
LibGUI: Add forwarding header
...
This patch adds <LibGUI/Forward.h> and uses it a bunch.
It also dragged various header dependency reduction changes into it.
2020-02-16 09:41:56 +01:00
Andreas Kling
b011ea9962
LibGUI: Reduce menu-related header dependencies
2020-02-15 01:56:30 +01:00
Andreas Kling
a368cf7d51
LibGfx: Replace manual forward declarations with <LibGfx/Forward.h>
2020-02-15 00:10:34 +01:00
Andreas Kling
6a9cc66b97
LibGUI: Remove leading G from filenames
2020-02-06 20:33:02 +01:00