Trait kas::HasScrollBars
source · pub trait HasScrollBars {
// Required methods
fn get_mode(&self) -> ScrollBarMode;
fn set_mode(&mut self, mode: ScrollBarMode) -> Action;
fn get_visible_bars(&self) -> (bool, bool);
fn set_visible_bars(&mut self, bars: (bool, bool)) -> Action;
// Provided methods
fn with_auto_bars(self) -> Self
where Self: Sized { ... }
fn with_fixed_bars(self, horiz: bool, vert: bool) -> Self
where Self: Sized { ... }
fn with_invisible_bars(self, horiz: bool, vert: bool) -> Self
where Self: Sized { ... }
}
Expand description
Scroll bar control
Required Methods§
sourcefn get_mode(&self) -> ScrollBarMode
fn get_mode(&self) -> ScrollBarMode
Get mode
sourcefn set_mode(&mut self, mode: ScrollBarMode) -> Action
fn set_mode(&mut self, mode: ScrollBarMode) -> Action
Set mode
sourcefn get_visible_bars(&self) -> (bool, bool)
fn get_visible_bars(&self) -> (bool, bool)
Get currently visible bars
Returns (horiz, vert)
tuple.
sourcefn set_visible_bars(&mut self, bars: (bool, bool)) -> Action
fn set_visible_bars(&mut self, bars: (bool, bool)) -> Action
Set enabled bars without adjusting mode
Note: if mode is Auto
this has no effect.
This requires a Action::RESIZE
.
Provided Methods§
sourcefn with_auto_bars(self) -> Selfwhere
Self: Sized,
fn with_auto_bars(self) -> Selfwhere
Self: Sized,
Set auto mode (inline)
sourcefn with_fixed_bars(self, horiz: bool, vert: bool) -> Selfwhere
Self: Sized,
fn with_fixed_bars(self, horiz: bool, vert: bool) -> Selfwhere
Self: Sized,
Set fixed bars (inline)
sourcefn with_invisible_bars(self, horiz: bool, vert: bool) -> Selfwhere
Self: Sized,
fn with_invisible_bars(self, horiz: bool, vert: bool) -> Selfwhere
Self: Sized,
Set invisible bars (inline)