Skip to main content

ActionableExt

Trait ActionableExt 

Source
pub trait ActionableExt: IsA<Actionable> + 'static {
    // Provided methods
    fn action_name(&self) -> Option<GString> { ... }
    fn action_target_value(&self) -> Option<Variant> { ... }
    fn set_action_name(&self, action_name: Option<&str>) { ... }
    fn set_action_target_value(&self, target_value: Option<&Variant>) { ... }
    fn set_detailed_action_name(&self, detailed_action_name: &str) { ... }
    fn connect_action_name_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_action_target_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Actionable methods.

§Implementors

Actionable, Button, CheckButton, LinkButton, ListBoxRow, LockButton, Switch, ToggleButton

Provided Methods§

Source

fn action_name(&self) -> Option<GString>

Gets the action name for @self.

§Returns

the action name

Source

fn action_target_value(&self) -> Option<Variant>

Gets the current target value of @self.

§Returns

the current target value

Source

fn set_action_name(&self, action_name: Option<&str>)

for actions on the containing ApplicationWindow or its associated Application, respectively. This is the same form used for actions in the gio::Menu associated with the window.

§action_name

an action name

Source

fn set_action_target_value(&self, target_value: Option<&Variant>)

s state is now equal to the target value of the button, the button will now be rendered as active (and the other buttons, with different targets, rendered inactive).

§target_value

a glib::Variant to set as the target value

Source

fn set_detailed_action_name(&self, detailed_action_name: &str)

Sets the action-name and associated string target value of an actionable widget.

@detailed_action_name is a string in the format accepted by gio::Action::parse_detailed_name().

§detailed_action_name

the detailed action name

Source

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

Source

fn connect_action_target_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§