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.
Members
new
fn new(reason: WindowCloseReason, is_programmatic: bool) -> Self
Creates the event args. Only the windowing classes raise the event.
cancel
fn cancel(self: &Self) -> bool
Whether the event should be canceled.
set_cancel
fn set_cancel(self: &Self, value: bool)
Sets whether the event should be canceled.
close_reason
fn close_reason(self: &Self) -> WindowCloseReason
Gets a value that indicates why the window is being closed.
is_programmatic
fn is_programmatic(self: &Self) -> bool
Gets a value indicating whether the window is being closed programmatically.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherCloneDebugPartialEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.