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

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

Loading content...

Implementors

Loading content...