[][src]Trait conrod_core::widget::list::Direction

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

The direction in which the list is laid out.

Associated Types

type Axis: Axis

The direction along which the Scrollbar is laid out.

Loading content...

Required methods

fn ranges(_: Rect) -> (Range, Range)

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

fn scrollbar(_: Id) -> Scrollbar<Self::Axis>

Begin building the scrollbar for the List.

fn common_scroll(common: &CommonBuilder) -> Option<&Scroll>

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

fn position_item<W>(
    item_widget: W,
    last_id: Option<Id>,
    scroll_trigger_id: Id,
    first_item_margin: Scalar
) -> W where
    W: Widget

Positions the given widget.

fn position_scroll_trigger<W>(scroll_trigger: W, list: Id) -> W where
    W: Widget

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

fn scroll_list_kids<S>(list: List<Self, S>) -> List<Self, S> where
    Self: Sized,
    S: ItemSize

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

fn size_breadth<W>(widget: W, breadth: Scalar) -> W where
    W: Widget

Size the widget given its breadth.

fn size_length<W>(widget: W, length: Scalar) -> W where
    W: Widget

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