1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:17:35 +00:00

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.
This commit is contained in:
Tom 2020-07-10 13:29:21 -06:00 committed by Andreas Kling
parent fc4e01a3c9
commit 1c1ab71692
6 changed files with 44 additions and 20 deletions

View file

@ -21,13 +21,14 @@ endpoint WindowServer = 2
bool enabled,
bool checkable,
bool checked,
bool is_default,
[UTF8] String shortcut,
i32 icon_buffer_id,
bool exclusive) => ()
AddMenuSeparator(i32 menu_id) => ()
UpdateMenuItem(i32 menu_id, i32 identifier, i32 submenu_id, [UTF8] String text, bool enabled, bool checkable, bool checked, [UTF8] String shortcut) => ()
UpdateMenuItem(i32 menu_id, i32 identifier, i32 submenu_id, [UTF8] String text, bool enabled, bool checkable, bool checked, bool is_default, [UTF8] String shortcut) => ()
CreateWindow(
Gfx::IntRect rect,