FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IToggleProvider

    trait · ferroui-controls · v0.5.0

    trait IToggleProvider
    

    Exposes methods and properties to support UI Automation client access to controls that can cycle through a set of states and maintain a particular state.

    View source

    Members

    peer

    fn peer(self: &Self) -> Ref<AutomationPeer>
    

    The automation peer that provides this contract.

    Source

    toggle_state

    fn toggle_state(self: &Self) -> ToggleState
    

    Gets the toggle state of the control.

    Windows: IToggleProvider.ToggleState. macOS: NSAccessibilityProtocol.accessibilityValue.

    Source

    toggle

    fn toggle(self: &Self) -> Result<(), AutomationError>
    

    Cycles through the toggle states of a control.

    Windows: IToggleProvider.Toggle. macOS: NSAccessibilityProtocol.accessibilityPerformPress.

    Errors

    An AutomationError when the state of the element refuses the call (the exception the member throws in the original).

    Source

    Trait implementations

    Availability

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