pub enum ButtonOrder {
PrimaryLast,
PrimaryFirst,
}Expand description
The order of a dialog’s buttons along its footer, as the platform has it.
Variants§
PrimaryLast
The primary button at the end, Cancel before it, a secondary action apart at the start: “Don’t save … Cancel Save” (macOS, GNOME).
PrimaryFirst
The primary button first, then the secondary, then Cancel: “Save Don’t save Cancel” (Windows, KDE Plasma).
Implementations§
Source§impl ButtonOrder
impl ButtonOrder
Sourcepub fn platform() -> Self
pub fn platform() -> Self
The order of this platform: Windows’ and Plasma’s
(ButtonOrder::PrimaryFirst), else macOS’s and GNOME’s.
Sourcepub fn pin(ctx: &Context, order: ButtonOrder)
pub fn pin(ctx: &Context, order: ButtonOrder)
Gives every dialog drawn in ctx this order, unless its own says
(Confirm::order), in place of ButtonOrder::platform: a
test’s, so that its pictures and its keyboard walks are the same
on every platform.
Sourcepub fn of(ctx: &Context) -> Self
pub fn of(ctx: &Context) -> Self
The order of the dialogs drawn in ctx: the one pinned
there, else the platform’s.
Sourcepub fn for_platform(windows: bool, desktop: &str) -> Self
pub fn for_platform(windows: bool, desktop: &str) -> Self
The order on Windows (windows) or on a desktop
(XDG_CURRENT_DESKTOP, as KDE or GNOME:Ubuntu).
Trait Implementations§
Source§impl Clone for ButtonOrder
impl Clone for ButtonOrder
Source§fn clone(&self) -> ButtonOrder
fn clone(&self) -> ButtonOrder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ButtonOrder
impl Debug for ButtonOrder
Source§impl PartialEq for ButtonOrder
impl PartialEq for ButtonOrder
Source§impl Serialize for ButtonOrder
impl Serialize for ButtonOrder
impl Copy for ButtonOrder
impl Eq for ButtonOrder
impl StructuralPartialEq for ButtonOrder
Auto Trait Implementations§
impl Freeze for ButtonOrder
impl RefUnwindSafe for ButtonOrder
impl Send for ButtonOrder
impl Sync for ButtonOrder
impl Unpin for ButtonOrder
impl UnsafeUnpin for ButtonOrder
impl UnwindSafe for ButtonOrder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more