[][src]Trait conrod_core::widget::scrollbar::Axis

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

The axis that is scrolled by the Scrollbar.

Required methods

fn track_rect(container: Rect, thickness: Scalar) -> Rect

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

fn handle_rect(perpendicular_track_range: Range, handle_range: Range) -> Rect

The Rect for a scroll handle given both Ranges.

fn scroll_state(widget: &Container) -> Option<&State<Self>>

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

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

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

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

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

fn to_2d(scalar: Scalar) -> [Scalar; 2]

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...