1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:37:35 +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:
thankyouverycool 2021-09-21 17:02:48 -04:00 committed by Andreas Kling
parent d47e431d54
commit 92fffc3abc
15 changed files with 40 additions and 39 deletions

View file

@ -26,7 +26,7 @@ public:
void set_exclusive(bool b) { m_exclusive = b; }
bool is_checked() const { return m_checked; }
void set_checked(bool);
void set_checked(bool, AllowCallback = AllowCallback::Yes);
bool is_checkable() const { return m_checkable; }
void set_checkable(bool);