diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2020-07-07 07:12:12 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-07 13:38:35 +0200 |
commit | cbf3c2caeb9ea3b3f4d82e84ea38a1a43ad7171f (patch) | |
tree | 2f8e8e8cab9870ff2def32a4ada586272227e6c7 /Libraries/LibGUI/TreeView.h | |
parent | 27109c346783a7812b39699dce20cd2bf2a0bf54 (diff) | |
download | serenity-cbf3c2caeb9ea3b3f4d82e84ea38a1a43ad7171f.zip |
LibGUI: Add on_toggle function to TreeView
This adds a function to expose the index and open/close state
of expandible nodes in TreeView.
Diffstat (limited to 'Libraries/LibGUI/TreeView.h')
-rw-r--r-- | Libraries/LibGUI/TreeView.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibGUI/TreeView.h b/Libraries/LibGUI/TreeView.h index 7f712f7147..32142429de 100644 --- a/Libraries/LibGUI/TreeView.h +++ b/Libraries/LibGUI/TreeView.h @@ -44,6 +44,8 @@ public: void expand_tree(const ModelIndex& root = {}); void collapse_tree(const ModelIndex& root = {}); + Function<void(const ModelIndex&, const bool)> on_toggle; + protected: TreeView(); |