Page
struct · ferroui-controls · v0.5.0
struct Page
Abstract base class for all page types.
Members
TYPEto_refon_navigated_toon_navigating_fromon_navigated_fromon_system_back_button_pressedupdate_content_safe_area_paddingupdate_active_pagesafe_area_padding_propertyheader_propertyheader_template_propertyicon_propertyicon_template_propertycurrent_page_propertyis_in_navigation_page_propertynavigation_propertypage_navigation_system_back_button_pressed_eventconstructheaderset_headerheader_templateset_header_templateiconset_iconicon_templateset_icon_templatesafe_area_paddingset_safe_area_paddingcurrent_pageset_current_pagenavigationset_navigationis_in_navigation_pageset_is_in_navigation_pagepage_navigation_system_back_button_pressednavigated_tonavigatingnavigated_from
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<Page>
Returns a strong reference to this object.
on_navigated_to
fn on_navigated_to(self: &Self, args: &NavigatedToEventArgs)
Called when the page has been navigated to.
on_navigating_from
fn on_navigating_from(self: &Self, args: &NavigatingFromEventArgs)
Called when the page is about to be navigated from.
Setting the cancel flag of the args here prevents the
Navigating asynchronous handlers from running and aborts the
navigation. This method is called before the Navigating event.
on_navigated_from
fn on_navigated_from(self: &Self, args: &NavigatedFromEventArgs)
Called when the page has been navigated from.
on_system_back_button_pressed
fn on_system_back_button_pressed(self: &Self) -> bool
Called when the system back button is pressed. Returns true if the back press was handled.
update_content_safe_area_padding
fn update_content_safe_area_padding(self: &Self)
Called when the safe-area padding changes.
update_active_page
fn update_active_page(self: &Self)
Called when the active child page changes.
safe_area_padding_property
fn safe_area_padding_property() -> &'static StyledProperty<Thickness>
Defines the SafeAreaPadding property.
header_property
fn header_property() -> &'static StyledProperty<Option<BoxedValue>>
Defines the Header property.
header_template_property
fn header_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
Defines the HeaderTemplate property.
icon_property
fn icon_property() -> &'static StyledProperty<Option<BoxedValue>>
Defines the Icon property.
icon_template_property
fn icon_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
Defines the IconTemplate property.
current_page_property
fn current_page_property() -> &'static StyledProperty<Option<Ref<Page>>>
Defines the CurrentPage property.
is_in_navigation_page_property
fn is_in_navigation_page_property() -> &'static StyledProperty<bool>
Defines the IsInNavigationPage property.
navigation_property
fn navigation_property() -> &'static DirectProperty<Page, Option<Rc<dyn INavigation>>>
Defines the Navigation property.
page_navigation_system_back_button_pressed_event
fn page_navigation_system_back_button_pressed_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the routed event raised when the system back button is pressed.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
header
fn header(self: &Self) -> Option<BoxedValue>
The header content displayed in the navigation bar or tab strip.
set_header
fn set_header(self: &Self, value: Option<BoxedValue>)
header_template
fn header_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
The data template used to display the header.
set_header_template
fn set_header_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
icon
fn icon(self: &Self) -> Option<BoxedValue>
The icon displayed alongside the page header.
set_icon
fn set_icon(self: &Self, value: Option<BoxedValue>)
icon_template
fn icon_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
The data template used to display the icon.
set_icon_template
fn set_icon_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
safe_area_padding
fn safe_area_padding(self: &Self) -> Thickness
The safe-area padding applied to this page's content.
set_safe_area_padding
fn set_safe_area_padding(self: &Self, value: Thickness)
current_page
fn current_page(self: &Self) -> Option<Ref<Page>>
The currently active child page.
set_current_page
fn set_current_page(self: &Self, value: impl Into<Nullable<Page>>)
navigation
fn navigation(self: &Self) -> Option<Rc<dyn INavigation>>
The navigation service provided by the parent navigation page.
set_navigation
fn set_navigation(self: &Self, value: Option<Rc<dyn INavigation>>)
is_in_navigation_page
fn is_in_navigation_page(self: &Self) -> bool
Whether this page is currently hosted inside a navigation page.
set_is_in_navigation_page
fn set_is_in_navigation_page(self: &Self, value: bool)
page_navigation_system_back_button_pressed
fn page_navigation_system_back_button_pressed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Raised when the system back button is pressed while this page is active.
navigated_to
fn navigated_to(self: &Self, handler: impl Fn(&NavigatedToEventArgs) -> () + 'static) -> Subscription
Occurs when the page has been navigated to.
Dropping the returned guard removes the handler;
Subscription::detach keeps it for the life of the page.
navigating
fn navigating(self: &Self, handler: impl Fn(&NavigatingFromEventArgs) -> NavigatingTask + 'static) -> Subscription
Occurs when the page is about to be navigated from.
Each subscriber is awaited in turn. Set the cancel flag of the args to abort the navigation; remaining subscribers are not invoked once cancellation is requested. If a subscriber panics, the panic propagates to the task of the calling navigation method (such as the push of a navigation page) and the navigation is aborted.
Dropping the returned guard removes the handler;
Subscription::detach keeps it for the life of the page.
navigated_from
fn navigated_from(self: &Self, handler: impl Fn(&NavigatedFromEventArgs) -> () + 'static) -> Subscription
Occurs when the page has been navigated from.
Dropping the returned guard removes the handler;
Subscription::detach keeps it for the life of the page.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtControlImplExtPageImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<Page>StaticTypeObjectTypeSubclassable<T>StyledElementImplVisualImplLayoutableImplInteractiveImplInputElementImplTemplatedControlImplFerroObjectImplControlImplPageImplIHeadered
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.