mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00:00
LibGUI: Add DoClamp option to AbstractSlider::set_value()
This commit is contained in:
parent
ab4c73746c
commit
1d522e4b4c
7 changed files with 17 additions and 11 deletions
|
@ -30,7 +30,12 @@ public:
|
|||
bool is_max() const { return m_value == m_max; }
|
||||
|
||||
void set_range(int min, int max);
|
||||
virtual void set_value(int, AllowCallback = AllowCallback::Yes);
|
||||
|
||||
enum class DoClamp {
|
||||
Yes = 1,
|
||||
No = 0
|
||||
};
|
||||
virtual void set_value(int, AllowCallback = AllowCallback::Yes, DoClamp = DoClamp::Yes);
|
||||
|
||||
void set_min(int min) { set_range(min, max()); }
|
||||
void set_max(int max) { set_range(min(), max); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue