Skip to main content

TreeMsg

Enum TreeMsg 

Source
pub enum TreeMsg {
Show 72 variants OpenRoot(PathBuf), SelectPath(PathBuf), Focus, SetFilter(String), SetPanel(PanelConfig), MoveUp, MoveDown, ExtendSelection(isize), MoveExtendingSelection(isize), CollapseCursor, ExpandCursor, ActivateCursor, Rename, Activate(PathBuf), Toggle(PathBuf), Select(PathBuf), ToggleSelect(PathBuf), RangeSelect(PathBuf), RowPress { path: PathBuf, is_dir: bool, ctrl: bool, shift: bool, }, RowRelease { path: PathBuf, }, DragStarted, DroppedAsMove(Vec<PathBuf>), Deselect, Menu(PathBuf), MenuAt { x: f64, y: f64, }, RenameAt(PathBuf), Trash(PathBuf), DeleteSelected, ConfirmTrash(Vec<PathBuf>), PermanentDelete(PathBuf), PermanentDeleteSelected, ConfirmPermanentDelete(Vec<PathBuf>), RunCommand { command: String, path: PathBuf, }, OpenSplit(PathBuf), OpenInOppositePanel(PathBuf), OpenWith(PathBuf), OpenWithDefault(PathBuf), CreateLink(PathBuf), Properties(PathBuf), PropertiesSelected(Vec<PathBuf>), CopyPaths(Vec<PathBuf>), CopyRelativePaths(Vec<PathBuf>), RunCommandEach { command: String, paths: Vec<PathBuf>, }, RenameTo { path: PathBuf, name: String, }, ToggleThumbnail(PathBuf), ToggleThumbnailPlay(PathBuf), RunShortcut { target: ShortcutTarget, }, Duplicate(PathBuf), RequestDuplicateCursor, SelectAllRows, TypeAhead(char), CopyPath(PathBuf), CopyRelativePath(PathBuf), AddBookmark(PathBuf), RenameCommit, RenameCancel, Copy, Cut, Paste, PastePaths(Vec<PathBuf>), NewFile, NewFolder, ToggleHidden, SetSortKey(SortKey), ToggleSortDirection, FsChange(Change), FlushChanges, RequestOpenFolder, DropInto { target: PathBuf, sources: Vec<PathBuf>, copy: bool, }, DropIntoRoot { sources: Vec<PathBuf>, copy: bool, }, DropIntoConfirmed { target: PathBuf, sources: Vec<PathBuf>, }, Shutdown,
}
Expand description

User intent for the tree component.

Variants§

§

OpenRoot(PathBuf)

§

SelectPath(PathBuf)

Reveal path in the already-open tree: move the cursor to it, select it, and scroll it into view. The path must be a visible row (a child of the current root); when it is not visible nothing changes.

§

Focus

Move keyboard focus into the tree, so a freshly shown or freshly split pane receives shortcuts immediately instead of waiting for a click.

§

SetFilter(String)

§

SetPanel(PanelConfig)

The panel geometry changed (interactive width resize): re-measure the column so inline thumbnails follow the new width.

§

MoveUp

§

MoveDown

§

ExtendSelection(isize)

Shift+Up / Shift+Down: move the cursor delta rows and extend the selection from the anchor to the new cursor. With no anchor yet, the current cursor becomes the anchor.

§

MoveExtendingSelection(isize)

Ctrl+Shift+Up / Ctrl+Shift+Down: move the cursor delta rows without collapsing the selection, extending it to include the new cursor while keeping the existing anchor. Falls back to Self::ExtendSelection when there is no anchor.

§

CollapseCursor

§

ExpandCursor

§

ActivateCursor

§

Rename

§

Activate(PathBuf)

§

Toggle(PathBuf)

§

Select(PathBuf)

§

ToggleSelect(PathBuf)

Ctrl+click: add/remove path from the selection without disturbing the rest of it.

§

RangeSelect(PathBuf)

Shift+click: select every row between the last selection anchor and path, inclusive.

§

RowPress

A plain left-click on a row: select it and, for a directory, toggle it immediately on every press. For files, a second quick click opens the file (double-click detection happens in the handler, since the click gesture is rebuilt with the rows).

Fields

§path: PathBuf
§is_dir: bool
§ctrl: bool
§shift: bool
§

RowRelease

A left button released on a row. Used only to finish a click whose selection collapse was deferred at press time (see Self::RowPress and the tree’s pending_click): if no drag started, the deferred press is applied now.

Fields

§path: PathBuf
§

DragStarted

A row drag has begun (DragSource::drag-begin). Marks the in-flight drag so a click’s release does not treat it as a plain click.

§

DroppedAsMove(Vec<PathBuf>)

A drag that left the app finished as a MOVE: the receiving application took the data, so the sources are moved to the trash. (An in-tree move is performed by the drop target instead and never reaches this.)

