Tab

Struct Tab 

Source
pub struct Tab {
Show 37 fields pub location: Location, pub location_ancestors: Vec<(Location, String)>, pub location_title: String, pub location_context_menu_point: Option<Point>, pub location_context_menu_index: Option<usize>, pub context_menu: Option<Point>, pub mode: Mode, pub scroll_opt: Option<AbsoluteOffset>, pub size_opt: Cell<Option<Size>>, pub content_height_opt: Cell<Option<f32>>, pub viewport_opt: Option<Rectangle>, pub item_view_size_opt: Cell<Option<Size>>, pub edit_location: Option<EditLocation>, pub edit_location_id: Id, pub history_i: usize, pub history: Vec<Location>, pub config: TabConfig, pub tb_config: TBConfig, pub thumb_config: ThumbCfg, pub sort_name: HeadingOptions, pub sort_direction: bool, pub gallery: bool, pub(crate) parent_item_opt: Option<Box<Item>>, pub(crate) items_opt: Option<Vec<Item>>, pub dnd_hovered: Option<(Location, Instant)>, pub(crate) scrollable_id: Id, select_focus: Option<usize>, select_range: Option<(usize, usize)>, clicked: Option<usize>, selected_clicked: bool, last_right_click: Option<usize>, search_context: Option<SearchContext>, date_time_formatter: DateTimeFormatter<YMDT>, time_formatter: DateTimeFormatter<T>, watch_drag: bool, window_id: Option<Id>, large_image_manager: LargeImageManager,
}

Fields§

§location: Location§location_ancestors: Vec<(Location, String)>§location_title: String§location_context_menu_point: Option<Point>§location_context_menu_index: Option<usize>§context_menu: Option<Point>§mode: Mode§scroll_opt: Option<AbsoluteOffset>§size_opt: Cell<Option<Size>>§content_height_opt: Cell<Option<f32>>§viewport_opt: Option<Rectangle>§item_view_size_opt: Cell<Option<Size>>§edit_location: Option<EditLocation>§edit_location_id: Id§history_i: usize§history: Vec<Location>§config: TabConfig§tb_config: TBConfig§thumb_config: ThumbCfg§sort_name: HeadingOptions§sort_direction: bool§gallery: bool§parent_item_opt: Option<Box<Item>>§items_opt: Option<Vec<Item>>§dnd_hovered: Option<(Location, Instant)>§scrollable_id: Id§select_focus: Option<usize>§select_range: Option<(usize, usize)>§clicked: Option<usize>§selected_clicked: bool§last_right_click: Option<usize>§search_context: Option<SearchContext>§date_time_formatter: DateTimeFormatter<YMDT>§time_formatter: DateTimeFormatter<T>§watch_drag: bool§window_id: Option<Id>§large_image_manager: LargeImageManager

Implementations§

Source§

impl Tab

Source

pub fn new( location: Location, config: TabConfig, tb_config: TBConfig, thumb_config: ThumbCfg, sorting_options: Option<&OrderMap<String, (HeadingOptions, bool), FxBuildHasher>>, scrollable_id: Id, window_id: Option<Id>, ) -> Self

Source

pub fn title(&self) -> String

Source

pub const fn items_opt(&self) -> Option<&Vec<Item>>

Source

pub const fn items_opt_mut(&mut self) -> Option<&mut Vec<Item>>

Source

pub fn set_items(&mut self, items: Vec<Item>)

Source

pub fn cut_selected(&mut self)

Source

pub fn refresh_cut(&mut self, locations: &[PathBuf])

Source

pub fn selected_locations(&self) -> Vec<Location>

Source

pub fn selected_delete_paths(&self) -> Vec<PathBuf>

Returns the actual file paths to delete for selected items. TB result items are virtual groupings — expand them to their component files.

Source

pub fn select_all(&mut self)

Source

pub fn select_none(&mut self) -> bool

Source

pub fn select_name(&mut self, name: &str)

Source

pub fn select_by_prefix(&mut self, prefix: &str) -> bool

Selects the first item whose name starts with the given prefix (case-insensitive). Returns true if an item was selected.

Source

fn index_before_focus(current_focus: Option<usize>, forward: bool) -> usize

Source

fn index_after_focus(current_focus: Option<usize>, forward: bool) -> usize

Source

fn select_first_prefix_from_index( prefix_lower: &str, items: &mut [Item], start: usize, forward: bool, ) -> Option<usize>

Source

fn select_first_prefix_match<'a>( prefix: &str, items: impl Iterator<Item = (usize, &'a mut Item)>, ) -> Option<usize>

Selects the first item in the given iterator whose name starts with the given prefix.

The prefix must be lowercase.

Source

pub fn select_paths(&mut self, paths: Vec<PathBuf>)

Source

fn select_position(&mut self, row: usize, col: usize, mod_shift: bool) -> bool

Source

