TUI::SplitWindow
Inherits TUI::Widget < Reference < Object
One bordered box hosting two Scrollable content areas side by side, each with its own independent scroll position. The left pane's right edge is the internal divider column, which doubles as its scrollbar track (Buffer#scrollbar accepts an arbitrary column, so this needs no new drawing primitive); the right pane's scrollbar renders on the outer right border column exactly as Window's single pane does.
Constructors
Sizes and positions a SplitWindow to fill the screen below the
status bar row — see Window.full_screen for the same reasoning.
left_width defaults to an even split.
Instance methods
Applied to the box border and internal pane divider drawn by #render.
Whether to draw the box border/scrollbar chrome — same convention as Window#bordered?.
Whether to draw the box border/scrollbar chrome — same convention as Window#bordered?.
Appended (with a leading double-space separator, matching how #status_hint already joins its own @menu.hint with active_pane's) to #status_hint when non-empty — for a host embedding this SplitWindow that wants its own app-level bindings (e.g. a sidebar-hide toggle) reflected in the one status line #status_hint produces, without this widget needing to know anything about what those bindings do. A host intercepting a key ahead of this widget's own #handle_key (e.g. to special-case Tab while the left pane is hidden) is responsible for keeping this in sync with what it actually does.
Appended (with a leading double-space separator, matching how #status_hint already joins its own @menu.hint with active_pane's) to #status_hint when non-empty — for a host embedding this SplitWindow that wants its own app-level bindings (e.g. a sidebar-hide toggle) reflected in the one status line #status_hint produces, without this widget needing to know anything about what those bindings do. A host intercepting a key ahead of this widget's own #handle_key (e.g. to special-case Tab while the left pane is hidden) is responsible for keeping this in sync with what it actually does.
Resets which pane is active back to the left one — for a host app that reuses the same SplitWindow instance across appearances (e.g. showing/hiding it based on runtime state) and wants a consistent starting focus each time it reappears, rather than carrying over whatever pane was last active before it was hidden.
Symmetric counterpart to #focus_left — for a host that collapses the left pane (e.g. width 0) and needs focus off it since it can no longer usefully hold keyboard input.
Width in columns of the left pane's content area, excluding the divider column. Adjustable at runtime (e.g. a draggable-divider feature) independent of #initialize's initial split.
Draw into @buffer using LOCAL coordinates (0, 0 = this widget's own
top-left). Widgets never need to know their own x/y offset to draw
themselves — that arithmetic is handled entirely by composite.
Applied to both panes' scrollbar track and thumb drawn by #render — defaults to whatever #border_style currently is, so scrollbar and border stay visually matched unless a caller explicitly sets this to something else. Resolved fresh on every read (not captured once), so an unset scrollbar_style keeps tracking border_style even if border_style is changed later.
Plain text describing the actions available in the widget's current state. Rendered by the App in the global status bar at the bottom of the screen — widgets must NOT draw their own hint lines.