pub struct App {Show 20 fields
pub win_w: u16,
pub win_h: u16,
pub panes: Vec<Pane>,
pub drag_src: Option<usize>,
pub selected: Option<String>,
pub windows: Vec<Win>,
pub window_mode: bool,
pub wdrag: Option<WDrag>,
pub sel_win: Option<String>,
pub tiles: RefCell<Vec<(String, Rect)>>,
pub mpanes: RefCell<Vec<(String, String, Rect)>>,
pub pending_kill: Option<(String, bool)>,
pub prompt: Option<Prompt>,
pub menu: Option<Menu>,
pub show_help: bool,
pub should_quit: bool,
pub cursor: (u16, u16),
pub status: String,
pub last_canvas: Cell<Rect>,
pub last_full: Cell<Rect>,
}Fields§
§win_w: u16§win_h: u16§panes: Vec<Pane>§drag_src: Option<usize>§selected: Option<String>§windows: Vec<Win>§window_mode: bool§wdrag: Option<WDrag>§sel_win: Option<String>§tiles: RefCell<Vec<(String, Rect)>>§mpanes: RefCell<Vec<(String, String, Rect)>>§pending_kill: Option<(String, bool)>§prompt: Option<Prompt>§show_help: bool§should_quit: bool§cursor: (u16, u16)§status: String§last_canvas: Cell<Rect>§last_full: Cell<Rect>Implementations§
Source§impl App
impl App
pub fn new() -> Result<Self>
pub fn refresh(&mut self) -> Result<()>
pub fn selected_index(&self) -> Option<usize>
Sourcefn target(&self) -> Option<String>
fn target(&self) -> Option<String>
Target pane for create/kill: the selected pane, else the active one.
Sourcepub fn active_window_id(&self) -> Option<String>
pub fn active_window_id(&self) -> Option<String>
Id of the currently active (focused) window.
Sourcepub fn active_window_label(&self) -> Option<String>
pub fn active_window_label(&self) -> Option<String>
index:name of the active window, shown in the top bar.
pub fn split(&mut self, horizontal: bool) -> Result<()>
Sourcepub fn new_pane(&mut self, flag: &str, before: bool) -> Result<()>
pub fn new_pane(&mut self, flag: &str, before: bool) -> Result<()>
Create a pane next to the target. flag is “-h”/“-v”; before puts the
new pane left/above instead of right/below.
pub fn request_kill(&mut self)
pub fn set_layout(&mut self, name: &str, label: &str) -> Result<()>
pub fn cycle_layout(&mut self) -> Result<()>
pub fn select_window(&mut self, id: &str) -> Result<()>
pub fn swap_windows(&mut self, a: &str, b: &str) -> Result<()>
pub fn move_pane_to_window(&mut self, pane: &str, win: &str) -> Result<()>
pub fn new_window(&mut self) -> Result<()>
pub fn request_kill_window(&mut self, id: String)
pub fn open_rename(&mut self, id: String)
pub fn confirm_rename(&mut self) -> Result<()>
pub fn confirm_kill(&mut self) -> Result<()>
Sourcepub fn confirm_rects(&self) -> (Rect, Rect, Rect)
pub fn confirm_rects(&self) -> (Rect, Rect, Rect)
(dialog area, Yes button, No button) for the kill confirmation.
Sourcepub fn prompt_rects(&self) -> (Rect, Rect, Rect, Rect)
pub fn prompt_rects(&self) -> (Rect, Rect, Rect, Rect)
(dialog area, text field, OK button, Cancel button) for the rename prompt.
pub fn on_mouse(&mut self, m: MouseEvent) -> Result<()>
fn on_mouse_panes(&mut self, m: MouseEvent) -> Result<()>
fn on_mouse_windows(&mut self, m: MouseEvent) -> Result<()>
Sourcepub fn set_window_mode(&mut self, on: bool) -> Result<()>
pub fn set_window_mode(&mut self, on: bool) -> Result<()>
Switch between pane and window mode, seeding the window-mode cursor.
Sourcefn focused_window_index(&self) -> i32
fn focused_window_index(&self) -> i32
Index of the focused window (selected, else active, else first).
Sourcepub fn select_dir(&mut self, dir: &str) -> Result<()>
pub fn select_dir(&mut self, dir: &str) -> Result<()>
Pane mode: move selection directionally, via tmux’s spatial logic.
Sourcepub fn swap_dir(&mut self, dir: &str) -> Result<()>
pub fn swap_dir(&mut self, dir: &str) -> Result<()>
Pane mode: swap the selected pane with its neighbour in dir.
Window mode: move the focus across the grid AND switch to that window live, so arrowing around takes you through the session.
Sourcepub fn win_swap(&mut self, dx: i32, dy: i32) -> Result<()>
pub fn win_swap(&mut self, dx: i32, dy: i32) -> Result<()>
Window mode: reorder — swap the focused window with the grid neighbour.
Sourcepub fn pane_key(&mut self, k: KeyEvent) -> Result<()>
pub fn pane_key(&mut self, k: KeyEvent) -> Result<()>
Dispatch a key in pane mode (arrows navigate, Shift+arrows move).
fn move_or_select(&mut self, dir: &str, shift: bool) -> Result<()>
Sourcepub fn window_key(&mut self, k: KeyEvent) -> Result<()>
pub fn window_key(&mut self, k: KeyEvent) -> Result<()>
Dispatch a key in window mode (arrows navigate, Shift+arrows reorder).
Source§impl App
impl App
pub fn draw(&self, f: &mut Frame<'_>)
fn draw_panes(&self, f: &mut Frame<'_>, canvas: Rect)
fn draw_windows(&self, f: &mut Frame<'_>, canvas: Rect)
fn draw_chrome(&self, f: &mut Frame<'_>, full: Rect)
fn draw_help(&self, f: &mut Frame<'_>)
fn draw_confirm(&self, f: &mut Frame<'_>)
fn draw_prompt(&self, f: &mut Frame<'_>)
Auto Trait Implementations§
impl !Freeze for App
impl !RefUnwindSafe for App
impl Send for App
impl !Sync for App
impl Unpin for App
impl UnwindSafe for App
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
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