Skip to main content

ModalProp

Enum ModalProp 

Source
pub enum ModalProp {
    Animation(ModalAnimation),
    Presentation(ModalPresentation),
    StatusBarTranslucent(bool),
    Orientations(u8),
    CloseOnEscape(bool),
    CloseOnBackdropPress(bool),
    CloseOnSwipe(bool),
    Detents(Vec<SheetDetent>),
    Detent(Option<SheetDetent>),
    DefaultDetent(Option<SheetDetent>),
    Grabber(bool),
    LargestUndimmedDetent(Option<SheetDetent>),
}
Expand description

A modal option (<Dialog …>).

Variants§

§

Animation(ModalAnimation)

animation: how the dialog appears. Pages and dialogs share the name, so JS’s value arrives as ScreenProp::Animation, which the core takes for this on a dialog.

§

Presentation(ModalPresentation)

presentation: "pageSheet" / "formSheet" keep what is behind visible (iOS; ignored on Android, the desktops and the web, where a dialog is a transparent layer over the window and the app’s popup and backdrop are all it shows).

§

StatusBarTranslucent(bool)

statusBarTranslucent (Android): the content reaches under the status bar (default: it starts below).

§

Orientations(u8)

supportedOrientations (iOS): the orientations it allows (default: the presenter’s).

crate::ModalConfig::PORTRAIT bits.

§

CloseOnEscape(bool)

closeOnEscape: Escape and the Android back button close it natively (default true); either way they call onCancel.

§

CloseOnBackdropPress(bool)

closeOnBackdropPress: a press on the backdrop part (backdropClass / backdropStyle, rendered by the runtime) closes it (default true); either way it calls onCancel.

§

CloseOnSwipe(bool)

closeOnSwipe: swiping a sheet down (iOS, phone browsers) closes it natively (default true); either way it calls onCancel.

§

Detents(Vec<SheetDetent>)

detents: the heights an iOS sheet (presentation "pageSheet" / "formSheet") rests at (none by default: the system’s full height). The user drags it between them, the system way; past the smallest it closes when closeOnSwipe allows. Ignored on other platforms and presentations: there, Sheet (nsh/base) rests at detents.

§

Detent(Option<SheetDetent>)

detent: the detent of detents the sheet rests at: it moves there when the value changes. The user’s moves stand even when the app does not follow them; follow onDetentChange to keep the value in step.

§

DefaultDetent(Option<SheetDetent>)

defaultDetent: the detent it opens at without detent (default the smallest).

§

Grabber(bool)

grabber: the sheet shows the system’s grabber at its top (default false); screen readers move it between detents with it.

§

LargestUndimmedDetent(Option<SheetDetent>)

largestUndimmedDetent: up to this detent of detents, what is behind the sheet is not dimmed and takes touches (default: dimmed at every detent).

Trait Implementations§

Source§

impl Clone for ModalProp

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ModalProp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl HostProps for ModalProp

Source§

fn decode<I: HostInput>( name: &str, input: &I, cx: &mut HostCx, ) -> Option<Option<Self>>

The prop JS name name sets with input: None for a name that is not one of these props, Some(None) when nothing is to be set.
Source§

fn reset(&self) -> Option<Self>

This prop at its default (what clearing it from JS sets); None for the props the runtime sets once.
Source§

fn same_kind(&self, other: &Self) -> bool

Whether self and other set the same property.
Source§

fn specs(types: &mut TsTypes, out: &mut Vec<HostPropSpec>)

The props, for the generated TypeScript.
Source§

impl PartialEq for ModalProp

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ModalProp

Auto Trait Implementations§

§

impl Forget for ModalProp

§

impl Freeze for ModalProp

§

impl Move for ModalProp

§

impl RefUnwindSafe for ModalProp

§

impl Send for ModalProp
where RawVecInner: Send,

§

impl Sync for ModalProp
where RawVecInner: Sync,

§

impl Unpin for ModalProp
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for ModalProp

§

impl UnwindSafe for ModalProp
where RawVecInner: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.