diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-24 00:25:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-24 00:25:03 +0000 |
commit | c5239c59846c2d09725d4b1db0e728b3376c3998 (patch) | |
tree | 1fedf6dcd02ec5c6b18ee45146dc21957d4b8c4e /tmux.h | |
parent | be13479f099749b2a199e17505797e51090caca0 (diff) | |
download | rtmux-c5239c59846c2d09725d4b1db0e728b3376c3998.tar.gz rtmux-c5239c59846c2d09725d4b1db0e728b3376c3998.tar.bz2 rtmux-c5239c59846c2d09725d4b1db0e728b3376c3998.zip |
Add resize-pane -Z to temporary zoom the active pane to occupy the full window
or unzoom (restored to the normal layout) if it already zoomed, bound to C-b z
by default. The pane is unzoomed on pretty much any excuse whatsoever.
We considered making this a new layout but the requirements are quite different
from layouts so decided it is better as a special case. Each current layout
cell is saved, a temporary one-cell layout generated and all except the active
pane set to NULL.
Prompted by suggestions and scripts from several. Thanks to Aaron Jensen and
Thiago Padilha for testing an earlier version.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -925,7 +925,9 @@ struct window_pane { u_int id; struct window *window; + struct layout_cell *layout_cell; + struct layout_cell *saved_layout_cell; u_int sx; u_int sy; @@ -990,6 +992,7 @@ struct window { int lastlayout; struct layout_cell *layout_root; + struct layout_cell *saved_layout_root; u_int sx; u_int sy; @@ -999,6 +1002,7 @@ struct window { #define WINDOW_ACTIVITY 0x2 #define WINDOW_REDRAW 0x4 #define WINDOW_SILENCE 0x8 +#define WINDOW_ZOOMED 0x10 struct options options; @@ -1925,6 +1929,7 @@ void server_push_stdout(struct client *); void server_push_stderr(struct client *); int server_set_stdin_callback(struct client *, void (*)(struct client *, int, void *), void *, char **); +void server_unzoom_window(struct window *); /* status.c */ int status_out_cmp(struct status_out *, struct status_out *); @@ -2128,6 +2133,8 @@ struct window_pane *window_find_string(struct window *, const char *); void window_set_active_pane(struct window *, struct window_pane *); struct window_pane *window_add_pane(struct window *, u_int); void window_resize(struct window *, u_int, u_int); +int window_zoom(struct window_pane *); +int window_unzoom(struct window *); void window_remove_pane(struct window *, struct window_pane *); struct window_pane *window_pane_at_index(struct window *, u_int); struct window_pane *window_pane_next_by_number(struct window *, @@ -2184,7 +2191,7 @@ void layout_fix_panes(struct window *, u_int, u_int); u_int layout_resize_check(struct layout_cell *, enum layout_type); void layout_resize_adjust( struct layout_cell *, enum layout_type, int); -void layout_init(struct window *); +void layout_init(struct window *, struct window_pane *); void layout_free(struct window *); void layout_resize(struct window *, u_int, u_int); void layout_resize_pane(struct window_pane *, enum layout_type, |