pub struct SinglePagerState {
pub area: Rect,
pub widget_area: Rect,
pub scroll_area: Rect,
pub prev_area: Rect,
pub next_area: Rect,
pub layout: PagerLayout,
pub page: usize,
pub c_focus: ContainerFlag,
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_area: RectArea inside the border. read only renewed for each 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: PagerLayoutPage 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
non_exhaustive: NonExhaustiveOnly construct with ..Default::default().
Implementations§
Source§impl SinglePagerState
impl SinglePagerState
pub fn new() -> Self
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_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
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 moreSource§impl Debug for SinglePagerState
impl Debug for SinglePagerState
Source§impl Default for SinglePagerState
impl Default for 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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
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>
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