mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
LibGUI: Add GUI::Menu::try_add_action() and try_add_separator()
These are fallible variants that return ErrorOr. :^)
This commit is contained in:
parent
9b07e13fb6
commit
51c4de8774
2 changed files with 27 additions and 6 deletions
|
@ -32,6 +32,9 @@ public:
|
|||
|
||||
Action* action_at(size_t);
|
||||
|
||||
ErrorOr<void> try_add_action(NonnullRefPtr<Action>);
|
||||
ErrorOr<void> try_add_separator();
|
||||
|
||||
void add_action(NonnullRefPtr<Action>);
|
||||
void add_separator();
|
||||
Menu& add_submenu(const String& name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue