Struct nannou::ui::widget::FileNavigator[][src]

pub struct FileNavigator<'a> {
    pub style: Style,
    pub starting_directory: &'a Path,
    pub types: Types<'a>,
    // some fields omitted
}

A widget for navigating and interacting with a file system.

Fields

style: Style

Unique styling for the widget.

starting_directory: &'a Path

The first directory shown for the FileNavigator.

types: Types<'a>

Only display files of the given type.

Implementations

impl<'a> FileNavigator<'a>[src]

pub fn new(starting_directory: &'a Path, types: Types<'a>) -> FileNavigator<'a>[src]

Begin building a FileNavigator widget that displays only files of the given types.

pub fn all(starting_directory: &'a Path) -> FileNavigator<'a>[src]

Begin building a FileNavigator that will display all file types.

pub fn with_extension(
    starting_directory: &'a Path,
    exts: &'a [&'a str]
) -> FileNavigator<'a>
[src]

Begin building a FileNavigator that will only display files whose extensions match one of those within the given extension list.

i.e. A FileNavigator used for navigating lossless audio files might use the following list of extensions: &["wav", "wave", "aiff"].

pub fn directories(starting_directory: &'a Path) -> FileNavigator<'a>[src]

Begin building a FileNavigator that only displays directories.

pub fn unselected_color(self, color: Color) -> FileNavigator<'a>[src]

The color of the unselected entries within each DirectoryView.

pub fn text_color(self, color: Color) -> FileNavigator<'a>[src]

The color of the Text used to display the file names.

pub fn show_hidden_files(self, show_hidden: bool) -> FileNavigator<'a>[src]

Whether to show hidden files and directories.

pub fn font_size(self, font_size: u32) -> FileNavigator<'a>[src]

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

Trait Implementations

impl<'a> Colorable for FileNavigator<'a>[src]

pub fn color(self, color: Color) -> FileNavigator<'a>[src]

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

impl<'a> Common for FileNavigator<'a>[src]

impl<'a> Widget for FileNavigator<'a>[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 = Vec<Event, Global>

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

pub fn update(
    self,
    args: UpdateArgs<'_, '_, '_, '_, FileNavigator<'a>>
) -> <FileNavigator<'a> as Widget>::Event
[src]

Update the state of the Button.

Auto Trait Implementations

impl<'a> RefUnwindSafe for FileNavigator<'a>

impl<'a> Send for FileNavigator<'a>

impl<'a> Sync for FileNavigator<'a>

impl<'a> Unpin for FileNavigator<'a>

impl<'a> UnwindSafe for FileNavigator<'a>

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