TrayIcon
struct · ferroui-controls · v0.5.0
struct TrayIcon
An icon in the notification area of the platform.
Members
TYPEto_refcommand_propertycommand_parameter_propertyicons_propertymenu_propertyicon_propertytool_tip_text_propertyis_visible_propertyconstructnewclickedset_iconsget_iconscommandset_commandcommand_parameterset_command_parametermenuset_menuiconset_icontool_tip_textset_tool_tip_textis_visibleset_is_visibledisposeto_disposable
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<TrayIcon>
Returns a strong reference to this object.
command_property
fn command_property() -> &'static StyledProperty<Option<Rc<dyn ICommand>>>
Defines the Command property.
command_parameter_property
fn command_parameter_property() -> &'static StyledProperty<Option<BoxedValue>>
Defines the CommandParameter property.
icons_property
fn icons_property() -> &'static AttachedProperty<Option<Rc<TrayIcons>>>
Defines the Icons attached property.
menu_property
fn menu_property() -> &'static StyledProperty<Option<Ref<NativeMenu>>>
Defines the Menu property.
icon_property
fn icon_property() -> &'static StyledProperty<Option<Rc<WindowIcon>>>
Defines the Icon property.
tool_tip_text_property
fn tool_tip_text_property() -> &'static StyledProperty<Option<String>>
Defines the ToolTipText property.
is_visible_property
fn is_visible_property() -> &'static StyledProperty<bool>
Defines the IsVisible property.
construct
fn construct() -> Self
Creates the class data; see FerroObject::construct.
new
fn new() -> Ref<Self>
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.
set_icons
fn set_icons(o: &Application, tray_icons: Option<Rc<TrayIcons>>)
Sets the tray icons of the application.
get_icons
fn get_icons(o: &Application) -> Option<Rc<TrayIcons>>
Gets the tray icons of the application.
command
fn command(self: &Self) -> Option<Rc<dyn ICommand>>
Gets the Command property of a TrayIcon.
set_command
fn set_command(self: &Self, value: Option<Rc<dyn ICommand>>)
command_parameter
fn command_parameter(self: &Self) -> Option<BoxedValue>
Gets the parameter to pass to the Command property of a
TrayIcon.
set_command_parameter
fn set_command_parameter(self: &Self, value: Option<BoxedValue>)
menu
fn menu(self: &Self) -> Option<Ref<NativeMenu>>
Gets the Menu of the TrayIcon.
set_menu
fn set_menu(self: &Self, value: Option<Ref<NativeMenu>>)
icon
fn icon(self: &Self) -> Option<Rc<WindowIcon>>
Gets the icon of the TrayIcon.
set_icon
fn set_icon(self: &Self, value: Option<Rc<WindowIcon>>)
tool_tip_text
fn tool_tip_text(self: &Self) -> Option<String>
Gets the tooltip text of the TrayIcon.
set_tool_tip_text
fn set_tool_tip_text(self: &Self, value: Option<String>)
is_visible
fn is_visible(self: &Self) -> bool
Gets the visibility of the TrayIcon.
set_is_visible
fn set_is_visible(self: &Self, value: bool)
dispose
fn dispose(self: &Self)
Disposes the tray icon (removing it from the tray area).
to_disposable
fn to_disposable(self: &Self) -> Rc<dyn IDisposable>
The tray icon viewed as a disposable.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<TrayIcon>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.