Trait nannou::ui::prelude::widget::scroll::Axis[][src]

pub trait Axis {
    pub fn parallel_range(Rect) -> Range;
pub fn perpendicular_range(Rect) -> Range;
pub fn padding_range(Padding) -> Range;
pub fn mouse_scalar(mouse_xy: [f64; 2]) -> f64;
pub fn offset_direction() -> f64; }

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

Required methods

pub fn parallel_range(Rect) -> Range[src]

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

pub fn perpendicular_range(Rect) -> Range[src]

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

pub fn padding_range(Padding) -> Range[src]

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

pub fn mouse_scalar(mouse_xy: [f64; 2]) -> f64[src]

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

pub fn offset_direction() -> f64[src]

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

Loading content...

Implementors

impl Axis for X[src]

impl Axis for Y[src]

Loading content...