summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/ComboBox.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-21 20:01:45 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-21 21:16:13 +0200
commit8055813ecf002a8e617f3d722e562a9425e82481 (patch)
tree4446af9e3daaf7ef4736f8dd12e88f646a7bba66 /Libraries/LibGUI/ComboBox.h
parent50076997f4608a8b072d5bf1e4ec1413bad9e8d5 (diff)
downloadserenity-8055813ecf002a8e617f3d722e562a9425e82481.zip
LibGUI: Add ComboBox::selected_index()
This returns the currently selected index. It was a bit strange that we had set_selected_index() but not a way to read it back. :^)
Diffstat (limited to 'Libraries/LibGUI/ComboBox.h')
-rw-r--r--Libraries/LibGUI/ComboBox.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibGUI/ComboBox.h b/Libraries/LibGUI/ComboBox.h
index 0a82d17ff1..b9c3fe8e21 100644
--- a/Libraries/LibGUI/ComboBox.h
+++ b/Libraries/LibGUI/ComboBox.h
@@ -49,6 +49,7 @@ public:
const Model* model() const;
void set_model(NonnullRefPtr<Model>);
+ size_t selected_index() const;
void set_selected_index(size_t index);
bool only_allow_values_from_model() const { return m_only_allow_values_from_model; }