aboutsummaryrefslogtreecommitdiffstats
path: root/include/app_internal.h
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-10 15:40:09 +0200
committeruser <user@clank>2026-09-10 15:40:09 +0200
commit9c5b3319ac4d9a63404fe0cf0d55320754c982ba (patch)
tree28e0020a92a55512120467d698bcc09a95e8e17a /include/app_internal.h
parentbuild: a vendor bump rebuilds libghostty-vt, everywhere it is consumed (diff)
downloadslosh-9c5b3319ac4d9a63404fe0cf0d55320754c982ba.tar.gz
slosh-9c5b3319ac4d9a63404fe0cf0d55320754c982ba.tar.xz
slosh-9c5b3319ac4d9a63404fe0cf0d55320754c982ba.zip
tabs: the strip can stand on its side (tab_bar_side left/right)
A sidebar lists one tab per row down the chosen edge, tab_bar_width columns wide; the panes trade the strip's row for the sidebar's columns in tab_area(), the one place that arithmetic lives. The per-tab cell drawing is extracted from draw_tab_strip (label, rename editor, bell, hover, drop states, hit) and shared, so every mouse verb -- click, double-click rename, drag to a tab, drop on + -- works in both shapes because the hits move with the cells. The strip's indicators (pane count, prefix badge) take the sidebar's bottom rows, reserved first under the same budgeting rule the strip applies from the right. The status line below keeps the full width. A terminal too narrow to give up the columns falls back to top, re-derived per frame, so a resize moves the bar without anyone storing state.
Diffstat (limited to 'include/app_internal.h')
-rw-r--r--include/app_internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/app_internal.h b/include/app_internal.h
index be3f979..11f96b4 100644
--- a/include/app_internal.h
+++ b/include/app_internal.h
@@ -449,6 +449,11 @@ void walk_all(app_t *a, leaf_fn fn, void *ud);
/* src/app_layout.c */
uint16_t eff_gap(split_dir_t dir);
rect_t app_tab_area(app_t *a);
+/* Where the tab bar lands this frame (TAB_BAR_*), and how many columns a
+ * sidebar takes. The side is re-derived per frame: a screen too narrow for
+ * the sidebar falls back to the top row. */
+int app_tab_bar_side(const app_t *a);
+uint16_t app_tab_bar_cols(void);
void close_leaf(app_t *a, node_t *leaf);
node_t *first_leaf_of(node_t *n);
void focus_dir(app_t *a, int dx, int dy);
@@ -509,6 +514,7 @@ void find_corners(app_t *a);
void ensure_config(void);
void draw_toasts(app_t *a, screen_t *s);
void draw_tab_strip(app_t *a, screen_t *s);
+void draw_tab_sidebar(app_t *a, screen_t *s);
void draw_status_line(app_t *a, screen_t *s);
void draw_node(app_t *a, screen_t *s, node_t *n);
void draw_min_bar(app_t *a, screen_t *s);