pub struct DualPagerState {
pub area: Rect,
pub widget_area1: Rect,
pub widget_area2: 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_area1: RectArea for widgets to render.
widget_area2: Rect§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 DualPagerState
impl DualPagerState
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 DualPagerState
impl Clone for DualPagerState
source§fn clone(&self) -> DualPagerState
fn clone(&self) -> DualPagerState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for DualPagerState
impl Debug for DualPagerState
source§impl Default for DualPagerState
impl Default for DualPagerState
source§fn default() -> DualPagerState
fn default() -> DualPagerState
source§impl HandleEvent<Event, MouseOnly, PagerOutcome> for DualPagerState
impl HandleEvent<Event, MouseOnly, PagerOutcome> for DualPagerState
source§impl HandleEvent<Event, Regular, PagerOutcome> for DualPagerState
impl HandleEvent<Event, Regular, PagerOutcome> for DualPagerState
Auto Trait Implementations§
impl !Freeze for DualPagerState
impl !RefUnwindSafe for DualPagerState
impl !Send for DualPagerState
impl !Sync for DualPagerState
impl Unpin for DualPagerState
impl !UnwindSafe for DualPagerState
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