summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/AbstractSlider.h
diff options
context:
space:
mode:
authorMarcus Nilsson <brainbomb@gmail.com>2021-09-16 18:58:09 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-16 22:29:21 +0200
commit522119ab9553194db0a881258dfedec3c34b90c9 (patch)
treebe74523bc2b769fc4a60e34be0f896f99824dea5 /Userland/Libraries/LibGUI/AbstractSlider.h
parentc7a99aafac7fb57879d9da6283b5e88d183cd6a6 (diff)
downloadserenity-522119ab9553194db0a881258dfedec3c34b90c9.zip
LibGUI: Implement is_min() & is_max() helpers to AbstractSlider
Diffstat (limited to 'Userland/Libraries/LibGUI/AbstractSlider.h')
-rw-r--r--Userland/Libraries/LibGUI/AbstractSlider.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractSlider.h b/Userland/Libraries/LibGUI/AbstractSlider.h
index aec489c875..f3a1991982 100644
--- a/Userland/Libraries/LibGUI/AbstractSlider.h
+++ b/Userland/Libraries/LibGUI/AbstractSlider.h
@@ -26,6 +26,9 @@ public:
int page_step() const { return m_page_step; }
bool jump_to_cursor() const { return m_jump_to_cursor; }
+ bool is_min() const { return m_value == m_min; }
+ bool is_max() const { return m_value == m_max; }
+
void set_range(int min, int max);
virtual void set_value(int);