pub struct DisplayMenu<'a> {
pub not_close: bool,
pub target_client: Option<Cow<'a, str>>,
pub target_pane: Option<Cow<'a, str>>,
pub title: Option<Cow<'a, str>>,
pub x: Option<usize>,
pub y: Option<usize>,
pub name: Option<Cow<'a, str>>,
pub key: Option<Cow<'a, str>>,
pub command: Option<Cow<'a, str>>,
}
Expand description
Structure for displaying a menu on target-client
§Manual
tmux ^3.2:
display-menu [-O] [-c target-client] [-t target-pane] [-T title] [-x position] [-y position] name key command ...
alias: menu
tmux ^3.0:
display-menu [-c target-client] [-t target-pane] [-T title] [-x position] [-y position] name key command ...
alias: menu
Fields§
§not_close: bool
[-O]
- the menu does not close when the mouse button is released without an item selected
target_client: Option<Cow<'a, str>>
[-c target-client]
- target-client
target_pane: Option<Cow<'a, str>>
[-t target-pane]
- target-pane
title: Option<Cow<'a, str>>
[-T title]
- title
x: Option<usize>
[-x position]
- x position of the menu
y: Option<usize>
[-y position]
- y position of the menu
name: Option<Cow<'a, str>>
name
key: Option<Cow<'a, str>>
key
command: Option<Cow<'a, str>>
command
Implementations§
Source§impl<'a> DisplayMenu<'a>
impl<'a> DisplayMenu<'a>
pub fn new() -> Self
Sourcepub fn not_close(self) -> Self
pub fn not_close(self) -> Self
[-O]
- the menu does not close when the mouse button is released without an item selected
Sourcepub fn target_client<S: Into<Cow<'a, str>>>(self, target_client: S) -> Self
pub fn target_client<S: Into<Cow<'a, str>>>(self, target_client: S) -> Self
[-c target-client]
- target-client
Sourcepub fn target_pane<S: Into<Cow<'a, str>>>(self, target_pane: S) -> Self
pub fn target_pane<S: Into<Cow<'a, str>>>(self, target_pane: S) -> Self
[-t target-pane]
- target-pane
pub fn command<S: Into<Cow<'a, str>>>(self, command: S) -> Self
pub fn build(self) -> TmuxCommand<'a>
Trait Implementations§
Source§impl<'a> Clone for DisplayMenu<'a>
impl<'a> Clone for DisplayMenu<'a>
Source§fn clone(&self) -> DisplayMenu<'a>
fn clone(&self) -> DisplayMenu<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for DisplayMenu<'a>
impl<'a> Debug for DisplayMenu<'a>
Source§impl<'a> Default for DisplayMenu<'a>
impl<'a> Default for DisplayMenu<'a>
Source§fn default() -> DisplayMenu<'a>
fn default() -> DisplayMenu<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> From<DisplayMenu<'a>> for TmuxCommand<'a>
impl<'a> From<DisplayMenu<'a>> for TmuxCommand<'a>
Source§fn from(item: DisplayMenu<'a>) -> Self
fn from(item: DisplayMenu<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> Hash for DisplayMenu<'a>
impl<'a> Hash for DisplayMenu<'a>
Source§impl<'a> Ord for DisplayMenu<'a>
impl<'a> Ord for DisplayMenu<'a>
Source§fn cmp(&self, other: &DisplayMenu<'a>) -> Ordering
fn cmp(&self, other: &DisplayMenu<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for DisplayMenu<'a>
impl<'a> PartialEq for DisplayMenu<'a>
Source§impl<'a> PartialOrd for DisplayMenu<'a>
impl<'a> PartialOrd for DisplayMenu<'a>
impl<'a> Eq for DisplayMenu<'a>
impl<'a> StructuralPartialEq for DisplayMenu<'a>
Auto Trait Implementations§
impl<'a> Freeze for DisplayMenu<'a>
impl<'a> RefUnwindSafe for DisplayMenu<'a>
impl<'a> Send for DisplayMenu<'a>
impl<'a> Sync for DisplayMenu<'a>
impl<'a> Unpin for DisplayMenu<'a>
impl<'a> UnwindSafe for DisplayMenu<'a>
Blanket Implementations§
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