pub struct PageNavigationState {
pub area: Rect,
pub widget_areas: Vec<Rect>,
pub prev_area: Rect,
pub next_area: Rect,
pub page: usize,
pub page_count: usize,
pub container: FocusFlag,
pub mouse: MouseFlagsN,
pub non_exhaustive: NonExhaustive,
}Expand description
Widget state.
Fields§
§area: RectFull 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: RectArea for prev-page indicator. read only renewed with each render.
next_area: RectArea for next-page indicator. read only renewed with each render.
page: usizeCurrent, left-most page. read+write
page_count: usizePage count. read+write
container: FocusFlagThis widget has no focus of its own, but this flag can be used to set a container state.
mouse: MouseFlagsNMouse
non_exhaustive: NonExhaustiveOnly 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 copy 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