Trait nannou::ui::prelude::widget::list::Direction[][src]

pub trait Direction {
    type Axis: Axis;
    pub fn ranges(Rect) -> (Range, Range);
pub fn scrollbar(NodeIndex<u32>) -> Scrollbar<Self::Axis>;
pub fn common_scroll(common: &CommonBuilder) -> Option<&Scroll>;
pub fn position_item<W>(
        item_widget: W,
        last_id: Option<NodeIndex<u32>>,
        scroll_trigger_id: NodeIndex<u32>,
        first_item_margin: f64
    ) -> W
    where
        W: Widget
;
pub fn position_scroll_trigger<W>(
        scroll_trigger: W,
        list: NodeIndex<u32>
    ) -> W
    where
        W: Widget
;
pub fn scroll_list_kids<S>(list: List<Self, S>) -> List<Self, S>
    where
        S: ItemSize
;
pub fn size_breadth<W>(widget: W, breadth: f64) -> W
    where
        W: Widget
;
pub fn size_length<W>(widget: W, length: f64) -> W
    where
        W: Widget
; }

The direction in which the list is laid out.

Associated Types

type Axis: Axis[src]

The direction along which the Scrollbar is laid out.

Loading content...

Required methods

pub fn ranges(Rect) -> (Range, Range)[src]

For some given Rect, returns the parallel and perpendicular ranges respectively.

pub fn scrollbar(NodeIndex<u32>) -> Scrollbar<Self::Axis>[src]

Begin building the scrollbar for the List.

pub fn common_scroll(common: &CommonBuilder) -> Option<&Scroll>[src]

Borrow the scroll state associated with this Direction’s axis.

pub fn position_item<W>(
    item_widget: W,
    last_id: Option<NodeIndex<u32>>,
    scroll_trigger_id: NodeIndex<u32>,
    first_item_margin: f64
) -> W where
    W: Widget
[src]

Positions the given widget.

pub fn position_scroll_trigger<W>(scroll_trigger: W, list: NodeIndex<u32>) -> W where
    W: Widget
[src]

Position the Rectangle used for scrolling Lists with fixed Item sizes.

pub fn scroll_list_kids<S>(list: List<Self, S>) -> List<Self, S> where
    S: ItemSize
[src]

Calls the suitable scroll_kids_<axis> method on the List.

pub fn size_breadth<W>(widget: W, breadth: f64) -> W where
    W: Widget
[src]

Size the widget given its breadth.

pub fn size_length<W>(widget: W, length: f64) -> W where
    W: Widget
[src]

Size the widget given its length.

Loading content...

Implementors

impl Direction for Down[src]

type Axis = Y

impl Direction for Left[src]

type Axis = X

impl Direction for Right[src]

type Axis = X

impl Direction for Up[src]

type Axis = Y

Loading content...