FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ToggleButton

    struct · ferroui-controls · v0.5.0

    struct ToggleButton
    

    Represents a control that a user can select (check) or clear (uncheck). Base class for controls that can switch states.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<ToggleButton>
    

    Returns a strong reference to this object.

    Source

    toggle

    fn toggle(self: &Self)
    

    Toggles the IsChecked property.

    Source

    on_is_checked_changed

    fn on_is_checked_changed(self: &Self, e: &RoutedEventArgs)
    

    Called when IsChecked changes. e are the event arguments for the routed event that is raised by the default implementation of this method.

    Source

    PSEUDO_CLASSES

    const PSEUDO_CLASSES: PseudoClassesAttribute
    

    The pseudoclasses set by the class.

    Source

    is_checked_property

    fn is_checked_property() -> &'static StyledProperty<Option<bool>>
    

    Defines the IsChecked property.

    Source

    is_three_state_property

    fn is_three_state_property() -> &'static StyledProperty<bool>
    

    Defines the IsThreeState property.

    Source

    is_checked_changed_event

    fn is_checked_changed_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the IsCheckedChanged event.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a toggle button.

    Source

    is_checked_changed

    fn is_checked_changed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Raised when the IsChecked property value changes.

    Source

    is_checked

    fn is_checked(self: &Self) -> Option<bool>
    

    Whether the toggle button is checked; None is the indeterminate state.

    Source

    set_is_checked

    fn set_is_checked(self: &Self, value: Option<bool>)
    

    Source

    is_three_state

    fn is_three_state(self: &Self) -> bool
    

    A value that indicates whether the control supports three states.

    Source

    set_is_three_state

    fn set_is_three_state(self: &Self, value: bool)
    

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.