1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:37:36 +00:00

LibGUI: Add fallible try_create_checkable() Action

This commit is contained in:
thankyouverycool 2022-09-26 08:40:49 -04:00 committed by Andreas Kling
parent 032ca748c6
commit 7252a1aa4d
2 changed files with 7 additions and 0 deletions

View file

@ -76,6 +76,8 @@ public:
static NonnullRefPtr<Action> create_checkable(String text, Shortcut const& shortcut, Function<void(Action&)> callback, Core::Object* parent = nullptr);
static NonnullRefPtr<Action> create_checkable(String text, Shortcut const& shortcut, RefPtr<Gfx::Bitmap> icon, Function<void(Action&)> callback, Core::Object* parent = nullptr);
static ErrorOr<NonnullRefPtr<Action>> try_create_checkable(String text, Shortcut const& shortcut, Function<void(Action&)> callback, Core::Object* parent = nullptr);
static RefPtr<Action> find_action_for_shortcut(Core::Object& object, Shortcut const& shortcut);
virtual ~Action() override;