| 158 | } |
| 159 | |
| 160 | void setChecked(const bool checked2, const bool sendCallback) noexcept |
| 161 | { |
| 162 | if (checked == checked2) |
| 163 | return; |
| 164 | |
| 165 | checked = checked2; |
| 166 | widget->repaint(); |
| 167 | |
| 168 | if (sendCallback) |
| 169 | { |
| 170 | if (internalCallback != nullptr) |
| 171 | internalCallback->buttonClicked(widget, -1); |
| 172 | else if (userCallback != nullptr) |
| 173 | userCallback->buttonClicked(widget, -1); |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | void setEnabled(const bool enabled2, const bool appliesToEventInput) noexcept |
| 178 | { |