Package ch.bailu.gtk.gtk
Interface Switch.OnStateSet
- Enclosing class:
- Switch
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
onStateSet
(boolean state) Emitted to change the underlying state.
-
Method Details
-
onStateSet
boolean onStateSet(boolean state) Emitted to change the underlying state.
The ::state-set signal is emitted when the user changes the switch
position. The default handler keeps the state in sync with the
[property@Gtk.Switch:active] property.
To implement delayed state change, applications can connect to this
signal, initiate the change of the underlying state, and call
[method@Gtk.Switch.set_state] when the underlying state change is
complete. The signal handler should return %TRUE to prevent the
default handler from running.
Visually, the underlying state is represented by the trough color of
the switch, while the [property@Gtk.Switch:active] property is
represented by the position of the switch.- Parameters:
state
- the new state of the switch- Returns:
- %TRUE to stop the signal emission
-