Trait conrod::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

fn parallel_range(Rect) -> Range

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

fn perpendicular_range(Rect) -> Range

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

fn padding_range(Padding) -> Range

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

fn mouse_scalar(mouse_xy: Point) -> Scalar

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

fn offset_direction() -> Scalar

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

Implementors