pub struct PageNavigationState {
pub area: Rect,
pub widget_areas: Vec<Rect>,
pub prev_area: Rect,
pub next_area: Rect,
pub page: usize,
pub page_inc: usize,
pub page_count: usize,
pub container: FocusFlag,
pub mouse: MouseFlagsN,
pub non_exhaustive: NonExhaustive,
}
Expand description
Widget state.
Fields§
§area: Rect
Full area for the widget. read only renewed for each render.
widget_areas: Vec<Rect>
Area for each page. read only renewed for each render.
prev_area: Rect
Area for prev-page indicator. read only renewed with each render.
next_area: Rect
Area for next-page indicator. read only renewed with each render.
page: usize
Current, left-most page. read+write
page_inc: usize
Increment by n when navigating. read only renewed with each render.
page_count: usize
Page count. read+write
container: FocusFlag
This widget has no focus of its own, but this flag can be used to set a container state.
mouse: MouseFlagsN
Mouse
non_exhaustive: NonExhaustive
Only construct with ..Default::default()
.
Implementations§
pub fn new() -> Self
Sourcepub fn set_page_count(&mut self, count: usize)
pub fn set_page_count(&mut self, count: usize)
Set the page count.
Sourcepub fn page_count(&self) -> usize
pub fn page_count(&self) -> usize
Page count.
Trait Implementations§
Source§fn clone(&self) -> PageNavigationState
fn clone(&self) -> PageNavigationState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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