pub struct ClipperState {
pub area: Rect,
pub widget_area: Rect,
pub layout: ClipperLayout,
pub hscroll: ScrollState,
pub vscroll: ScrollState,
pub c_focus: ContainerFlag,
/* private fields */
}Expand description
Clipper 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.
layout: ClipperLayoutPage layout. read only renewed for each render.
hscroll: ScrollStateHorizontal scroll read+write
vscroll: ScrollStateVertical scroll read+write
c_focus: ContainerFlagThis widget has no focus of its own, but this flag can be used to set a container state.
Implementations§
Source§impl ClipperState
impl ClipperState
pub fn new() -> Self
Sourcepub fn show_handle(&mut self, handle: AreaHandle)
pub fn show_handle(&mut self, handle: AreaHandle)
Show the area for the given handle.
Sourcepub fn first_handle(&self) -> Option<AreaHandle>
pub fn first_handle(&self) -> Option<AreaHandle>
First handle for the page. This returns the first handle for the page. Does not check whether the connected area is visible.
Sourcepub fn first_area(&self) -> Option<Box<[Rect]>>
pub fn first_area(&self) -> Option<Box<[Rect]>>
First handle for the page. This returns the first handle for the page. Does not check whether the connected area is visible.
Source§impl ClipperState
impl ClipperState
pub fn vertical_offset(&self) -> usize
pub fn set_vertical_offset(&mut self, offset: usize) -> bool
pub fn vertical_page_len(&self) -> usize
pub fn horizontal_offset(&self) -> usize
pub fn set_horizontal_offset(&mut self, offset: usize) -> bool
pub fn horizontal_page_len(&self) -> usize
pub fn horizontal_scroll_to(&mut self, pos: usize) -> bool
pub fn vertical_scroll_to(&mut self, pos: usize) -> bool
pub fn scroll_up(&mut self, delta: usize) -> bool
pub fn scroll_down(&mut self, delta: usize) -> bool
pub fn scroll_left(&mut self, delta: usize) -> bool
pub fn scroll_right(&mut self, delta: usize) -> bool
Trait Implementations§
Source§impl Clone for ClipperState
impl Clone for ClipperState
Source§fn clone(&self) -> ClipperState
fn clone(&self) -> ClipperState
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 ClipperState
impl Debug for ClipperState
Source§impl Default for ClipperState
impl Default for ClipperState
Source§fn default() -> ClipperState
fn default() -> ClipperState
Returns the “default value” for a type. Read more
Source§impl HandleEvent<Event, MouseOnly, Outcome> for ClipperState
impl HandleEvent<Event, MouseOnly, Outcome> for ClipperState
Auto Trait Implementations§
impl !Freeze for ClipperState
impl !RefUnwindSafe for ClipperState
impl !Send for ClipperState
impl !Sync for ClipperState
impl Unpin for ClipperState
impl !UnwindSafe for ClipperState
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