Skip to main content

IClickableControl

Trait IClickableControl 

Source
pub trait IClickableControl {
    // Required methods
    fn click(
        &self,
        handler: Rc<dyn Fn(&RoutedEventArgs)>,
    ) -> Rc<dyn IDisposable>;
    fn raise_click(&self);
    fn is_effectively_enabled(&self) -> bool;
}
Expand description

A control that can be clicked: what the access key and hot key handling needs from a button-like control.

Required Methods§

Source

fn click(&self, handler: Rc<dyn Fn(&RoutedEventArgs)>) -> Rc<dyn IDisposable>

Raised when the control is clicked. Disposing the returned handle unsubscribes.

Source

fn raise_click(&self)

Raises the click of the control.

Source

fn is_effectively_enabled(&self) -> bool

Gets a value indicating whether this control and all its parents are enabled.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§