§

Deselect

Left-click on the blank area below the rows: clear the selection and the keyboard cursor, so hotkeys act on the open directory rather than a row.

§

Menu(PathBuf)

§

MenuAt

Right-click on the blank area below the rows: open the context menu for the currently open directory (the tree root), anchored at the click.

Fields

§

RenameAt(PathBuf)

§

Trash(PathBuf)

Trash a single, explicit path (used by the context menu, which always targets the row it was opened on regardless of the current selection).

§

DeleteSelected

Trash the current selection (used by the Delete key).

§

ConfirmTrash(Vec<PathBuf>)

§

PermanentDelete(PathBuf)

Permanently delete a single explicit path (context menu target).

§

PermanentDeleteSelected

Permanently delete the current selection (Shift+Delete).

§

ConfirmPermanentDelete(Vec<PathBuf>)

Actually perform the permanent delete after the user confirmed the dialog.

§

RunCommand

Run a configured custom command against path (via {path}/{dir} substitution in the config template).

Fields

§command: String
§path: PathBuf
§

OpenSplit(PathBuf)

Open the row’s path as a brand-new split pane (directories only).

§

OpenInOppositePanel(PathBuf)

Open the directory as a pane in the opposite side’s dock.

§

OpenWith(PathBuf)

Pick an application for the row and open it with that app.

§

OpenWithDefault(PathBuf)

Open the file with its default application.

Create a symlink to the row next to it.

§

Properties(PathBuf)

Show the row’s properties dialog (metadata and a permissions editor).

§

PropertiesSelected(Vec<PathBuf>)

Show a summary properties dialog for a multi-row selection (count, total size, and the individual paths).

§

CopyPaths(Vec<PathBuf>)

Copy every path in the list to the system clipboard as text, one per line (multi-select form of Self::CopyPath).

§

CopyRelativePaths(Vec<PathBuf>)

Copy every path relative to the open directory, one per line (multi-select form of Self::CopyRelativePath).

§

RunCommandEach

Run a configured custom command once per path, in visual top-to-bottom order (multi-select form of Self::RunCommand).

Fields

§command: String
§paths: Vec<PathBuf>
§

RenameTo

Rename path to the bare file name name (used by the Properties dialog’s editable Name field).

Fields

§path: PathBuf
§name: String
§

ToggleThumbnail(PathBuf)

Toggle the inline thumbnail preview for the row (an image, or every image inside a directory).

§

ToggleThumbnailPlay(PathBuf)

Clicked an inline thumbnail: play/pause a video, or animate a GIF.

§

RunShortcut

A configured shortcut fired against the row under the keyboard cursor.

Fields

§

Duplicate(PathBuf)

§

RequestDuplicateCursor

Ctrl+D: duplicate whatever is at the keyboard cursor.

§

SelectAllRows

Ctrl+A: select every visible row.

§

TypeAhead(char)

A printable key was typed in the tree: type-ahead jumps the cursor to the next row whose name starts with the accumulated prefix.

§

CopyPath(PathBuf)

§

CopyRelativePath(PathBuf)

§

AddBookmark(PathBuf)

Add the directory row to the app’s bookmarks list.

§

RenameCommit

§

RenameCancel

§

Copy

§

Cut

§

Paste

§

PastePaths(Vec<PathBuf>)

Paths decoded from the system clipboard, delivered asynchronously by [read_clipboard_files] after a Paste with no internal clipboard.

§

NewFile

§

NewFolder

§

ToggleHidden

Toggle dotfile visibility in the current tree.

§

SetSortKey(SortKey)

Set the primary sort key (and keep the current direction).

§

ToggleSortDirection

Flip ascending/descending order.

§

FsChange(Change)

§

FlushChanges

§

RequestOpenFolder

§

DropInto

A file was dropped from outside the tree (or dragged from elsewhere in it) onto directory target. Copies happen immediately; moves are confirmed first (see TreeMsg::DropIntoConfirmed). copy is set by holding Ctrl during the drop.

Fields

§target: PathBuf
§sources: Vec<PathBuf>
§copy: bool
§

DropIntoRoot

A drop landed on empty space below the rows (or a non-directory row); resolved to the current tree root.

Fields

§sources: Vec<PathBuf>
§copy: bool
§

DropIntoConfirmed

The user confirmed a drag-to-move; perform it.

Fields

§target: PathBuf
§sources: Vec<PathBuf>
§

Shutdown

Drop every thumbnail and stop all media playback ahead of app exit.

Trait Implementations§

Source§

impl Clone for TreeMsg

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TreeMsg

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<C> AsyncPosition<()> for C

Source§

fn position(_index: usize)

Returns the position. Read more
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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> 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<C, I> Position<(), I> for C

Source§

fn position(&self, _index: &I)

Returns the position. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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