mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
LibGUI: Make GAction scoped to its CObject parent (widget or window)
Unparented GActions are still parented to the application like before, making them globally available. This makes it possible to have actions that work whenever a specific window is active, no matter which widget is currently focused. :^)
This commit is contained in:
parent
6ab9dc4ff4
commit
5b47b0d867
8 changed files with 130 additions and 109 deletions
|
@ -115,6 +115,7 @@ public:
|
|||
void deferred_invoke(Function<void(CObject&)>);
|
||||
|
||||
bool is_widget() const { return m_widget; }
|
||||
virtual bool is_action() const { return false; }
|
||||
virtual bool is_window() const { return false; }
|
||||
|
||||
virtual void save_to(AK::JsonObject&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue