Trait conrod::widget::scroll::Axis [] [src]

pub trait Axis {
    fn parallel_range(Rect) -> Range;
    fn perpendicular_range(Rect) -> Range;
    fn padding_range(Padding) -> Range;
    fn mouse_scalar(mouse_xy: Point) -> Scalar;
    fn offset_direction() -> Scalar;
}

Methods for distinguishing behaviour between both scroll axes at compile-time.

Required Methods

The range of the given Rect that is parallel with this Axis.

The range of the given Rect that is perpendicular with this Axis.

Given some rectangular Padding, return the Range that corresponds with this Axis.

The coordinate of the given mouse position that corresponds with this Axis.

A Scalar multiplier representing the direction in which positive offset shifts the scrollable_range (either -1.0 or `1.0).

Implementors