FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    KeyBinding

    struct · ferroui-base · v0.5.0

    struct KeyBinding
    

    Binds a key gesture to a command.

    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<KeyBinding>
    

    Returns a strong reference to this object.

    Source

    command_property

    fn command_property() -> &'static StyledProperty<Option<Rc<dyn ICommand>>>
    

    Defines the Command property.

    Source

    command_parameter_property

    fn command_parameter_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    Defines the CommandParameter property.

    Source

    gesture_property

    fn gesture_property() -> &'static StyledProperty<Option<KeyGesture>>
    

    Defines the Gesture property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    command

    fn command(self: &Self) -> Option<Rc<dyn ICommand>>
    

    The command invoked by the binding.

    Source

    set_command

    fn set_command(self: &Self, value: Option<Rc<dyn ICommand>>)
    

    Source

    command_parameter

    fn command_parameter(self: &Self) -> Option<BoxedValue>
    

    The parameter passed to the command.

    Source

    set_command_parameter

    fn set_command_parameter(self: &Self, value: Option<BoxedValue>)
    

    Source

    gesture

    fn gesture(self: &Self) -> Option<KeyGesture>
    

    The key gesture that invokes the command.

    Source

    set_gesture

    fn set_gesture(self: &Self, value: Option<KeyGesture>)
    

    Source

    try_handle

    fn try_handle(self: &Self, args: &KeyEventArgs)
    

    Executes the command and marks the event handled, if the event matches the gesture and the command can execute.

    Source

    Trait implementations

    Availability

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