MultiPage
struct · ferroui-controls · v0.5.0
struct MultiPage
Abstract base class for pages that host a collection of child pages.
Members
TYPEto_refupdate_active_page_withpages_propertyitems_source_propertypage_template_propertyconstructpagesset_pagesitems_sourceset_items_sourcepage_templateset_page_templatecurrent_page_changedpages_changeditems_source_ofpages_items_source
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<MultiPage>
Returns a strong reference to this object.
update_active_page_with
fn update_active_page_with(self: &Self, navigation_type: NavigationType)
Called when the active child page changes.
The base class calls this method in the following situations, passing the corresponding navigation type:
NavigationType::Replace: thePagescollection was assigned, a new item was added, or the active page changed for any reason not covered below.NavigationType::Remove: the currently active page was removed from thePagescollection or the collection was reset and the active page is no longer present. Subclasses should select a replacement page.
Subclasses may also call this method directly with any navigation type appropriate for their own navigation model.
pages_property
fn pages_property() -> &'static StyledProperty<Option<PageList>>
Defines the Pages property.
items_source_property
fn items_source_property() -> &'static StyledProperty<Option<ItemsSource>>
Defines the ItemsSource property.
page_template_property
fn page_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
Defines the PageTemplate property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
pages
fn pages(self: &Self) -> Option<PageList>
Gets or sets the collection of child pages.
This control subscribes to the changes of the assigned collection. The subscription is released when a new collection is assigned or when the control is detached from the visual tree.
set_pages
fn set_pages(self: &Self, value: Option<PageList>)
items_source
fn items_source(self: &Self) -> Option<ItemsSource>
Gets or sets a view-model collection to bind to. Use together with
the page template to convert each item into a page. When set, takes
precedence over the Pages property as the item source for the
inner tab or carousel control.
set_items_source
fn set_items_source(self: &Self, value: Option<ItemsSource>)
page_template
fn page_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
Gets or sets the data template used to create pages from view-model items.
set_page_template
fn set_page_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
current_page_changed
fn current_page_changed(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
Occurs when the CurrentPage property changes.
Dropping the returned guard removes the handler;
Subscription::detach keeps it for the life of the page.
pages_changed
fn pages_changed(self: &Self, handler: impl Fn(&NotifyCollectionChangedEventArgs<'a, Ref<Page>>) -> () + 'static) -> Subscription
Occurs when the Pages collection changes.
Dropping the returned guard removes the handler;
Subscription::detach keeps it for the life of the page.
items_source_of
fn items_source_of(pages: &PageList) -> ItemsSource
The untyped items list of a collection of pages, for the items source of an items control: each page is an item boxed as a control. The same handle is returned for the same collection for as long as a handle is alive, so that assigning it twice is not a change.
pages_items_source
fn pages_items_source(self: &Self) -> Option<ItemsSource>
The value of the Pages property as the items source of an items
control. See items_source_of.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtControlImplExtPageImplExtMultiPageImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<MultiPage>StaticTypeObjectTypeSubclassable<T>StyledElementImplLayoutableImplInteractiveImplInputElementImplControlImplTemplatedControlImplFerroObjectImplDropVisualImplPageImplMultiPageImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.