Skip to main content

ToggleToolButtonExt

Trait ToggleToolButtonExt 

Source
pub trait ToggleToolButtonExt:
    IsA<ToggleToolButton>
    + Sealed
    + 'static {
    // Provided methods
    fn is_active(&self) -> bool { ... }
    fn set_active(&self, is_active: bool) { ... }
    fn connect_toggled<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
    fn connect_active_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all ToggleToolButton methods.

§Implementors

RadioToolButton, ToggleToolButton

Provided Methods§

Source

fn is_active(&self) -> bool

Queries a ToggleToolButton and returns its current state. Returns true if the toggle button is pressed in and false if it is raised.

§Returns

true if the toggle tool button is pressed in, false if not

Source

fn set_active(&self, is_active: bool)

Sets the status of the toggle tool button. Set to true if you want the GtkToggleButton to be “pressed in”, and false to raise it. This action causes the toggled signal to be emitted.

§is_active

whether self should be active

Source

fn connect_toggled<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Emitted whenever the toggle tool button changes state.

Source

fn connect_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§