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).
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.
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.
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).
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.
CreateLink(PathBuf)
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).
RenameTo
Rename path to the bare file name name (used by the Properties
dialog’s editable Name field).
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
target: ShortcutTargetDuplicate(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.
DropIntoRoot
A drop landed on empty space below the rows (or a non-directory row); resolved to the current tree root.
DropIntoConfirmed
The user confirmed a drag-to-move; perform it.
Shutdown
Drop every thumbnail and stop all media playback ahead of app exit.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TreeMsg
impl RefUnwindSafe for TreeMsg
impl Send for TreeMsg
impl Sync for TreeMsg
impl Unpin for TreeMsg
impl UnsafeUnpin for TreeMsg
impl UnwindSafe for TreeMsg
Blanket Implementations§
Source§impl<C> AsyncPosition<()> for C
impl<C> AsyncPosition<()> for C
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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