FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TrayIcon

    struct · ferroui-controls · v0.5.0

    struct TrayIcon
    

    An icon in the notification area of the platform.

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

    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

    icons_property

    fn icons_property() -> &'static AttachedProperty<Option<Rc<TrayIcons>>>
    

    Defines the Icons attached property.

    Source

    menu_property

    fn menu_property() -> &'static StyledProperty<Option<Ref<NativeMenu>>>
    

    Defines the Menu property.

    Source

    icon_property

    fn icon_property() -> &'static StyledProperty<Option<Rc<WindowIcon>>>
    

    Defines the Icon property.

    Source

    tool_tip_text_property

    fn tool_tip_text_property() -> &'static StyledProperty<Option<String>>
    

    Defines the ToolTipText property.

    Source

    is_visible_property

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

    Defines the IsVisible property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    clicked

    fn clicked(self: &Self, handler: impl Fn(&TrayIcon) -> () + 'static) -> Subscription
    

    Raised when the TrayIcon is clicked. Note, this is only supported on Win32 and some Linux DEs, on OSX this event is not raised.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the tray icon.

    Source

    set_icons

    fn set_icons(o: &Application, tray_icons: Option<Rc<TrayIcons>>)
    

    Sets the tray icons of the application.

    Source

    get_icons

    fn get_icons(o: &Application) -> Option<Rc<TrayIcons>>
    

    Gets the tray icons of the application.

    Source

    command

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

    Gets the Command property of a TrayIcon.

    Source

    set_command

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

    Source

    command_parameter

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

    Gets the parameter to pass to the Command property of a TrayIcon.

    Source

    set_command_parameter

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

    Source

    menu

    fn menu(self: &Self) -> Option<Ref<NativeMenu>>
    

    Gets the Menu of the TrayIcon.

    Source

    set_menu

    fn set_menu(self: &Self, value: Option<Ref<NativeMenu>>)
    

    Source

    icon

    fn icon(self: &Self) -> Option<Rc<WindowIcon>>
    

    Gets the icon of the TrayIcon.

    Source

    set_icon

    fn set_icon(self: &Self, value: Option<Rc<WindowIcon>>)
    

    Source

    tool_tip_text

    fn tool_tip_text(self: &Self) -> Option<String>
    

    Gets the tooltip text of the TrayIcon.

    Source

    set_tool_tip_text

    fn set_tool_tip_text(self: &Self, value: Option<String>)
    

    Source

    is_visible

    fn is_visible(self: &Self) -> bool
    

    Gets the visibility of the TrayIcon.

    Source

    set_is_visible

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

    Source

    dispose

    fn dispose(self: &Self)
    

    Disposes the tray icon (removing it from the tray area).

    Source

    to_disposable

    fn to_disposable(self: &Self) -> Rc<dyn IDisposable>
    

    The tray icon viewed as a disposable.

    Source

    Trait implementations

    Availability

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