Skip to main content

ScreenProp

Enum ScreenProp 

Source
pub enum ScreenProp {
Show 21 variants Title(Option<Arc<str>>), HeaderVisible(bool), HidesBottomBarWhenPushed(bool), HeaderLargeTitle(bool), HeaderTransparent(bool), HeaderShadowVisible(bool), HeaderTitleAlign(HeaderTitleAlign), HeaderBackgroundOnScroll(bool), HeaderBackTitle(Option<Arc<str>>), HeaderRightSystemItem(Option<HeaderSystemItem>), HeaderLeftSystemItem(Option<HeaderSystemItem>), HeaderRightSymbol(Option<Arc<str>>), HeaderLeftSymbol(Option<Arc<str>>), HeaderRightItems(Vec<HeaderItem>), HeaderLeftItems(Vec<HeaderItem>), HeaderBackVisible(bool), PopOnSwipe(bool), PopOnBack(bool), Animation(ScreenAnimation), StatusBar(Option<StatusBarSetting>), Orientations(u8),
}
Expand description

A screen option (<NavPage title headerVisible ...>).

Variants§

§

Title(Option<Arc<str>>)

title: the header’s title (iOS and Android: the system header; ignored on the desktops and the web, which show the app’s header).

§

HeaderVisible(bool)

headerVisible: the system header shows (default true; iOS and Android).

§

HidesBottomBarWhenPushed(bool)

hidesBottomBarWhenPushed: the system tab bar leaves while this page is on top, moving with the transition (iOS and Android).

§

HeaderLargeTitle(bool)

headerLargeTitle (iOS: the system header; ignored elsewhere): a large title; the content scrolls under the header.

§

HeaderTransparent(bool)

headerTransparent: the content extends under the system header (iOS and Android).

§

HeaderShadowVisible(bool)

headerShadowVisible (iOS: the system header; Android’s has none): the hairline under the header. Off, the bar has no shadow line, as iOS 26’s own bars.

§

HeaderTitleAlign(HeaderTitleAlign)

headerTitleAlign (Android: the system header): where the title sits, "left" (the default) or "center". iOS’s system bar always centers the title and ignores the value; the desktops and the web draw no native header.

§

HeaderBackgroundOnScroll(bool)

headerBackgroundOnScroll (iOS: the system header; ignored elsewhere): with headerTransparent, the header stays clear while the content rests at its top and shows its background once the content scrolls under it, as UIKit’s own bars do.

§

HeaderBackTitle(Option<Arc<str>>)

headerBackTitle (iOS: the system header; ignored elsewhere): the label of the back button leading back to this page.

§

HeaderRightSystemItem(Option<HeaderSystemItem>)

ios={{ headerRightSystemItem }}: UIKit’s own bar button in the system header’s trailing slot, in place of the view of headerRight; a press on it is a press on the first pressable view of headerRight. Without a headerRight, nothing is drawn there.

§

HeaderLeftSystemItem(Option<HeaderSystemItem>)

ios={{ headerLeftSystemItem }}: as headerRightSystemItem, in the leading slot, pressing the first pressable view of headerLeft.

§

HeaderRightSymbol(Option<Arc<str>>)

ios={{ headerRightSymbol }}: UIKit’s own bar button showing the SF Symbol of that name ("slider.horizontal.3") in the trailing slot, in place of the view of headerRight; a press on it is a press on the first pressable view of headerRight. headerRightSystemItem wins over it; an unknown name draws the view of headerRight.

§

HeaderLeftSymbol(Option<Arc<str>>)

ios={{ headerLeftSymbol }}: as headerRightSymbol, in the leading slot, pressing the first pressable view of headerLeft.

§

HeaderRightItems(Vec<HeaderItem>)

ios={{ headerRightItems }}: the trailing UIKit bar buttons, first at the trailing edge; a non-empty list wins over headerRightSystemItem / headerRightSymbol and leaves headerRight’s views out of the iOS bar (they stay the fallback on other platforms). An empty list is unset. A press without a menu, or a menu action, reports the root’s onMenu with the item’s id (its onPress / onSelect).

§

HeaderLeftItems(Vec<HeaderItem>)

ios={{ headerLeftItems }}: as headerRightItems, the leading UIKit bar buttons, first at the leading edge, after the back button when one shows; a non-empty list wins over headerLeftSystemItem / headerLeftSymbol and leaves headerLeft’s views out of the iOS bar.

§

HeaderBackVisible(bool)

headerBackVisible: the system header’s back button shows (default true; iOS and Android).

§

PopOnSwipe(bool)

popOnSwipe: the interactive back gesture pops (iOS swipe back, Android predictive back following the finger); the back buttons pop either way (default true).

§

PopOnBack(bool)

popOnBack: the user leaves the page with the back buttons (header, Android back, the desktops’ back keys and mouse button, the browser’s back) and the swipe back (default true). False keeps it, e.g. to confirm discarding changes in onBackPress (called on every back press) and then pop(). Decided natively when the system asks, so set it before the user acts.

§

Animation(ScreenAnimation)

animation: how the page enters and leaves.

§

StatusBar(Option<StatusBarSetting>)

statusBar: what the status bar shows while the page or dialog is up (iOS and Android; ignored on the desktops and the web), as a view controller’s preferredStatusBarStyle decides it on iOS. The most recently shown page or dialog wins, field by field, over the pages below it and over the app’s default (nsh.json statusBar). Pages and dialogs share it.

§

Orientations(u8)

ios={{ supportedOrientations }} / android={{ supportedOrientations }}: the orientations the screen may take while the page is shown (default: the app’s). Of the pages in the tree and displayed (not under display: none, as a tab not shown is), the most recently shown one with a setting decides; the core sends the result as Command::Orientations.

crate::ModalConfig::PORTRAIT bits.

Trait Implementations§

Source§

impl Clone for ScreenProp

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 ScreenProp

Source§

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

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

impl HostProps for ScreenProp

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 ScreenProp

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 ScreenProp

Auto Trait Implementations§

§

impl !RefUnwindSafe for ScreenProp

§

impl !UnwindSafe for ScreenProp

§

impl Forget for ScreenProp

§

impl Freeze for ScreenProp
where *const ArcInner<str> is !null: Freeze, PhantomData<ArcInner<str>>: Freeze, *const u8 is !null: Freeze, PhantomData<HeaderItem>: Freeze,

§

impl Move for ScreenProp

§

impl Send for ScreenProp
where Arc<str>: Send, RawVecInner: Send, Arc<dyn AsRef<[u8]> + Send + Sync>: Send, Arc<Rgba>: Send,

§

impl Sync for ScreenProp
where Arc<str>: Sync, RawVecInner: Sync, Arc<dyn AsRef<[u8]> + Send + Sync>: Sync, Arc<Rgba>: Sync,

§

impl Unpin for ScreenProp
where Arc<str>: Unpin, *const u8 is !null: Unpin, Arc<dyn AsRef<[u8]> + Send + Sync>: Unpin, Arc<Rgba>: Unpin,

§

impl UnsafeUnpin for ScreenProp

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.