Trait nannou::ui::widget::scrollbar::Axis[][src]

pub trait Axis: Axis {
    pub fn track_rect(container: Rect, thickness: f64) -> Rect;
pub fn handle_rect(
        perpendicular_track_range: Range,
        handle_range: Range
    ) -> Rect;
pub fn scroll_state(widget: &Container) -> Option<&State<Self>>;
pub fn default_x_dimension(
        scrollbar: &Scrollbar<Self>,
        ui: &Ui
    ) -> Dimension;
pub fn default_y_dimension(
        scrollbar: &Scrollbar<Self>,
        ui: &Ui
    ) -> Dimension;
pub fn to_2d(scalar: f64) -> [f64; 2]; }

The axis that is scrolled by the Scrollbar.

Required methods

pub fn track_rect(container: Rect, thickness: f64) -> Rect[src]

The Rect for a scroll “track” with the given thickness for a container with the given Rect.

pub fn handle_rect(
    perpendicular_track_range: Range,
    handle_range: Range
) -> Rect
[src]

The Rect for a scroll handle given both Ranges.

pub fn scroll_state(widget: &Container) -> Option<&State<Self>>[src]

Retrieve the related scroll::State for the axis from a given widget container.

pub fn default_x_dimension(scrollbar: &Scrollbar<Self>, ui: &Ui) -> Dimension[src]

Determine a default x dimension for the scrollbar in the case that no specific width is given.

pub fn default_y_dimension(scrollbar: &Scrollbar<Self>, ui: &Ui) -> Dimension[src]

Determine a default y dimension for the scrollbar in the case that no specific height is given.

pub fn to_2d(scalar: f64) -> [f64; 2][src]

Convert a given Scalar along the axis into two dimensions.

Loading content...

Implementors

impl Axis for X[src]

impl Axis for Y[src]

Loading content...