FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    WindowClosingEventArgs

    struct · ferroui-controls · v0.5.0

    struct WindowClosingEventArgs
    

    Provides data for the window closing event.

    The args are a reference object: a copy shares the cancel flag with the args it was made from, so that a handler given a copy cancels the closing, and copies compare by identity.

    View source

    Members

    new

    fn new(reason: WindowCloseReason, is_programmatic: bool) -> Self
    

    Creates the event args. Only the windowing classes raise the event.

    Source

    cancel

    fn cancel(self: &Self) -> bool
    

    Whether the event should be canceled.

    Source

    set_cancel

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

    Sets whether the event should be canceled.

    Source

    close_reason

    fn close_reason(self: &Self) -> WindowCloseReason
    

    Gets a value that indicates why the window is being closed.

    Source

    is_programmatic

    fn is_programmatic(self: &Self) -> bool
    

    Gets a value indicating whether the window is being closed programmatically.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • PartialEq

    Availability

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