pub struct PaneMenu {
pub items: Vec<ContextAction>,
}Expand description
The configurable hamburger (“pane”) menu that opens from the toolbar.
Unlike the per-row ContextMenu there are no match rules — the pane menu
is one flat list of items that apply to the whole pane (open a folder, toggle
hidden files, change the sort order, close the pane, …). Items reuse the same
ContextAction vocabulary as the context menu, so builtins, table entries
with a shortcut, and custom commands all work here too.
Fields§
§items: Vec<ContextAction>Implementations§
Source§impl PaneMenu
impl PaneMenu
Sourcepub fn labels(&self) -> Vec<String>
pub fn labels(&self) -> Vec<String>
The label for each item, in display order (used by tests and the UI).
Sourcepub fn shortcuts(&self) -> Vec<(String, ShortcutTarget)>
pub fn shortcuts(&self) -> Vec<(String, ShortcutTarget)>
Every shortcut attached to a pane-menu item, in order, deduplicated
(first wins). Merged with the context-menu shortcuts so pane actions
(Ctrl+h, Ctrl+1…) work while the tree is focused.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PaneMenu
impl<'de> Deserialize<'de> for PaneMenu
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PaneMenu
impl StructuralPartialEq for PaneMenu
Auto Trait Implementations§
impl Freeze for PaneMenu
impl RefUnwindSafe for PaneMenu
impl Send for PaneMenu
impl Sync for PaneMenu
impl Unpin for PaneMenu
impl UnsafeUnpin for PaneMenu
impl UnwindSafe for PaneMenu
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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 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> ⓘ
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