struct Gtk::Switch::StateSetSignal
- Gtk::Switch::StateSetSignal
- GObject::Signal
- Struct
- Value
- Object
Overview
Emitted to change the underlying state.
The ::state-set signal is emitted when the user changes the switch
position. The default handler calls Gtk::Switch#state=
with the
value of state.
To implement delayed state change, applications can connect to this
signal, initiate the change of the underlying state, and call
Gtk::Switch#state=
when the underlying state change is
complete. The signal handler should return true
to prevent the
default handler from running.
Defined in:
lib/gi-crystal/src/auto/gtk-4.0/switch.crInstance Method Summary
- #connect(*, after : Bool = false, &block : Proc(Bool, Bool)) : GObject::SignalConnection
- #connect(handler : Proc(Bool, Bool), *, after : Bool = false) : GObject::SignalConnection
- #connect(handler : Proc(Gtk::Switch, Bool, Bool), *, after : Bool = false) : GObject::SignalConnection
- #emit(state : Bool) : Nil
-
#name : String
The signal name
Instance methods inherited from struct GObject::Signal
[](detail : String) : self
[],
name : String
name
Constructor methods inherited from struct GObject::Signal
new(source : GObject::Object, detail : Nil | String = nil)
new
Instance Method Detail
def connect(handler : Proc(Gtk::Switch, Bool, Bool), *, after : Bool = false) : GObject::SignalConnection
#