summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GAbstractView.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-07 21:34:26 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-07 21:35:04 +0200
commit6dec328af7e2e712c49d2f073dadd3e86a422bd8 (patch)
treeb0f691040288fe53c0b189909d549797b18cc6e4 /Libraries/LibGUI/GAbstractView.h
parent9d97781e37520644624599bc3a1fe57c121c7200 (diff)
downloadserenity-6dec328af7e2e712c49d2f073dadd3e86a422bd8.zip
LibGUI+FileManager: Add GAbstractView::on_selection_change hook
This hook will be called whenever the view's selection changes somehow. Use this in the FileManager to keep the left and right views in sync.
Diffstat (limited to 'Libraries/LibGUI/GAbstractView.h')
-rw-r--r--Libraries/LibGUI/GAbstractView.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibGUI/GAbstractView.h b/Libraries/LibGUI/GAbstractView.h
index 35c569fad6..04496027e5 100644
--- a/Libraries/LibGUI/GAbstractView.h
+++ b/Libraries/LibGUI/GAbstractView.h
@@ -36,6 +36,7 @@ public:
void set_activates_on_selection(bool b) { m_activates_on_selection = b; }
bool activates_on_selection() const { return m_activates_on_selection; }
+ Function<void()> on_selection_change;
Function<void(const GModelIndex&)> on_activation;
Function<void(const GModelIndex&)> on_selection;
Function<void(const GModelIndex&, const GContextMenuEvent&)> on_context_menu_request;