[−][src]Trait gtk::ToggleButtonExt
Required methods
fn get_active(&self) -> bool
Queries a ToggleButton
and returns its current state. Returns true
if
the toggle button is pressed in and false
if it is raised.
Returns
a gboolean
value.
fn get_inconsistent(&self) -> bool
Gets the value set by ToggleButtonExt::set_inconsistent
.
Returns
true
if the button is displayed as inconsistent, false
otherwise
fn get_mode(&self) -> bool
Retrieves whether the button is displayed as a separate indicator
and label. See ToggleButtonExt::set_mode
.
Returns
true
if the togglebutton is drawn as a separate indicator
and label.
fn set_active(&self, is_active: bool)
Sets the status of the toggle button. Set to true
if you want the
ToggleButton
to be “pressed in”, and false
to raise it.
This action causes the ToggleButton::toggled
signal and the
Button::clicked
signal to be emitted.
is_active
true
or false
.
fn set_inconsistent(&self, setting: bool)
If the user has selected a range of elements (such as some text or
spreadsheet cells) that are affected by a toggle button, and the
current values in that range are inconsistent, you may want to
display the toggle in an “in between” state. This function turns on
“in between” display. Normally you would turn off the inconsistent
state again if the user toggles the toggle button. This has to be
done manually, ToggleButtonExt::set_inconsistent
only affects
visual appearance, it doesn’t affect the semantics of the button.
setting
true
if state is inconsistent
fn set_mode(&self, draw_indicator: bool)
Sets whether the button is displayed as a separate indicator and label.
You can call this function on a checkbutton or a radiobutton with
draw_indicator
= false
to make the button look like a normal button.
This can be used to create linked strip of buttons that work like
a StackSwitcher
.
This function only affects instances of classes like CheckButton
and RadioButton
that derive from ToggleButton
,
not instances of ToggleButton
itself.
draw_indicator
if true
, draw the button as a separate indicator
and label; if false
, draw the button like a normal button
fn toggled(&self)
Emits the ToggleButton::toggled
signal on the
ToggleButton
. There is no good reason for an
application ever to call this function.
fn get_property_draw_indicator(&self) -> bool
fn set_property_draw_indicator(&self, draw_indicator: bool)
fn connect_toggled<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Should be connected if you wish to perform an action whenever the
ToggleButton
's state is changed.
fn connect_property_active_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_draw_indicator_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_inconsistent_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<ToggleButton>> ToggleButtonExt for O
[src]
fn get_active(&self) -> bool
[src]
fn get_inconsistent(&self) -> bool
[src]
fn get_mode(&self) -> bool
[src]
fn set_active(&self, is_active: bool)
[src]
fn set_inconsistent(&self, setting: bool)
[src]
fn set_mode(&self, draw_indicator: bool)
[src]
fn toggled(&self)
[src]
fn get_property_draw_indicator(&self) -> bool
[src]
fn set_property_draw_indicator(&self, draw_indicator: bool)
[src]
fn connect_toggled<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_property_active_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_draw_indicator_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_inconsistent_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId