Switch
Superclasses: Widget
, InitiallyUnowned
, Object
Implemented Interfaces: Accessible
, Actionable
, Buildable
, ConstraintTarget
- Constructors:
Switch(**properties)
new() -> Gtk.Widget
Constructors
Methods
Properties
- class Switch
Signals
- class Switch.signals
- activate() None
Emitted to animate the switch.
Applications should never connect to this signal, but use the
active
property.
- state_set(state: bool) bool
Emitted to change the underlying state.
The ::state-set signal is emitted when the user changes the switch position. The default handler calls
set_state
with the value ofstate
.To implement delayed state change, applications can connect to this signal, initiate the change of the underlying state, and call
set_state
when the underlying state change is complete. The signal handler should returnTrue
to prevent the default handler from running.- Parameters:
state – the new state of the switch