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§

source

fn get_mode(&self) -> ScrollBarMode

Get mode

source

fn set_mode(&mut self, mode: ScrollBarMode) -> Action

Set mode

source

fn get_visible_bars(&self) -> (bool, bool)

Get currently visible bars

Returns (horiz, vert) tuple.

source

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§

source

fn with_auto_bars(self) -> Self
where Self: Sized,

Set auto mode (inline)

source

fn with_fixed_bars(self, horiz: bool, vert: bool) -> Self
where Self: Sized,

Set fixed bars (inline)

source

fn with_invisible_bars(self, horiz: bool, vert: bool) -> Self
where Self: Sized,

Set invisible bars (inline)

Implementors§