FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    WindowNotificationManager

    struct · ferroui-controls · v0.5.0

    struct WindowNotificationManager
    

    An INotificationManager that displays notifications in a window.

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

    Returns a strong reference to this object.

    Source

    position_property

    fn position_property() -> &'static StyledProperty<NotificationPosition>
    

    Defines the Position property.

    Source

    max_items_property

    fn max_items_property() -> &'static StyledProperty<i32>
    

    Defines the MaxItems property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a notification manager that is not hosted yet.

    Source

    with_host

    fn with_host(host: Option<&Ref<TopLevel>>) -> Ref<Self>
    

    Creates a notification manager hosted by host: the top-level that will host the control.

    Source

    position

    fn position(self: &Self) -> NotificationPosition
    

    Defines which corner of the screen notifications can be displayed in.

    Source

    set_position

    fn set_position(self: &Self, value: NotificationPosition)
    

    Source

    max_items

    fn max_items(self: &Self) -> i32
    

    Defines the maximum number of notifications visible at once.

    Source

    set_max_items

    fn set_max_items(self: &Self, value: i32)
    

    Source

    show

    fn show(self: &Self, content: Rc<dyn INotification>)
    

    Shows a notification.

    Source

    show_content

    fn show_content(self: &Self, content: BoxedValue)
    

    Shows a notification with the given content: a notification, or any other content, which is shown as information.

    Source

    show_with

    fn show_with(self: &Self, content: BoxedValue, type_: NotificationType, expiration: Option<Duration>, on_click: Option<Rc<dyn Fn() -> ()>>, on_close: Option<Rc<dyn Fn() -> ()>>, classes: Option<&[&str]>)
    

    Shows a notification.

    • content: the content of the notification.
    • type_: the type of the notification.
    • expiration: the expiration time of the notification after which it will automatically close (five seconds when None). If the value is zero then the notification will remain open until the user closes it.
    • on_click: an action to be run when the notification is clicked.
    • on_close: an action to be run when the notification is closed.
    • classes: style classes to apply.

    Source

    close

    fn close(self: &Self, notification: &Rc<dyn INotification>)
    

    Closes a notification.

    Source

    close_content

    fn close_content(self: &Self, content: &BoxedValue)
    

    Closes the notifications with the given content.

    Source

    close_all

    fn close_all(self: &Self)
    

    Closes all notifications.

    Source

    as_managed_notification_manager

    fn as_managed_notification_manager(self: &Self) -> Rc<dyn IManagedNotificationManager>
    

    The manager as the contract of managed notification managers.

    Source

    as_notification_manager

    fn as_notification_manager(self: &Self) -> Rc<dyn INotificationManager>
    

    The manager as the contract of notification managers.

    Source

    Trait implementations

    Availability

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