pub struct SinglePagerState {
pub area: Rect,
pub widget_area: Rect,
pub scroll_area: Rect,
pub prev_area: Rect,
pub next_area: Rect,
pub layout: PageLayout,
pub page: usize,
pub c_focus: ContainerFlag,
pub mouse: MouseFlagsN,
}Fields§
§area: RectFull area. read only renewed with each render.
widget_area: RectArea for widgets to render.
scroll_area: RectTitle area except the page indicators. read only renewed with each render
prev_area: RectArea for prev-page indicator. read only renewed with each render.
next_area: RectArea for next-page indicator. read only renewed with each render.
layout: PageLayoutPage layout read only renewed with each render.
page: usizeCurrent page. read+write
c_focus: ContainerFlagThis widget has no focus of its own, but this flag can be used to set a container state.
mouse: MouseFlagsNMouse
Implementations§
source§impl SinglePagerState
impl SinglePagerState
pub fn new() -> Self
sourcepub fn relocate_handle(&self, handle: AreaHandle) -> Option<Rect>
pub fn relocate_handle(&self, handle: AreaHandle) -> Option<Rect>
Relocate an area by handle from Layout coordinates to screen coordinates.
A result None indicates that the area is out of view.
sourcepub fn relocate(&self, area: Rect) -> Option<Rect>
pub fn relocate(&self, area: Rect) -> Option<Rect>
Relocate a rect from Layout coordinates to screen coordinates.
A result None indicates that the area is out of view.
sourcepub fn show_handle(&mut self, handle: AreaHandle)
pub fn show_handle(&mut self, handle: AreaHandle)
Show the page for this rect.
sourcepub fn first_area(&self, page: usize) -> Option<Rect>
pub fn first_area(&self, page: usize) -> Option<Rect>
First area for the page. This only returns a value if the page is visible. Use PageLayout::first_area if you want something else.
sourcepub fn first_handle(&self, page: usize) -> Option<AreaHandle>
pub fn first_handle(&self, page: usize) -> Option<AreaHandle>
First handle for the page. This returns the first handle for the page. Does not check whether the connected area is visible.
Trait Implementations§
source§impl Clone for SinglePagerState
impl Clone for SinglePagerState
source§fn clone(&self) -> SinglePagerState
fn clone(&self) -> SinglePagerState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SinglePagerState
impl Debug for SinglePagerState
source§impl Default for SinglePagerState
impl Default for SinglePagerState
source§fn default() -> SinglePagerState
fn default() -> SinglePagerState
source§impl HandleEvent<Event, MouseOnly, PagerOutcome> for SinglePagerState
impl HandleEvent<Event, MouseOnly, PagerOutcome> for SinglePagerState
source§impl HandleEvent<Event, Regular, PagerOutcome> for SinglePagerState
impl HandleEvent<Event, Regular, PagerOutcome> for SinglePagerState
Auto Trait Implementations§
impl !Freeze for SinglePagerState
impl !RefUnwindSafe for SinglePagerState
impl !Send for SinglePagerState
impl !Sync for SinglePagerState
impl Unpin for SinglePagerState
impl !UnwindSafe for SinglePagerState
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more