Struct nannou::ui::widget::scrollbar::Scrollbar[][src]

pub struct Scrollbar<A> { /* fields omitted */ }

A widget that allows for scrolling via dragging the mouse.

Implementations

impl<A> Scrollbar<A>[src]

pub fn auto_hide(self, auto_hide: bool) -> Scrollbar<A>[src]

By default, this is set to false.

When false, the Scrollbar will always be visible.

When true, the Scrollbar will only be visible when:

  • The target scrollable widget is actually scrollable and:
  • The target scrollable widget is being scrolled.
  • The scrollbar is capturing the mouse.

pub fn thickness(self, thickness: f64) -> Scrollbar<A>[src]

Build the widget with the given thickness.

This value sets the width of vertical scrollbars, or the height of horizontal scrollbars.

By default, this is 10.0.

impl Scrollbar<X>[src]

pub fn x_axis(widget: NodeIndex<u32>) -> Scrollbar<X>[src]

Begin building a new scrollbar widget that scrolls along the X axis along the range of the scrollable widget at the given Id.

impl Scrollbar<Y>[src]

pub fn y_axis(widget: NodeIndex<u32>) -> Scrollbar<Y>[src]

Begin building a new scrollbar widget that scrolls along the Y axis along the range of the scrollable widget at the given Id.

Trait Implementations

impl<A> Colorable for Scrollbar<A>[src]

pub fn color(self, color: Color) -> Scrollbar<A>[src]

Build the type’s self.$($assignee).+ with the given $Type.

impl<A> Common for Scrollbar<A>[src]

impl<A> Widget for Scrollbar<A> where
    A: Axis
[src]

type State = State

State to be stored within the Uis widget cache. Read more

type Style = Style

Every widget is required to have its own associated Style type. This type is intended to contain high-level styling information for the widget that can be optionally specified by a user of the widget. Read more

type Event = ()

The type of event yielded by the widget, returned via the Widget::set function. Read more

Auto Trait Implementations

impl<A> RefUnwindSafe for Scrollbar<A> where
    A: RefUnwindSafe

impl<A> Send for Scrollbar<A> where
    A: Send

impl<A> Sync for Scrollbar<A> where
    A: Sync

impl<A> Unpin for Scrollbar<A> where
    A: Unpin

impl<A> UnwindSafe for Scrollbar<A> where
    A: UnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> Downcast<T> for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<W> Positionable for W where
    W: Widget
[src]

impl<T> SetParameter for T

impl<W> Sizeable for W where
    W: Widget
[src]

pub fn get_x_dimension(&self, ui: &Ui) -> Dimension[src]

We attempt to retrieve the x Dimension for the widget via the following:

  • Check for specified value at maybe_x_dimension
  • Otherwise, use the default returned by Widget::default_x_dimension.

pub fn get_y_dimension(&self, ui: &Ui) -> Dimension[src]

We attempt to retrieve the y Dimension for the widget via the following:

  • Check for specified value at maybe_y_dimension
  • Otherwise, use the default returned by Widget::default_y_dimension.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,