mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +00:00
LibGUI: Rename CallOnChange => AllowCallback and implement elsewhere
This is a helpful option to prevent unwanted side effects, distinguish between user and programmatic input, etc. Sliders and SpinBoxes were implementing it idiosyncratically, so let's generalize the API and give Buttons and TextEditors the same ability.
This commit is contained in:
parent
d47e431d54
commit
92fffc3abc
15 changed files with 40 additions and 39 deletions
|
@ -24,7 +24,7 @@ public:
|
|||
void set_suffix(String suffix) { m_suffix = move(suffix); }
|
||||
void set_knob_style(KnobStyle knobstyle) { m_knob_style = knobstyle; }
|
||||
|
||||
virtual void set_value(int value, CallOnChange call_on_change = CallOnChange::Yes) override;
|
||||
virtual void set_value(int value, AllowCallback = AllowCallback::Yes) override;
|
||||
|
||||
protected:
|
||||
virtual void paint_event(PaintEvent&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue