Skip to main content

ScreenConfig

Struct ScreenConfig 

Source
pub struct ScreenConfig {
Show 27 fields pub title: Option<Arc<str>>, pub header_visible: bool, pub large_title: bool, pub header_transparent: bool, pub header_shadow_visible: bool, pub title_align: HeaderTitleAlign, pub header_background_on_scroll: bool, pub hides_bottom_bar_when_pushed: bool, pub tint_color: Option<Color>, pub background_color: Option<Color>, pub title_color: Option<Color>, pub back_title: Option<Arc<str>>, pub back_visible: bool, pub gesture_enabled: bool, pub prevent_back: bool, pub animation: ScreenAnimation, pub left: Option<NodeId>, pub right: Option<NodeId>, pub right_system_item: Option<HeaderSystemItem>, pub right_symbol: Option<Arc<str>>, pub left_system_item: Option<HeaderSystemItem>, pub left_symbol: Option<Arc<str>>, pub right_items: Vec<HeaderItem>, pub left_items: Vec<HeaderItem>, pub title_view: Option<NodeId>, pub header_view: Option<NodeId>, pub header_height: Points,
}
Expand description

Options of a screen: its header and transitions.

The header options are the native header’s (iOS, Android); a platform without one (NO_NATIVE_HEADER) reads only header_view, header_height, prevent_back, gesture_enabled and animation.

Fields§

§title: Option<Arc<str>>

Title in the header.

§header_visible: bool

Show the native header.

§large_title: bool

Large title (iOS; the content scrolls under the header).

§header_transparent: bool

The content extends under the header.

§header_shadow_visible: bool

The hairline under the header (iOS).

§title_align: HeaderTitleAlign

Where the title sits (Android; iOS’s system bar always centers it and ignores this).

§header_background_on_scroll: bool

A transparent header shows its background once the content scrolls under it (iOS).

§hides_bottom_bar_when_pushed: bool

The system tab bar leaves while this page is on top.

§tint_color: Option<Color>

Color of the back button and bar buttons.

§background_color: Option<Color>

Header background.

§title_color: Option<Color>

Title color.

§back_title: Option<Arc<str>>

Label of the back button leading back to this screen.

§back_visible: bool

Show the back button.

§gesture_enabled: bool

The interactive back gesture (iOS swipe back, Android predictive back following the finger) is on; the back button pops either way (popOnSwipe).

§prevent_back: bool

The user cannot leave the screen (popOnBack false: no swipe, the back buttons do not pop): answered by the platform when the system asks, without JS. Every back press sends crate::EventKind::BackRequest either way.

§animation: ScreenAnimation

Push / pop transition.

§left: Option<NodeId>

Leading header item view.

§right: Option<NodeId>

Trailing header item view.

§right_system_item: Option<HeaderSystemItem>

UIKit’s own bar button in the trailing slot instead of right’s view (iOS); a press on it presses right’s first pressable view.

§right_symbol: Option<Arc<str>>

UIKit’s own bar button showing this SF Symbol in the trailing slot instead of right’s view (iOS); right_system_item wins over it.

§left_system_item: Option<HeaderSystemItem>

As right_system_item, in the leading slot, pressing left.

§left_symbol: Option<Arc<str>>

As right_symbol, in the leading slot, pressing left.

§right_items: Vec<HeaderItem>

Trailing UIKit bar buttons (ios={{ headerRightItems }}); a non-empty list wins over right_system_item / right_symbol and leaves right’s view out of the iOS bar. Empty is unset.

§left_items: Vec<HeaderItem>

As right_items, the leading bar buttons (ios={{ headerLeftItems }}), over left_system_item / left_symbol and left’s view.

§title_view: Option<NodeId>

Custom title view.

§header_view: Option<NodeId>

The app’s header (header): on a platform without a native header (NO_NATIVE_HEADER), a view at the top of the screen whose frame the core sets (as wide as the screen, as tall as it lays out), above the content.

§header_height: Points

Height of the header area at the top of the screen, as the core laid the content out below it: the native header’s (status bar included), or the header view’s without a native header.

Trait Implementations§

Source§

impl Clone for ScreenConfig

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 ScreenConfig

Source§

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

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

impl Default for ScreenConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ScreenConfig

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 ScreenConfig

Auto Trait Implementations§

§

impl !RefUnwindSafe for ScreenConfig

§

impl !UnwindSafe for ScreenConfig

§

impl Forget for ScreenConfig

§

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

§

impl Move for ScreenConfig

§

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

§

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

§

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

§

impl UnsafeUnpin for ScreenConfig

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.