mizchi/tui/components does not have a README file
pub(all) struct ActionItem {
key : Char
label : String
handler : () -> Unit
}pub(all) struct ActionMenu {
modal : ModalState
title : String
actions : Array[ActionItem]
toggle_key : Char?
on_close : () -> Unit
}fn ActionMenu::new(title : String, actions : Array[ActionItem], toggle_key? : Char?, on_close? : () -> Unit) -> ActionMenupub(all) enum ButtonState {
Normal
Hover
Pressed
Focused
Disabled
}pub(all) struct ComboboxOption {
id : String
label : String
}impl Eq for ComboboxOptionpub(all) struct CursorPosition {
row : Int
col : Int
}pub(all) struct EditConfig {
field_name : String
on_change : (String) -> Unit
on_edit_start : () -> Unit?
on_edit_end : () -> Unit?
on_force_quit : () -> Unit?
}pub(all) struct EditContext {
focused_id : Signal[String]
configs : Map[String, EditConfig]
restore_tui : () -> Unit
}pub(all) struct EditorState {
buffer : TextBuffer
undo_stack : UndoStack
filename : String
mode : SelectionMode
modified : Bool
}pub(all) struct HeadlessApp {
width : Int
height : Int
output : String
}fn ImeSession::start(self : ImeSession, config : EditConfig, current_value : String, on_complete : () -> Unit, confirm_on_shift_enter? : Bool, esc_cancels? : Bool) -> Unitpub(all) enum InputState {
Idle
Focused
Editing
Disabled
}fn ItemScroller::can_scroll_down(self : ItemScroller, total_items : Int, visible_count : Int) -> Boolfn ItemScroller::indicator(self : ItemScroller, total_items : Int, visible_count : Int) -> ScrollIndicatorfn LineScroller::can_scroll_down(self : LineScroller, total_lines : Int, visible_height : Int) -> Boolfn LineScroller::down(self : LineScroller, n : Int, total_lines : Int, visible_height : Int) -> Boolfn LineScroller::follow_bottom(self : LineScroller, total_lines : Int, visible_height : Int) -> Unitfn[T] LineScroller::slice(self : LineScroller, items : Array[T], heights : Array[Int], visible_height : Int) -> Array[T]fn[T] LineScroller::slice_with_offset(self : LineScroller, items : Array[T], heights : Array[Int], visible_height : Int) -> (Array[T], Int)pub(all) struct ListboxOption {
id : String
label : String
disabled : Bool
}impl Eq for ListboxOptionpub(all) enum MenuKeyResult {
Handled
NotHandled
Closed
}pub(all) struct MenubarState {
open_menu_id : String
focused_item_id : String
open_submenu_path : Array[String]
}pub(all) struct RadioOption {
id : String
label : String
}impl Eq for RadioOptionpub(all) enum ScrollIndicator {
None
Up
Down
Both
}impl Show for ScrollIndicatorfn ScrollState::auto_scroll_to_bottom(self : ScrollState, total_lines : Int, visible_height : Int) -> Unitfn ScrollState::get_indicator(self : ScrollState, total_lines : Int, visible_height : Int) -> ScrollIndicatorfn ScrollState::scroll_down(self : ScrollState, amount : Int, total_lines : Int, visible_height : Int) -> Boolfn ScrollState::scroll_to_bottom(self : ScrollState, total_lines : Int, visible_height : Int) -> Unitpub(all) struct ScrollableView {
lines : Ref[Array[StyledLine]]
offset : Signal[Int]
auto_scroll : Signal[Bool]
width : Ref[Int]
visible_height : Ref[Int]
}pub(all) enum SelectionMode {
Caret
VisualChar
VisualLine
VisualBlock
}pub(all) enum SplitSize {
Fixed(Double)
Percent(Double)
Flex(Double)
}pub(all) enum SplitterOrientation {
Horizontal
Vertical
}pub(all) struct SplitterState {
position : Int
collapsed : Bool
prev_position : Int
focused : Bool
}fn StreamBuffer::render(self : StreamBuffer, component : Component, row? : Int, col? : Int, preserve_cursor? : Bool) -> Unitfn StreamBuffer::render_output(self : StreamBuffer, component : Component, row? : Int, col? : Int, preserve_cursor? : Bool) -> Stringfn StreamingState::start(self : StreamingState, text : String, interval_ms : Int, on_tick : () -> Unit, on_complete : () -> Unit) -> Boolpub(all) struct TabItem {
label : String
id : String
}pub(all) struct TextBuffer {
lines : Array[String]
cursor : CursorPosition
selection : Selection
mode : SelectionMode
modified : Bool
}pub(all) enum TextareaState {
Idle
Focused
Editing
Disabled
}fn accordion(items : Array[AccordionItem], id? : String, focused_id? : String, theme? : Theme, expanded_icon? : String, collapsed_icon? : String, content_padding? : Double, gap? : Double) -> Componentfn ansi_move_to(row : Int, col : Int) -> Stringfn autocomplete(options : Array[ComboboxOption], value : String, id? : String, focused_id? : String, placeholder? : String, theme? : Theme, min_width? : Double, max_visible? : Int) -> Componentfn build_progress_bar(ratio : Double, width : Int, style? : ProgressStyle, show_percent? : Bool) -> Stringfn build_scrollbar(offset : Int, total_items : Int, visible_count : Int, height : Int, track_char? : String, thumb_char? : String) -> Array[String]fn button(label : String, id? : String, state? : ButtonState, theme? : Theme, min_width? : Double, padding_x? : Double, padding_y? : Double, on_click? : () -> Unit?) -> Componentfn calc_labeled_block_lines(content : String, width : Int, indent : String) -> Intfn calc_max_scroll(total_lines : Int, visible_height : Int, reserve_indicator? : Bool) -> Intfn calc_text_lines(text : String, width : Int) -> Intfn column(children : Array[Component], id? : String, width? : Dimension, height? : Dimension, min_width? : Dimension, min_height? : Dimension, max_width? : Dimension, max_height? : Dimension, flex_grow? : Double, flex_shrink? : Double, flex_basis? : Dimension, justify? : Alignment, align? : Alignment, wrap? : Bool, gap? : Double, padding? : Double, padding_x? : Double, padding_y? : Double, margin? : Double, margin_x? : Double, margin_y? : Double, border? : BorderChars?, border_color? : Color, bg? : Color, fg? : Color, on_click? : () -> Unit?, role? : Role?) -> Componentfn combobox(options : Array[ComboboxOption], selected_id : String, id? : String, focused_id? : String, state? : ComboboxState, filter? : String, placeholder? : String, theme? : Theme, width? : Dimension, min_width? : Double, max_visible? : Int, dropdown_icon? : String, dropdown_icon_open? : String) -> Componentfn form_edit_config(field_name : String, signal : Signal[String], on_edit_start? : () -> Unit?, on_edit_end? : () -> Unit?, on_force_quit? : () -> Unit?) -> EditConfigfn fullscreen(children : Array[Component], width : Int, height : Int, border? : BorderChars?, border_color? : Color, padding? : Double) -> Componentfn grid(children : Array[Component], columns? : Int, column_gap? : Double, row_gap? : Double, width? : Dimension, height? : Dimension, min_width? : Dimension, min_height? : Dimension, max_width? : Dimension, max_height? : Dimension, justify_items? : Alignment, align_items? : Alignment, padding? : Double, padding_x? : Double, padding_y? : Double, margin? : Double, margin_x? : Double, margin_y? : Double, border? : BorderChars?, border_color? : Color, bg? : Color, fg? : Color) -> Componentfn ime_input(value : String, is_editing : Bool, focused? : Bool, disabled? : Bool, id? : String, placeholder? : String, fg? : Color, bg? : Color, placeholder_fg? : Color, focus_border_color? : Color, edit_border_color? : Color, disabled_fg? : Color, disabled_bg? : Color, width? : Dimension, height? : Dimension, min_width? : Double, min_height? : Double, padding_x? : Double, padding_y? : Double) -> Componentfn ime_textarea(value : String, is_editing : Bool, focused? : Bool, disabled? : Bool, id? : String, rows? : Int, placeholder? : String, fg? : Color, bg? : Color, placeholder_fg? : Color, focus_border_color? : Color, edit_border_color? : Color, disabled_fg? : Color, disabled_bg? : Color, width? : Dimension, min_width? : Double, padding_x? : Double, padding_y? : Double) -> Componentfn input(value : String, id? : String, placeholder? : String, state? : InputState, fg? : Color, bg? : Color, placeholder_fg? : Color, focus_border_color? : Color, edit_border_color? : Color, disabled_fg? : Color, disabled_bg? : Color, width? : Dimension, height? : Dimension, min_width? : Double, min_height? : Double, padding_x? : Double, padding_y? : Double) -> Componentfn input_plain(value : String, placeholder? : String, state? : InputState, fg? : Color, bg? : Color, placeholder_fg? : Color, underline? : Bool) -> Componentfn labeled_checkbox(label : String, checked : Bool, id? : String, focused? : Bool, disabled? : Bool, label_position? : LabelPosition, theme? : Theme, gap? : Double, on_click? : () -> Unit?) -> Componentfn labeled_switch(label : String, on : Bool, id? : String, focused? : Bool, disabled? : Bool, label_position? : LabelPosition, theme? : Theme, gap? : Double, on_click? : () -> Unit?) -> Componentfn listbox(options : Array[ListboxOption], selected_id : String, id? : String, focused_id? : String, orientation? : ListboxOrientation, theme? : Theme, min_width? : Double, max_height? : Int, padding_x? : Double) -> Componentfn listbox_multi(options : Array[ListboxOption], state : ListboxState, id? : String, orientation? : ListboxOrientation, theme? : Theme, min_width? : Double, max_height? : Int, padding_x? : Double) -> Componentfn menubar(items : Array[MenubarItem], state : MenubarState, id? : String, theme? : Theme, item_padding_x? : Double, dropdown_min_width? : Double) -> Componentfn modal(content : Component, id? : String, width? : Dimension, height? : Dimension, min_width? : Dimension, min_height? : Dimension, max_width? : Dimension, max_height? : Dimension, bg? : Color, fg? : Color, border? : BorderChars?, border_color? : Color, padding? : Double, padding_x? : Double, padding_y? : Double) -> Componentfn modal_with_backdrop(content : Component, id? : String, width? : Dimension, height? : Dimension, min_width? : Dimension, min_height? : Dimension, max_width? : Dimension, max_height? : Dimension, bg? : Color, fg? : Color, border? : BorderChars?, border_color? : Color, padding? : Double, padding_x? : Double, padding_y? : Double, backdrop_bg? : Color, container_width? : Dimension, container_height? : Dimension) -> Componentfn multiline_input(value : String, id? : String, rows? : Int, placeholder? : String, state? : TextareaState, fg? : Color, bg? : Color, placeholder_fg? : Color, focus_border_color? : Color, edit_border_color? : Color, disabled_fg? : Color, disabled_bg? : Color, width? : Dimension, min_width? : Double, padding_x? : Double, padding_y? : Double) -> Componentfn option_list(options : Array[ListboxOption], selected_ids : Array[String], focused_id? : String, multiselectable? : Bool, theme? : Theme) -> Componentfn progress_bar(ratio : Double, width : Int, style? : ProgressStyle, show_percent? : Bool, theme? : Theme) -> Componentfn radiogroup(options : Array[RadioOption], selected_id : String, id? : String, focused_id? : String, orientation? : RadioOrientation, theme? : Theme, selected_icon? : String, unselected_icon? : String, gap? : Double, item_gap? : Double) -> Componentfn resizable_pane(primary : Component, secondary : Component, position : Int, orientation? : SplitterOrientation, id? : String, focused? : Bool, show_position? : Bool, total_size? : Int) -> Componentfn row(children : Array[Component], id? : String, width? : Dimension, height? : Dimension, min_width? : Dimension, min_height? : Dimension, max_width? : Dimension, max_height? : Dimension, flex_grow? : Double, flex_shrink? : Double, flex_basis? : Dimension, justify? : Alignment, align? : Alignment, wrap? : Bool, gap? : Double, padding? : Double, padding_x? : Double, padding_y? : Double, margin? : Double, margin_x? : Double, margin_y? : Double, border? : BorderChars?, border_color? : Color, bg? : Color, fg? : Color, on_click? : () -> Unit?, role? : Role?) -> Componentfn select(options : Array[ComboboxOption], selected_id : String, id? : String, focused_id? : String, open? : Bool, placeholder? : String, theme? : Theme, min_width? : Double, max_visible? : Int) -> Componentfn start_edit(config : EditConfig, current_value : String, on_complete : () -> Unit, confirm_on_shift_enter? : Bool, esc_cancels? : Bool) -> Unitfn start_edit_inplace(config : EditConfig, current_value : String, row : Int, col : Int, width : Int, height : Int, multiline : Bool, on_complete : () -> Unit, confirm_on_shift_enter? : Bool, esc_cancels? : Bool, on_lines_change? : (Int) -> Int?, on_completion? : (String, Int) -> String??) -> Unitfn start_edit_inplace_in_bounds(config : EditConfig, current_value : String, bounds : HitTestResult, multiline : Bool, on_complete : () -> Unit, confirm_on_shift_enter? : Bool, esc_cancels? : Bool, border? : Int, on_lines_change? : (Int) -> Int?, on_completion? : (String, Int) -> String??) -> Unitfn tab_panel(content : Component, id? : String, theme? : Theme, border? : BorderChars?, padding? : Double) -> Componentfn text_button(label : String, state? : ButtonState, theme? : Theme, underline? : Bool) -> Componentfn textarea(value : String, id? : String, rows? : Int, placeholder? : String, state? : TextareaState, fg? : Color, bg? : Color, placeholder_fg? : Color, focus_border_color? : Color, edit_border_color? : Color, disabled_fg? : Color, disabled_bg? : Color, width? : Dimension, min_width? : Double, padding_x? : Double, padding_y? : Double) -> Componentfn truncate_text(s : String, width : Int) -> Stringfn window_splitter(primary : Component, secondary : Component, state : SplitterState, orientation? : SplitterOrientation, id? : String, min? : Int, max? : Int, divider_fg? : Color, divider_bg? : Color, focused_fg? : Color, focused_bg? : Color, total_size? : Int, divider_width? : Double) -> Component