class

Cri::Tui::Workspace

Inherits Reference < Object

A workspace owns panels, focus and layout state. Buffers are owned by UiRuntime and are referenced by panels through buffer_id.

Constructors

new(id : String = "main", panels : PanelStore = PanelStore.new, events : EventBus | Nil = nil, buffer_exists : Proc(String, Bool) | Nil = nil)
Source

Instance methods

add_panel(id : String, buffer_id : String, title : String, position : String = "right", focused : Bool = false, prompt : String = "", editable : Bool = true) : Panel
Source
buffer_exists
Source
events
Source
focus(id : String)
Source
focus_direction(direction : String)

Directional focus for the current main/right/bottom layout. Bottom panels are ordinary focusable views; only their geometry is special.

Source
focus_next
Source
focused_panel_id
Source
panels
Source
remove_panel(id : String) : Panel | Nil
Source
status
Source
status=(value : String)
Source