pub fn select_rect(&mut self, rect: Rectangle, mod_ctrl: bool, mod_shift: bool)

Source

pub fn select_focus_id(&self) -> Option<Id>

Source

fn select_focus_pos_opt(&self) -> Option<(usize, usize)>

Source

fn dehighlight_all(&mut self)

Source

pub(crate) fn select_focus_scroll(&mut self) -> Option<AbsoluteOffset>

Source

fn rows_per_page(&self) -> usize

Source

fn select_range_start_pos_opt(&self) -> Option<(usize, usize)>

Source

fn select_first_pos_opt(&self) -> Option<(usize, usize)>

Source

fn select_last_pos_opt(&self) -> Option<(usize, usize)>

Source

fn trigger_async_decode(&mut self) -> Vec<Command>

Source

pub fn change_location( &mut self, location: &Location, history_i_opt: Option<usize>, )

Source

pub fn update(&mut self, message: Message, modifiers: Modifiers) -> Vec<Command>

Source

pub(crate) const fn sort_options(&self) -> (HeadingOptions, bool, bool)

Source

fn column_sort(&self) -> Option<Vec<(usize, &Item)>>

Source

fn dnd_dest<'a>( &self, location: &Location, element: impl Into<Element<'a, Message>>, ) -> Element<'a, Message>

Source

pub fn gallery_view(&self) -> Element<'_, Message>

Source

pub fn location_view(&self) -> Element<'_, Message>

Source

pub fn empty_view( &self, has_hidden: bool, susceptible_hidden: bool, ) -> Element<'_, Message>

Source

pub fn grid_view( &self, ) -> (Option<Element<'static, Message>>, Element<'_, Message>, bool)

Source

pub fn list_view( &self, ) -> (Option<Element<'static, Message>>, Element<'_, Message>, bool)

Source

pub fn view_responsive<'a>( &'a self, key_binds: &'a HashMap<KeyBind, Action>, modifiers: &'a Modifiers, size: Size, clipboard_paste_available: bool, context_actions: &'a [ContextActionPreset], ) -> Element<'a, Message>

Source

pub fn multi_preview_view<'a>( &'a self, mime_app_cache_opt: Option<&'a MimeAppCache>, ) -> Element<'a, Message>

Source

pub fn view<'a>( &'a self, key_binds: &'a HashMap<KeyBind, Action>, modifiers: &'a Modifiers, clipboard_paste_available: bool, context_actions: &'a [ContextActionPreset], ) -> Element<'a, Message>

Source

pub fn subscription(&self, preview: bool) -> Subscription<Message>

Source

const fn format_time(&self, time: SystemTime) -> FormatTime<'_>

Auto Trait Implementations§

§

impl !Freeze for Tab

§

impl !RefUnwindSafe for Tab

§

impl !Send for Tab

§

impl !Sync for Tab

§

impl Unpin for Tab

§

impl !UnwindSafe for Tab

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
§

impl<T> Also for T

§

fn also<F>(self, block: F) -> Self
where F: FnOnce(&mut Self),

Apply a function to this value and return the (possibly) modified value.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T, Res> Apply<Res> for T
where T: ?Sized,

§

fn apply<F>(self, f: F) -> Res
where F: FnOnce(Self) -> Res, Self: Sized,

Apply a function which takes the parameter by value.
§

fn apply_ref<F>(&self, f: F) -> Res
where F: FnOnce(&Self) -> Res,

Apply a function which takes the parameter by reference.
§

fn apply_mut<F>(&mut self, f: F) -> Res
where F: FnOnce(&mut Self) -> Res,

Apply a function which takes the parameter by mutable reference.
Source§

impl<T, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
§

impl<T> Classify for T

§

type Classified = T

§

fn classify(self) -> T

Source§

impl<T, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
§

impl<F, T> ConvertInto<T> for F
where T: ConvertFrom<F>,

§

fn convert_into(self) -> T

Infallibly converts a value of type Self to a value of type T.
§

impl<F, T> ConvertTryFrom<F> for T
where F: ConvertInto<T>,

§

type Error = Infallible

The type of an error that can occur during a conversion. Read more
§

fn convert_try_from(value: F) -> Result<T, Infallible>

Fallibly converts a value of type F to a value of type Self.
§

impl<F, T> ConvertTryInto<T> for F
where T: ConvertTryFrom<F>,

§

type Error = <T as ConvertTryFrom<F>>::Error

The type of an error that can occur during a conversion. Read more
§

fn convert_try_into(self) -> Result<T, <T as ConvertTryFrom<F>>::Error>

Fallibly converts a value of type Self to a value of type T.
§

impl<T> Declassify for T

§

type Declassified = T

§

fn declassify(self) -> T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
§

impl<State, Message> IntoBoot<State, Message> for State

§

fn into_boot(self) -> (State, Task<Message>)

Turns some type into the initial state of some [Application].
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeClone for T

§

impl<T> MaybeDebug for T

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,