Functions
new
new() -> struct<tui.Program>
struct<tui.Program>
program_options
program_options() -> struct<tui.ProgramOptions>
struct<tui.ProgramOptions>
run
run(program, opts?)
- program
struct<tui.Program>
- opts
struct<tui.ProgramOptions>
spinner
spinner(id, from?) -> struct<tui.Spinner>
- id
int<collection.CRATE_TEA>
- The program id to add the spinner to. - from
int<tui.Spinner>
- The built-in spinner to use.
struct<tui.Spinner>
spinner_custom
spinner_custom(id, frames, fps) -> struct<tui.Spinner>
- id
int<collection.CRATE_TEA>
- The program id to add the spinner to. - frames
[]string
- fps
int
struct<tui.Spinner>
textarea
textarea(id) -> struct<tui.TextArea>
- id
int<collection.CRATE_TEA>
- The program id to add the text area to.
struct<tui.TextArea>
textinput
textinput(id) -> struct<tui.TextInput>
- id
int<collection.CRATE_TEA>
- The program id to add the text input to.
struct<tui.TextInput>
cursor
cursor(id) -> struct<tui.Cursor>
- id
int<collection.CRATE_TEA>
- The program id to add the cursor to.
struct<tui.Cursor>
filepicker
filepicker(id) -> struct<tui.FilePicker>
- id
int<collection.CRATE_TEA>
- The program id to add the file picker to.
struct<tui.FilePicker>
list_item
list_item(title, desc, filter?) -> struct<tui.ListItem>
- title
string
- desc
string
- filter
string
- Defaults to the value of title.
struct<tui.ListItem>
list_filter_state_string
list_filter_state_string(state) -> string
- state
int<tui.FilterState>
string
list
list(id, items, width, height, delegate) -> struct<tui.List>
- id
int<collection.CRATE_TEA>
- The program id to add the list to. - items
[]struct<tui.ListItem>
- Array of list items. - width
int
- height
int
- delegate
struct<tui.ListDelegate>
struct<tui.List>
list_delegate
list_delegate(id) -> struct<tui.ListDelegate>
- id
int<collection.CRATE_TEA>
- The program id to add the list to.
struct<tui.ListDelegate>
list_filter_rank
list_filter_rank(index, matched) -> struct<tui.ListFilterRank>
- index
int
- matched
[]int
struct<tui.ListFilterRank>
paginator
paginator(id, per?, total?) -> struct<tui.Paginator>
- id
int<collection.CRATE_TEA>
- The program id to add the paginator to. - per
int
- Not set if left at default value of 0. - total
int
- Not set if left at default value of 0.
struct<tui.Paginator>
progress_options
progress_options() -> struct<tui.ProgressOptions>
struct<tui.ProgressOptions>
progress
progress(id, options?) -> struct<tui.Progress>
- id
int<collection.CRATE_TEA>
- The program id to add the progress bar to. - options
struct<tui.ProgressOptions>
struct<tui.Progress>
stopwatch
stopwatch(id, interval?) -> struct<tui.StopWatch>
- id
int<collection.CRATE_TEA>
- The program id to add the stopwatch to. - interval
int
struct<tui.StopWatch>
timer
timer(id, timeout, interval?) -> struct<tui.Timer>
- id
int<collection.CRATE_TEA>
- The program id to add the timer to. - timeout
int
- interval
int
struct<tui.Timer>
table_options
table_options() -> struct<tui.TableOptions>
struct<tui.TableOptions>
table_column
table_column(title, width) -> struct<tui.TableColumn>
- title
string
- width
int
struct<tui.TableColumn>
table
table(id, options?) -> struct<tui.Table>
- id
int<collection.CRATE_TEA>
- The program id to add the table to. - options
struct<tui.TableOptions>
struct<tui.Table>
viewport
viewport(id, width, height) -> struct<tui.Viewport>
- id
int<collection.CRATE_TEA>
- The program id to add the viewport to. - width
int
- height
int
struct<tui.Viewport>
viewport_sync
viewport_sync(model) -> struct<tui.CMDViewportSync>
- model
int
- ID of the viewport model.
struct<tui.CMDViewportSync>
viewport_view_up
viewport_view_up(model, lines) -> struct<tui.CMDViewportUp>
- model
int
- ID of the viewport model. - lines
[]string
struct<tui.CMDViewportUp>
viewport_view_down
viewport_view_down(model, lines) -> struct<tui.CMDViewportDown>
- model
int
- ID of the viewport model. - lines
[]string
struct<tui.CMDViewportDown>
custom
custom(id, init, update, view) -> struct<tui.Custom>
- id
int<collection.CRATE_TEA>
- init
function(id int) -> table<any>, struct<tui.CMD>
- update
function(data table<any>, msg struct<tui.MSG>) -> struct<tui.CMD>
- view
function(data table<any>) -> string
struct<tui.Custom>
keybinding_option
keybinding_option() -> struct<tui.KeyOption>
struct<tui.KeyOption>
keybinding
keybinding(id, option) -> struct<tui.Keybinding>
- id
int<collection.CRATE_TEA>
- option
struct<tui.KeyOption>
struct<tui.Keybinding>
key_match
key_match(msg, keybindings...) -> bool
- msg
struct<tui.MSGKey>
- keybinding
struct<tui.Keybinding>...
bool
help
help(id) -> struct<tui.Help>
- id
int<collection.CRATE_TEA>
- The program id to add the help to.
struct<tui.Help>
image
image(id, active, borderless, borderColor?) -> struct<tui.Image>
- id
int<collection.CRATE_TEA>
- The program id to add the image to. - active
bool
- borderless
bool
- borderColor
struct<lipgloss.ColorAdaptive>
- Defaults to white and black.
struct<tui.Image>
image_to_string
image_to_string(img, width?) -> string
@blocking
- img
int<collection.IMAGE>
- width
int
- Defaults to the image's width.
string
statusbar
statusbar(id, first_foreground, first_background, second_foreground, second_background, third_foreground, third_background, fourth_foreground, fourth_background) -> struct<tui.StatusBar>
- id
int<collection.CRATE_TEA>
- The program id to add the statusbar to. - first_foreground
struct<lipgloss.AdaptiveColor>
- first_background
struct<lipgloss.AdaptiveColor>
- second_foreground
struct<lipgloss.AdaptiveColor>
- second_background
struct<lipgloss.AdaptiveColor>
- third_foreground
struct<lipgloss.AdaptiveColor>
- third_background
struct<lipgloss.AdaptiveColor>
- fourth_foreground
struct<lipgloss.AdaptiveColor>
- fourth_background
struct<lipgloss.AdaptiveColor>
struct<tui.StatusBar>
file_is_hidden
file_is_hidden(path) -> bool
- path
string
bool
cmd_none
cmd_none() -> struct<tui.CMDNone>
struct<tui.CMDNone>
cmd_suspend
cmd_suspend() -> struct<tui.CMDSuspend>
struct<tui.CMDSuspend>
cmd_quit
cmd_quit() -> struct<tui.CMDQuit>
struct<tui.CMDQuit>
cmd_batch
cmd_batch(cmds) -> struct<tui.CMDBatch>
- cmds
[]struct<tui.CMD>
struct<tui.CMDBatch>
cmd_sequence
cmd_sequence(cmds) -> struct<tui.CMDSequence>
- cmds
[]struct<tui.CMD>
struct<tui.CMDSequence>
cmd_printf
cmd_printf(format, args...) -> struct<tui.CMDPrintf>
- format
string
- args
any...
struct<tui.CMDPrintf>
cmd_println
cmd_println(args...) -> struct<tui.CMDPrintln>
- args
any...
struct<tui.CMDPrintln>
cmd_window_title
cmd_window_title(title) -> struct<tui.CMDWindowTitle>
- title
string
struct<tui.CMDWindowTitle>
cmd_window_size
cmd_window_size() -> struct<tui.CMDWindowSize>
struct<tui.CMDWindowSize>
cmd_show_cursor
cmd_show_cursor() -> struct<tui.CMDShowCursor>
struct<tui.CMDShowCursor>
cmd_hide_cursor
cmd_hide_cursor() -> struct<tui.CMDHideCursor>
struct<tui.CMDHideCursor>
cmd_clear_screen
cmd_clear_screen() -> struct<tui.CMDClearScreen>
struct<tui.CMDClearScreen>
cmd_clear_scroll_area
cmd_clear_scroll_area() -> struct<tui.CMDClearScrollArea>
struct<tui.CMDClearScrollArea>
cmd_scroll_sync
cmd_scroll_sync(lines, top, bottom) -> struct<tui.CMDScrollSync>
- lines
[]string
- top
int
- bottom
int
struct<tui.CMDScrollSync>
cmd_scroll_up
cmd_scroll_up(lines, top, bottom) -> struct<tui.CMDScrollUp>
- lines
[]string
- top
int
- bottom
int
struct<tui.CMDScrollUp>
cmd_scroll_down
cmd_scroll_down(lines, top, bottom) -> struct<tui.CMDScrollDown>
- lines
[]string
- top
int
- bottom
int
struct<tui.CMDScrollDown>
cmd_every
cmd_every(duration, fn) -> struct<tui.CMDEvery>
- duration
int
- Time in ms. - fn
function(ms int) -> any
struct<tui.CMDEvery>
cmd_tick
cmd_tick(duration, fn) -> struct<tui.CMDTick>
- duration
int
- Time in ms. - fn
function(ms int) -> any
struct<tui.CMDTick>
cmd_toggle_report_focus
cmd_toggle_report_focus(enabled?) -> struct<tui.CMDToggleReportFocus>
- enabled
bool
struct<tui.CMDToggleReportFocus>
cmd_toggle_bracketed_paste
cmd_toggle_bracketed_paste(enabled?) -> struct<tui.CMDToggleBracketedPaste>
- enabled
bool
struct<tui.CMDToggleBracketedPaste>
cmd_disable_mouse
cmd_disable_mouse() -> struct<tui.CMDDisableMouse>
struct<tui.CMDDisableMouse>
cmd_enable_mouse_all_motion
cmd_enable_mouse_all_motion() -> struct<tui.CMDEnableMouseAllMotion>
struct<tui.CMDEnableMouseAllMotion>
cmd_enable_mouse_cell_motion
cmd_enable_mouse_cell_motion() -> struct<tui.CMDEnableMouseCellMotion>
struct<tui.CMDEnableMouseCellMotion>
cmd_enter_alt_screen
cmd_enter_alt_screen() -> struct<tui.CMDEnterAltScreen>
struct<tui.CMDEnterAltScreen>
cmd_exit_alt_screen
cmd_exit_alt_screen() -> struct<tui.CMDExitAltScreen>
struct<tui.CMDExitAltScreen>
Constants
CMDID
CMD_NONE
CMD_STORED
CMD_BATCH
CMD_SEQUENCE
CMD_SPINNERTICK
CMD_TEXTAREAFOCUS
CMD_TEXTINPUTFOCUS
CMD_BLINK
CMD_CURSORFOCUS
CMD_FILEPICKERINIT
CMD_LISTSETITEMS
CMD_LISTINSERTITEM
CMD_LISTSETITEM
CMD_LISTSTATUSMESSAGE
CMD_LISTSPINNERSTART
CMD_LISTSPINNERTOGGLE
CMD_PROGRESSSET
CMD_PROGRESSDEC
CMD_PROGRESSINC
CMD_STOPWATCHSTART
CMD_STOPWATCHSTOP
CMD_STOPWATCHTOGGLE
CMD_STOPWATCHRESET
CMD_TIMERINIT
CMD_TIMERSTART
CMD_TIMERSTOP
CMD_TIMERTOGGLE
CMD_VIEWPORTSYNC
CMD_VIEWPORTUP
CMD_VIEWPORTDOWN
CMD_PRINTF
CMD_PRINTLN
CMD_WINDOWTITLE
CMD_WINDOWSIZE
CMD_SUSPEND
CMD_QUIT
CMD_SHOWCURSOR
CMD_HIDECURSOR
CMD_CLEARSCREEN
CMD_CLEARSCROLLAREA
CMD_SCROLLSYNC
CMD_SCROLLUP
CMD_SCROLLDOWN
CMD_EVERY
CMD_TICK
CMD_TOGGLEREPORTFOCUS
CMD_TOGGLEBRACKETEDPASTE
CMD_DISABLEMOUSE
CMD_ENABLEMOUSEALLMOTION
CMD_ENABLEMOUSECELLMOTION
CMD_ENTERALTSCREEN
CMD_EXITALTSCREEN
CMD_IMAGESIZE
CMD_IMAGEFILE
MSGID
MSG_NONE
MSG_BLUR
MSG_FOCUS
MSG_QUIT
MSG_RESUME
MSG_SUSPEND
MSG_WINDOWSIZE
MSG_KEY
MSG_MOUSE
MSG_SPINNERTICK
MSG_BLINK
MSG_STOPWATCHRESET
MSG_STOPWATCHSTARTSTOP
MSG_STOPWATCHTICK
MSG_TIMERSTARTSTOP
MSG_TIMERTICK
MSG_TIMERTIMEOUT
MSG_LUA
Spinner
SPINNER_LINE
SPINNER_DOT
SPINNER_MINIDOT
SPINNER_JUMP
SPINNER_PULSE
SPINNER_POINTS
SPINNER_GLOBE
SPINNER_MOON
SPINNER_MONKEY
SPINNER_METER
SPINNER_HAMBURGER
SPINNER_ELLIPSIS
EchoMode
ECHO_NORMAL
ECHO_PASSWORD
ECHO_NONE
CursorMode
CURSOR_BLINK
CURSOR_STATIC
CURSOR_HIDE
FilterState
FILTERSTATE_UNFILTERED
FILTERSTATE_FILTERING
FILTERSTATE_APPLIED
PaginatorType
PAGINATOR_ARABIC
PAGINATOR_DOT
FilterFunc
FILTERFUNC_DEFAULT
FILTERFUNC_UNSORTED
MouseAction
MOUSE_PRESS
MOUSE_RELEASE
MOUSE_MOTION
MouseButton
MOUSEBUTTON_NONE
MOUSEBUTTON_LEFT
MOUSEBUTTON_MIDDLE
MOUSEBUTTON_RIGHT
MOUSEBUTTON_WHEELUP
MOUSEBUTTON_WHEELDOWN
MOUSEBUTTON_WHEELLEFT
MOUSEBUTTON_WHEELRIGHT
MOUSEBUTTON_BACKWARD
MOUSEBUTTON_FORWARD
MOUSEBUTTON_10
MOUSEBUTTON_11
Key
KEY_NULL
KEY_BREAK
KEY_ENTER
KEY_BACKSPACE
KEY_TAB
KEY_ESC
KEY_ESCAPE
KEY_CTRL_AT
KEY_CTRL_A
KEY_CTRL_B
KEY_CTRL_C
KEY_CTRL_D
KEY_CTRL_E
KEY_CTRL_F
KEY_CTRL_G
KEY_CTRL_H
KEY_CTRL_I
KEY_CTRL_J
KEY_CTRL_K
KEY_CTRL_L
KEY_CTRL_M
KEY_CTRL_N
KEY_CTRL_O
KEY_CTRL_P
KEY_CTRL_Q
KEY_CTRL_R
KEY_CTRL_S
KEY_CTRL_T
KEY_CTRL_U
KEY_CTRL_V
KEY_CTRL_W
KEY_CTRL_X
KEY_CTRL_Y
KEY_CTRL_Z
KEY_CTRL_OPEN_BRACKET
KEY_CTRL_BACKSLASH
KEY_CTRL_CLOSE_BRACKET
KEY_CTRL_CARET
KEY_CTRL_UNDERSCORE
KEY_CTRL_QUESTION_MARK
KEY_RUNES
KEY_UP
KEY_DOWN
KEY_RIGHT
KEY_LEFT
KEY_SHIFTTAB
KEY_HOME
KEY_END
KEY_PGUP
KEY_PGDOWN
KEY_CTRL_PGUP
KEY_CTRL_PGDOWN
KEY_DELETE
KEY_INSERT
KEY_SPACE
KEY_CTRL_UP
KEY_CTRL_DOWN
KEY_CTRL_RIGHT
KEY_CTRL_LEFT
KEY_CTRL_HOME
KEY_CTRL_END
KEY_SHIFT_UP
KEY_SHIFT_DOWN
KEY_SHIFT_RIGHT
KEY_SHIFT_LEFT
KEY_SHIFT_HOME
KEY_SHIFT_END
KEY_CTRL_SHIFT_UP
KEY_CTRL_SHIFT_DOWN
KEY_CTRL_SHIFT_LEFT
KEY_CTRL_SHIFT_RIGHT
KEY_CTRL_SHIFT_HOME
KEY_CTRL_SHIFT_END
KEY_F1
KEY_F2
KEY_F3
KEY_F4
KEY_F5
KEY_F6
KEY_F7
KEY_F8
KEY_F9
KEY_F10
KEY_F11
KEY_F12
KEY_F13
KEY_F14
KEY_F15
KEY_F16
KEY_F17
KEY_F18
KEY_F19
KEY_F20
Structs
ListFilterRank
- index
int
- The index of the item. - matched
[]int
- The indexes of the matched words.
CMDViewportSync
- cmd
int<tui.CMDID>
- The command type. - id
int
- The viewport id.
CMDViewportUp
- cmd
int<tui.CMDID>
- The command type. - id
int
- The viewport id.
CMDViewportDown
- cmd
int<tui.CMDID>
- The command type. - id
int
- The viewport id.
CMDNone
- cmd
int<tui.CMDID>
- The command type.
CMDSuspend
- cmd
int<tui.CMDID>
- The command type.
CMDQuit
- cmd
int<tui.CMDID>
- The command type.
CMDBatch
- cmd
int<tui.CMDID>
- The command type. - cmds
[]struct<tui.CMD>
- The commands to execute.
CMDSequence
- cmd
int<tui.CMDID>
- The command type. - cmds
[]struct<tui.CMD>
- The commands to execute.
CMDPrintf
- cmd
int<tui.CMDID>
- The command type. - format
string
- The format string. - args
[]any
- The arguments to format.
CMDPrintln
- cmd
int<tui.CMDID>
- The command type. - args
[]any
- The arguments to print.
CMDWindowTitle
- cmd
int<tui.CMDID>
- The command type. - title
string
- The title to set.
CMDWindowSize
- cmd
int<tui.CMDID>
- The command type.
CMDShowCursor
- cmd
int<tui.CMDID>
- The command type.
CMDHideCursor
- cmd
int<tui.CMDID>
- The command type.
CMDClearScreen
- cmd
int<tui.CMDID>
- The command type.
CMDClearScrollArea
- cmd
int<tui.CMDID>
- The command type.
CMDScrollSync
- cmd
int<tui.CMDID>
- The command type. - lines
[]string
- The lines to display. - top
int
- The top line. - bottom
int
- The bottom line.
CMDScrollUp
- cmd
int<tui.CMDID>
- The command type. - lines
[]string
- The lines to display. - top
int
- The top line. - bottom
int
- The bottom line.
CMDScrollDown
- cmd
int<tui.CMDID>
- The command type. - lines
[]string
- The lines to display. - top
int
- The top line. - bottom
int
- The bottom line.
CMDEvery
- cmd
int<tui.CMDID>
- The command type. - duration
int
- Time in ms. - fn
function(ms int) -> any
- The function to call.
CMDTick
- cmd
int<tui.CMDID>
- The command type. - duration
int
- Time in ms. - fn
function(ms int) -> any
- The function to call.
CMDToggleReportFocus
- cmd
int<tui.CMDID>
- The command type. - enabled
bool
- Whether to report focus.
CMDToggleBracketedPaste
- cmd
int<tui.CMDID>
- The command type. - enabled
bool
- Whether to enable bracketed paste.
CMDDisableMouse
- cmd
int<tui.CMDID>
- The command type.
CMDEnableMouseAllMotion
- cmd
int<tui.CMDID>
- The command type.
CMDEnableMouseCellMotion
- cmd
int<tui.CMDID>
- The command type.
CMDEnterAltScreen
- cmd
int<tui.CMDID>
- The command type.
CMDExitAltScreen
- cmd
int<tui.CMDID>
- The command type.
CMDStored
- cmd
int<tui.CMDID>
- The command type. - id
int
CMDSpinnerTick
- cmd
int<tui.CMDID>
- The command type. - id
int
- The spinner id.
CMDTextAreaFocus
- cmd
int<tui.CMDID>
- The command type. - id
int
- The text area id.
CMDTextInputFocus
- cmd
int<tui.CMDID>
- The command type. - id
int
- The text input id.
CMDBlink
- cmd
int<tui.CMDID>
- The command type. - id
int
- The cursor id.
CMDCursorFocus
- cmd
int<tui.CMDID>
- The command type. - id
int
- The cursor id.
CMDFilePickerInit
- cmd
int<tui.CMDID>
- The command type. - id
int
- The file picker id.
CMDListSetItems
- cmd
int<tui.CMDID>
- The command type. - id
int
- The list id. - items
[]struct<tui.ListItem>
- The items to set.
CMDListInsertItem
- cmd
int<tui.CMDID>
- The command type. - id
int
- The list id. - index
int
- The index to insert at. - item
struct<tui.ListItem>
- The item to insert.
CMDListSetItem
- cmd
int<tui.CMDID>
- The command type. - id
int
- The list id. - index
int
- The index to set. - item
struct<tui.ListItem>
- The item to set.
CMDListStatusMessage
- cmd
int<tui.CMDID>
- The command type. - id
int
- The list id. - msg
string
- The message to display.
CMDListSpinnerStart
- cmd
int<tui.CMDID>
- The command type. - id
int
- The list id.
CMDListSpinnerToggle
- cmd
int<tui.CMDID>
- The command type. - id
int
- The list id.
CMDProgressSet
- cmd
int<tui.CMDID>
- The command type. - id
int
- The progress id. - percent
float
- The percentage.
CMDProgressDec
- cmd
int<tui.CMDID>
- The command type. - id
int
- The progress id. - percent
float
- The percentage to decrease.
CMDProgressInc
- cmd
int<tui.CMDID>
- The command type. - id
int
- The progress id. - percent
float
- The percentage to increase.
CMDStopWatchStart
- cmd
int<tui.CMDID>
- The command type. - id
int
- The stopwatch id.
CMDStopWatchStop
- cmd
int<tui.CMDID>
- The command type. - id
int
- The stopwatch id.
CMDStopWatchReset
- cmd
int<tui.CMDID>
- The command type. - id
int
- The stopwatch id.
CMDStopWatchToggle
- cmd
int<tui.CMDID>
- The command type. - id
int
- The stopwatch id.
CMDTimerStart
- cmd
int<tui.CMDID>
- The command type. - id
int
- The timer id.
CMDTimerInit
- cmd
int<tui.CMDID>
- The command type. - id
int
- The timer id.
CMDTimerStop
- cmd
int<tui.CMDID>
- The command type. - id
int
- The timer id.
CMDTimerToggle
- cmd
int<tui.CMDID>
- The command type. - id
int
- The timer id.
CMDImageSize
- cmd
int<tui.CMDID>
- The command type. - id
int
- The image id. - width
int
- The width. - height
int
- The height.
CMDImageFile
- cmd
int<tui.CMDID>
- The command type. - id
int
- The image id. - filename
string
- The filename.
MSGNone
- msg
int<tui.MSGID>
- The message type.
MSGBlur
- msg
int<tui.MSGID>
- The message type.
MSGFocus
- msg
int<tui.MSGID>
- The message type.
MSGQuit
- msg
int<tui.MSGID>
- The message type.
MSGResume
- msg
int<tui.MSGID>
- The message type.
MSGSuspend
- msg
int<tui.MSGID>
- The message type.
MSGCursorBlink
- msg
int<tui.MSGID>
- The message type.
MSGKey
- msg
int<tui.MSGID>
- The message type. - key
string
- The key pressed. - event
struct<tui.KeyEvent>
- The key event.
MSGMouse
- msg
int<tui.MSGID>
- The message type. - key
string
- The key pressed. - event
struct<tui.MouseEvent>
- The mouse event.
MSGWindowSize
- msg
int<tui.MSGID>
- The message type. - width
int
- The width. - height
int
- The height.
MSGSpinnerTick
- msg
int<tui.MSGID>
- The message type. - id
int
- The spinner id.
MSGStopwatchReset
- msg
int<tui.MSGID>
- The message type. - id
int
- The stopwatch id.
MSGStopwatchStartStop
- msg
int<tui.MSGID>
- The message type. - id
int
- The stopwatch id.
MSGStopwatchTick
- msg
int<tui.MSGID>
- The message type. - id
int
- The stopwatch id.
MSGTimerStartStop
- msg
int<tui.MSGID>
- The message type. - id
int
- The timer id.
MSGTimerTimeout
- msg
int<tui.MSGID>
- The message type. - id
int
- The timer id.
MSGTimerTick
- msg
int<tui.MSGID>
- The message type. - id
int
- The timer id. - timeout
int
- If this tick is a timeout.
MSGLua
- msg
int<tui.MSGID>
- The message type. - value
any
- The value.
KeyEvent
- type
int<tui.Key
- The key event type. - alt
bool
- Whether the alt key was pressed. - paste
bool
- runes
[]int
MouseEvent
- x
int
- The x position. - y
int
- The y position. - shift
bool
- Whether the shift key was pressed. - alt
bool
- Whether the alt key was pressed. - ctrl
bool
- Whether the ctrl key was pressed. - action
int<tui.MouseAction>
- The mouse action. - button
int<tui.MouseButton>
- The mouse button. - is_wheel
bool
- Whether the event is a wheel event.
Program
- id
int
init
init(self, {function(id int<collection.CRATE_TEA>) -> any, struct<tui.CMD>}) -> self
update
update(self, {function(data any, struct<tui.MSG>) -> struct<tui.CMD>}) -> self
view
view(self, {function(data any) -> string}) -> self
ProgramOptions
ansi_compressor
ansi_compressor(self) -> self
alt_screen
alt_screen(self) -> self
fps
fps(self, fps int) -> self
filter
filter(self, filter {function(msg struct<tui.MSG>) -> bool}) -> self
input_tty
input_tty(self) -> self
mouse_all_motion
mouse_all_motion(self) -> self
mouse_cell_motion
mouse_cell_motion(self) -> self
report_focus
report_focus(self) -> self
no_bracketed_paste
no_bracketed_paste(self) -> self
Spinner
- program
int
- id
int
view
view() -> string
update
update() -> struct<tui.CMD>
tick
tick() -> struct<tui.CMDSpinnerTick>
spinner
spinner() -> []string, int
spinner_set
spinner_set(self, from int) -> self
spinner_set_custom
spinner_set_custom(self, frames []string, fps int) -> self
style
style() -> struct<lipgloss.Style>
style_set
style_set(self, style struct<lipgloss.Style>) -> self
TextArea
- program
int
- id
int
view
view() -> string
update
update() -> struct<tui.CMD>
reset
reset(self) -> self
focus
focus() -> struct<tui.CMDTextAreaFocus>
blur
blur(self) -> self
cursor_down
cursor_down(self) -> self
cursor_end
cursor_end(self) -> self
cursor_up
cursor_up(self) -> self
cursor_down
cursor_down(self) -> self
focused
focused() -> bool
size
size() -> int, int
width
width() -> int
height
height() -> int
size_set
size_set(self, width int, height int) -> self
width_set
width_set(self, width int) -> self
height_set
height_set(self, height int) -> self
insert_rune
insert_rune(self, rune int) -> self
insert_string
insert_string(self, str string) -> self
length
length() -> int
line
line() -> int
line_count
line_count() -> int
cursor_set
cursor_set(self, col int) -> self
value
value() -> string
value_set
value_set(str string)
line_info
line_info() -> struct<tui.LineInfo>
prompt
prompt() -> string
prompt_set
prompt_set(self, str string) -> self
line_numbers
line_numbers() -> bool
line_numbers_set
line_numbers_set(self, enabled bool) -> self
char_end
char_end() -> int
char_end_set
char_end_set(self, rune int) -> self
char_limit
char_limit() -> int
char_limit_set
char_limit_set(self, limit int) -> self
width_max
width_max() -> int
width_max_set
width_max_set(self, width int) -> self
height_max
height_max() -> int
height_max_set
height_max_set(self, height int) -> self
prompt_func
prompt_func(self, width int, fn {function(lineIndex int) -> string}) -> self
cursor
cursor() -> struct<tui.Cursor>
keymap
keymap() -> struct<tui.TextAreaKeymap>
style_focus_base
style_focus_base() -> struct<lipgloss.Style>
style_focus_base_set
style_focus_base_set(self, style struct<lipgloss.Style>) -> self
style_blur_base
style_blur_base() -> struct<lipgloss.Style>
style_blur_base_set
style_blur_base_set(self, style struct<lipgloss.Style>) -> self
style_focus_cursor_line
style_focus_cursor_line() -> struct<lipgloss.Style>
style_focus_cursor_line_set
style_focus_cursor_line_set(self, style struct<lipgloss.Style>) -> self
style_blur_cursor_line
style_blur_cursor_line() -> struct<lipgloss.Style>
style_blur_cursor_line_set
style_blur_cursor_line_set(self, style struct<lipgloss.Style>) -> self
style_focus_cursor_line_number
style_focus_cursor_line_number() -> struct<lipgloss.Style>
style_focus_cursor_line_number_set
style_focus_cursor_line_number_set(self, style struct<lipgloss.Style>) -> self
style_blur_cursor_line_number
style_blur_cursor_line_number() -> struct<lipgloss.Style>
style_blur_cursor_line_number_set
style_blur_cursor_line_number_set(self, style struct<lipgloss.Style>) -> self
style_focus_buffer_end
style_focus_buffer_end() -> struct<lipgloss.Style>
style_focus_buffer_end_set
style_focus_buffer_end_set(self, style struct<lipgloss.Style>) -> self
style_blur_buffer_end
style_blur_buffer_end() -> struct<lipgloss.Style>
style_blur_buffer_end_set
style_blur_buffer_end_set(self, style struct<lipgloss.Style>) -> self
style_focus_line_number
style_focus_line_number() -> struct<lipgloss.Style>
style_focus_line_number_set
style_focus_line_number_set(self, style struct<lipgloss.Style>) -> self
style_blur_line_number
style_blur_line_number() -> struct<lipgloss.Style>
style_blur_line_number_set
style_blur_line_number_set(self, style struct<lipgloss.Style>) -> self
style_focus_placeholder
style_focus_placeholder() -> struct<lipgloss.Style>
style_focus_placeholder_set
style_focus_placeholder_set(self, style struct<lipgloss.Style>) -> self
style_blur_placeholder
style_blur_placeholder() -> struct<lipgloss.Style>
style_blur_placeholder_set
style_blur_placeholder_set(self, style struct<lipgloss.Style>) -> self
style_focus_prompt
style_focus_prompt() -> struct<lipgloss.Style>
style_focus_prompt_set
style_focus_prompt_set(self, style struct<lipgloss.Style>) -> self
style_blur_prompt
style_blur_prompt() -> struct<lipgloss.Style>
style_blur_prompt_set
style_blur_prompt_set(self, style struct<lipgloss.Style>) -> self
style_focus_text
style_focus_text() -> struct<lipgloss.Style>
style_focus_text_set
style_focus_text_set(self, style struct<lipgloss.Style>) -> self
style_blur_text
style_blur_text() -> struct<lipgloss.Style>
style_blur_text_set
style_blur_text_set(self, style struct<lipgloss.Style>) -> self
TextAreaKeymap
- program
int
- id
int
- character_backward
struct<tui.KeyBinding>
- character_forward
struct<tui.KeyBinding>
- delete_after_cursor
struct<tui.KeyBinding>
- delete_before_cursor
struct<tui.KeyBinding>
- delete_character_backward
struct<tui.KeyBinding>
- delete_character_forward
struct<tui.KeyBinding>
- delete_word_backward
struct<tui.KeyBinding>
- delete_word_forward
struct<tui.KeyBinding>
- insert_newline
struct<tui.KeyBinding>
- line_end
struct<tui.KeyBinding>
- line_next
struct<tui.KeyBinding>
- line_previous
struct<tui.KeyBinding>
- line_start
struct<tui.KeyBinding>
- paste
struct<tui.KeyBinding>
- word_backward
struct<tui.KeyBinding>
- word_forward
struct<tui.KeyBinding>
- input_begin
struct<tui.KeyBinding>
- input_end
struct<tui.KeyBinding>
- uppercase_word
struct<tui.KeyBinding>
- lowercase_word
struct<tui.KeyBinding>
- capitalize_word
struct<tui.KeyBinding>
- transpose_character_backward
struct<tui.KeyBinding>
default
default(self) -> self
help_short
help_short() -> []struct<tui.KeyBinding>
help_full
help_full() -> [][]struct<tui.KeyBinding>
LineInfo
- width
int
- width_char
int
- height
int
- column_start
int
- column_offset
int
- row_offset
int
- char_offset
int
TextInput
- program
int
- id
int
view
view() -> string
update
update() -> struct<tea.Cmd>
focus
focus() -> struct<tea.CmdTextInputFocus>
reset
reset(self) -> self
blur
blur(self) -> self
cursor_start
cursor_start(self) -> self
cursor_end
cursor_end(self) -> self
current_suggestion
current_suggestion() -> string
available_suggestions
available_suggestions() -> []string
suggestions_set
suggestions_set(self, suggestions []string) -> self
focused
focused() -> bool
position
position() -> int
position_set
position_set(self, pos int) -> self
value
value() -> string
value_set
value_set(self, val string) -> self
validate
validate(self, fn func(string) -> bool, string) -> self
prompt
prompt() -> string
prompt_set
prompt_set(self, string) -> self
placeholder
placeholder() -> string
placeholder_set
placeholder_set(self, string) -> self
echomode
echomode() -> int<tui.EchoMode>
echomode_set
echomode_set(self, int<tui.EchoMode>) -> self
echo_char
echo_char() -> int
echo_char_set
echo_char_set(self, rune int) -> self
char_limit
char_limit() -> int
char_limit_set
char_limit_set(self, int) -> self
width
width() -> int
width_set
width_set(self, int) -> self
suggestions_show
suggestions_show() -> bool
suggestions_show_set
suggestions_show_set(self, bool) -> self
cursor
cursor() -> struct<tui.Cursor>
keymap
keymap() -> struct<TextInputKeymap>
style_prompt
style_prompt() -> struct<lipgloss.Style>
style_prompt_set
style_prompt_set(self, struct<lipgloss.Style>) -> self
style_text
style_text() -> struct<lipgloss.Style>
style_text_set
style_text_set(self, struct<lipgloss.Style>) -> self
style_placeholder
style_placeholder() -> struct<lipgloss.Style>
style_placeholder_set
style_placeholder_set(self, struct<lipgloss.Style>) -> self
style_completion
style_completion() -> struct<lipgloss.Style>
style_completion_set
style_completion_set(self, struct<lipgloss.Style>) -> self
TextInputKeymap
- program
int
- id
int
- character_forward
struct<tui.KeyBinding>
- character_backward
struct<tui.KeyBinding>
- word_forward
struct<tui.KeyBinding>
- word_backward
struct<tui.KeyBinding>
- delete_word_backward
struct<tui.KeyBinding>
- delete_word_forward
struct<tui.KeyBinding>
- delete_after_cursor
struct<tui.KeyBinding>
- delete_before_cursor
struct<tui.KeyBinding>
- delete_character_backward
struct<tui.KeyBinding>
- delete_character_forward
struct<tui.KeyBinding>
- line_start
struct<tui.KeyBinding>
- line_end
struct<tui.KeyBinding>
- paste
struct<tui.KeyBinding>
- suggestion_accept
struct<tui.KeyBinding>
- suggestion_next
struct<tui.KeyBinding>
- suggestion_prev
struct<tui.KeyBinding>
default
default(self) -> self
help_short
help_short() -> []struct<tui.KeyBinding>
help_full
help_full() -> [][]struct<tui.KeyBinding>
Cursor
- program
int
- id
int
view
view() -> string
update
update() -> struct<tui.CMD>
blink
blink() -> struct<tui.CMDBlink>
focus
focus() -> struct<tui.CMDCursorFocus>
blur
blur(self) -> self
mode
mode() -> int<tui.CursorMode>
mode_set
mode_set(self, mode int<tui.CursorMode>) -> self
char_set
char_set(self, str string) -> self
style
style() -> struct<lipgloss.Style>
style_set
style_set(self, style struct<lipgloss.Style>) -> self
style_text
style_text() -> struct<lipgloss.Style>
style_text_set
style_text_set(self, style struct<lipgloss.Style>) -> self
FilePicker
- program
int
- id
int
view
view() -> string
update
update() -> struct<tui.CMD>
did_select_file
did_select_file() -> bool, string
did_select_disabled
did_select_disabled() -> bool, string
init
init() -> struct<tui.CMDFilePickerInit>
path
path() -> string
path_set
path_set(self, path string) -> self
current_directory
current_directory() -> string
current_directory_set
current_directory_set(self, dir string) -> self
allowed_types
allowed_types() -> []string
allowed_types_set
allowed_types_set(self, types []string) -> self
show_perm
show_perm() -> bool
show_perm_set
show_perm_set(self, show bool) -> self
show_size
show_size() -> bool
show_size_set
show_size_set(self, show bool) -> self
show_hidden
show_hidden() -> bool
show_hidden_set
show_hidden_set(self, show bool) -> self
dir_allowed
dir_allowed() -> bool
dir_allowed_set
dir_allowed_set(self, allowed bool) -> self
file_allowed
file_allowed() -> bool
file_allowed_set
file_allowed_set(self, allowed bool) -> self
file_selected
file_selected() -> string
file_selected_set
file_selected_set(self, file string) -> self
height
height() -> int
height_set
height_set(self, height int) -> self
height_auto
height_auto() -> bool
height_auto_set
height_auto_set(self, auto bool) -> self
cursor
cursor() -> string
cursor_set
cursor_set(self, cursor string) -> self
keymap
keymap() -> struct<tui.FilePickerKeymap>
style_cursor
style_cursor() -> struct<lipgloss.Style>
style_cursor_set
style_cursor_set(self, style struct<lipgloss.Style>) -> self
style_cursor_disabled
style_cursor_disabled() -> struct<lipgloss.Style>
style_cursor_disabled_set
style_cursor_disabled_set(self, style struct<lipgloss.Style>) -> self
style_symlink
style_symlink() -> struct<lipgloss.Style>
style_symlink_set
style_symlink_set(self, style struct<lipgloss.Style>) -> self
style_directory
style_directory() -> struct<lipgloss.Style>
style_directory_set
style_directory_set(self, style struct<lipgloss.Style>) -> self
style_directory_empty
style_directory_empty() -> struct<lipgloss.Style>
style_directory_empty_set
style_directory_empty_set(self, style struct<lipgloss.Style>) -> self
style_file
style_file() -> struct<lipgloss.Style>
style_file_set
style_file_set(self, style struct<lipgloss.Style>) -> self
style_file_size
style_file_size() -> struct<lipgloss.Style>
style_file_size_set
style_file_size_set(self, style struct<lipgloss.Style>) -> self
style_file_disabled
style_file_disabled() -> struct<lipgloss.Style>
style_file_disabled_set
style_file_disabled_set(self, style struct<lipgloss.Style>) -> self
style_permission
style_permission() -> struct<lipgloss.Style>
style_permission_set
style_permission_set(self, style struct<lipgloss.Style>) -> self
style_selected
style_selected() -> struct<lipgloss.Style>
style_selected_set
style_selected_set(self, style struct<lipgloss.Style>) -> self
style_selected_disabled
style_selected_disabled() -> struct<lipgloss.Style>
style_selected_disabled_set
style_selected_disabled_set(self, style struct<lipgloss.Style>) -> self
FilePickerKeymap
- program
int
- id
int
- goto_top
struct<tui.KeyBinding>
- goto_last
struct<tui.KeyBinding>
- down
struct<tui.KeyBinding>
- up
struct<tui.KeyBinding>
- page_up
struct<tui.KeyBinding>
- page_down
struct<tui.KeyBinding>
- back
struct<tui.KeyBinding>
- open
struct<tui.KeyBinding>
- select
struct<tui.KeyBinding>
default
default(self) -> self
help_short
help_short() -> []struct<tui.KeyBinding>
help_full
help_full() -> [][]struct<tui.KeyBinding>
List
- program
int
- id
int
view
view() -> string
update
update() -> struct<tui.CMD>
cursor
cursor() -> int
cursor_up
cursor_up(self) -> self
cursor_down
cursor_down(self) -> self
page_next
page_next(self) -> self
page_prev
page_prev(self) -> self
pagination_show
pagination_show() -> bool
pagination_show_set
pagination_show_set(self, enabled bool) -> self
disable_quit
disable_quit(self) -> self
size
size() -> int, int
width
width() -> int
height
height() -> int
size_set
size_set(self, width int, height int) -> self
width_set
width_set(self, width int) -> self
height_set
height_set(self, height int) -> self
filter_state
filter_state() -> int<tui.FilterState>
filter_value
filter_value() -> string
filter_enabled
filter_enabled() -> bool
filter_enabled_set
filter_enabled_set(self, enabled bool) -> self
filter_show
filter_show() -> bool
filter_show_set
filter_show_set(self, enabled bool) -> self
filter_reset
filter_reset(self) -> self
is_filtered
is_filtered() -> bool
filter_setting
filter_setting() -> bool
filter_func
filter_func(self, fn int<tui.FilterFunc>) -> self
filter_func_custom
filter_func_custom(self, fn {function(string, []string) -> []struct<tui.ListFilterRank>}) -> self
index
index() -> int
items
items() -> []struct<tui.ListItem>
items_visible
items_visible() -> []struct<tui.ListItem>
items_set
items_set(self, items []struct<tui.ListItem>) -> self
item_insert
item_insert(self, index int, item struct<tui.ListItem>) -> self
item_set
item_set(self, index int, item struct<tui.ListItem>) -> self
item_remove
item_remove(self, index int) -> self
selected
selected() -> struct<tui.ListItem>
select
select(self, index int) -> self
matches
matches(index int) -> []int
status_message
status_message() -> struct<tui.CMDListStatusMessage>
status_message_lifetime
status_message_lifetime() -> int
status_message_lifetime_set
status_message_lifetime_set(self, ms int) -> self
statusbar_show
statusbar_show() -> bool
statusbar_show_set
statusbar_show_set(self, enabled bool) -> self
statusbar_item_name
statusbar_item_name() -> string, string
statusbar_item_name_set
statusbar_item_name_set(self, singular string, plural string) -> self
title_show
title_show() -> bool
title_show_set
title_show_set(self, enabled bool) -> self
spinner_set
spinner_set(self, from int<tui.SpinnerType>) -> self
spinner_set_custom
spinner_set_custom(self, frames []string, fps int) -> self
spinner_start
spinner_start() -> struct<tui.CMDListSpinnerStart>
spinner_stop
spinner_stop(self) -> self
spinner_toggle
spinner_toggle() -> struct<tui.CMDListSpinnerToggle>
infinite_scroll
infinite_scroll() -> bool
infinite_scroll_set
infinite_scroll_set(self, enabled bool) -> self
filter_input
filter_input() -> struct<tui.TextInput>
paginator
paginator() -> struct<tui.Paginator>
help
help() -> struct<tui.Help>
help_show
help_show() -> bool
help_show_set
help_show_set(self, enabled bool) -> self
keymap
keymap() -> struct<tui.ListKeymap>
view_help
view_help() -> string
view_help_short
view_help_short() -> string
view_help_full
view_help_full() -> string
help_short_additional
help_short_additional(self, {function() -> []struct<tui.KeyBinding>}) -> self
help_full_additional
help_full_additional(self, {function() -> [][]struct<tui.KeyBinding>}) -> self
style_titlebar
style_titlebar() -> struct<lipgloss.Style>
style_titlebar_set
style_titlebar_set(self, style struct<lipgloss.Style>) -> self
style_title
style_title() -> struct<lipgloss.Style>
style_title_set
style_title_set(self, style struct<lipgloss.Style>) -> self
style_spinner
style_spinner() -> struct<lipgloss.Style>
style_spinner_set
style_spinner_set(self, style struct<lipgloss.Style>) -> self
style_filter_prompt
style_filter_prompt() -> struct<lipgloss.Style>
style_filter_prompt_set
style_filter_prompt_set(self, style struct<lipgloss.Style>) -> self
style_filter_cursor
style_filter_cursor() -> struct<lipgloss.Style>
style_filter_cursor_set
style_filter_cursor_set(self, style struct<lipgloss.Style>) -> self
style_filter_char_match
style_filter_char_match() -> struct<lipgloss.Style>
style_filter_char_match_set
style_filter_char_match_set(self, style struct<lipgloss.Style>) -> self
style_statusbar
style_statusbar() -> struct<lipgloss.Style>
style_statusbar_set
style_statusbar_set(self, style struct<lipgloss.Style>) -> self
style_status_empty
style_status_empty() -> struct<lipgloss.Style>
style_status_empty_set
style_status_empty_set(self, style struct<lipgloss.Style>) -> self
style_statusbar_filter_active
style_statusbar_filter_active() -> struct<lipgloss.Style>
style_statusbar_filter_active_set
style_statusbar_filter_active_set(self, style struct<lipgloss.Style>) -> self
style_statusbar_filter_count
style_statusbar_filter_count() -> struct<lipgloss.Style>
style_statusbar_filter_count_set
style_statusbar_filter_count_set(self, style struct<lipgloss.Style>) -> self
style_no_items
style_no_items() -> struct<lipgloss.Style>
style_no_items_set
style_no_items_set(self, style struct<lipgloss.Style>) -> self
style_help
style_help() -> struct<lipgloss.Style>
style_help_set
style_help_set(self, style struct<lipgloss.Style>) -> self
style_pagination
style_pagination() -> struct<lipgloss.Style>
style_pagination_set
style_pagination_set(self, style struct<lipgloss.Style>) -> self
style_pagination_dot_active
style_pagination_dot_active() -> struct<lipgloss.Style>
style_pagination_dot_active_set
style_pagination_dot_active_set(self, style struct<lipgloss.Style>) -> self
style_pagination_dot_inactive
style_pagination_dot_inactive() -> struct<lipgloss.Style>
style_pagination_dot_inactive_set
style_pagination_dot_inactive_set(self, style struct<lipgloss.Style>) -> self
style_divider_dot
style_divider_dot() -> struct<lipgloss.Style>
style_divider_dot_set
style_divider_dot_set(self, style struct<lipgloss.Style>) -> self
delegate_set
delegate_set(self, delegate struct<tui.ListDelegate>) -> self
ListDelegate
- program
int
- id
int
show_description
show_description() -> bool
show_description_set
show_description_set(self, enabled bool) -> self
update_func
update_func(self, fn {function(msg struct<tui.MSG>) -> struct<tui.CMD>}) -> self
short_help_func
short_help_func(self, fn {function() -> []struct<tui.KeyBinding>}) -> self
full_help_func
full_help_func(self, fn {function() -> [][]struct<tui.KeyBinding>}) -> self
height
height() -> int
height_set
height_set(self, height int) -> self
spacing
spacing() -> int
spacing_set
spacing_set(self, spacing int) -> self
style_title_normal
style_title_normal() -> struct<tui.Style>
style_title_normal_set
style_title_normal_set(self, style struct<tui.Style>) -> self
style_title_selected
style_title_selected() -> struct<tui.Style>
style_title_selected_set
style_title_selected_set(self, style struct<tui.Style>) -> self
style_title_dimmed
style_title_dimmed() -> struct<tui.Style>
style_title_dimmed_set
style_title_dimmed_set(self, style struct<tui.Style>) -> self
style_desc_normal
style_desc_normal() -> struct<tui.Style>
style_desc_normal_set
style_desc_normal_set(self, style struct<tui.Style>) -> self
style_desc_selected
style_desc_selected() -> struct<tui.Style>
style_desc_selected_set
style_desc_selected_set(self, style struct<tui.Style>) -> self
style_desc_dimmed
style_desc_dimmed() -> struct<tui.Style>
style_desc_dimmed_set
style_desc_dimmed_set(self, style struct<tui.Style>) -> self
style_filter_match
style_filter_match() -> struct<tui.Style>
style_filter_match_set
style_filter_match_set(self, style struct<tui.Style>) -> self
ListKeymap
- program
int
- id
int
- cursor_up
struct<tui.KeyBinding>
- cursor_down
struct<tui.KeyBinding>
- page_next
struct<tui.KeyBinding>
- page_prev
struct<tui.KeyBinding>
- goto_start
struct<tui.KeyBinding>
- goto_end
struct<tui.KeyBinding>
- filter
struct<tui.KeyBinding>
- filter_clear
struct<tui.KeyBinding>
- filter_cancel
struct<tui.KeyBinding>
- filter_accept
struct<tui.KeyBinding>
- show_full_help
struct<tui.KeyBinding>
- close_full_help
struct<tui.KeyBinding>
- quit
struct<tui.KeyBinding>
- force_quit
struct<tui.KeyBinding>
default
default(self) -> self
help_short
help_short() -> []struct<tui.KeyBinding>
help_full
help_full() -> [][]struct<tui.KeyBinding>
Paginator
- program
int
- id
int
view
view() -> string
update
update() -> struct<tui.CMD>
slice_bounds
slice_bounds(length int) -> int, int
page_next
page_next(self) -> self
page_prev
page_prev(self) -> self
page_items
page_items(total int) -> int
page_on_first
page_on_first() -> bool
page_on_last
page_on_last() -> bool
total_pages_set
total_pages_set(self, items int) -> self
type
type() -> int<tui.PaginatorType>
type_set
type_set(self, t int<tui.PaginatorType>) -> self
page
page() -> int
page_set
page_set(self, p int) -> self
page_per
page_per() -> int
page_per_set
page_per_set(self, p int) -> self
page_total
page_total() -> int
page_total_set
page_total_set(self, p int) -> self
format_dot
format_dot() -> string, string
format_dot_set
format_dot_set(self, active string, inactive string) -> self
format_arabic
format_arabic() -> string
format_arabic_set
format_arabic_set(self, f string) -> self
keymap
keymap() -> struct<tui.PaginatorKeymap>
PaginatorKeymap
- program
int
- id
int
- page_prev
struct<tui.KeyBinding>
- page_next
struct<tui.KeyBinding>
default
default(self) -> self
help_short
help_short() -> []struct<tui.KeyBinding>
help_full
help_full() -> [][]struct<tui.KeyBinding>
ProgressOptions
width
width(self, width int) -> self
gradient_default
gradient_default(self) -> self
gradient_default_scaled
gradient_default_scaled(self) -> self
gradient
gradient(self, colorA string, colorB string) -> self
gradient_scaled
gradient_scaled(self, colorA string, colorB string) -> self
solid
solid(self, colorA string) -> self
fill_char
fill_char(self, full int, empty int) -> self
spring_options
spring_options(self, freq float, damp float) -> self
Progress
- program
int
- id
int
view
view() -> string
view_as
view_as(percent float) -> string
update
update() -> struct<tui.CMD>
percent
percent() -> float
percent_set
percent_set(percent float) -> struct<tui.CMDProgressSet>
percent_dec
percent_dec(percent float) -> struct<tui.CMDProgressDec>
percent_inc
percent_inc(percent float) -> struct<tui.CMDProgressInc>
percent_show
percent_show() -> bool
percent_show_set
percent_show_set(self, enabled bool) -> self
percent_format
percent_format() -> string
percent_format_set
percent_format_set(self, format string) -> self
is_animating
is_animating() -> bool
spring_options
spring_options(self, freq float, damp float) -> self
width
width() -> int
width_set
width_set(self, width int) -> self
full
full() -> int
full_set
full_set(self, rune int) -> self
full_color
full_color() -> string
full_color_set
full_color_set(self, color string) -> self
empty
empty() -> int
empty_set
empty_set(self, rune int) -> self
empty_color
empty_color() -> string
empty_color_set
empty_color_set(self, color string) -> self
style_percentage
style_percentage() -> struct<lipgloss.Style>
style_percentage_set
style_percentage_set(self, style struct<lipgloss.Style>) -> self
StopWatch
- program
int
- id
int
view
view() -> string
update
update() -> struct<tui.CMD>
start
start() -> struct<tui.CMDStopWatchStart>
stop
stop() -> struct<tui.CMDStopWatchStop>
toggle
toggle() -> struct<tui.CMDStopWatchToggle>
reset
reset() -> struct<tui.CMDStopWatchReset>
elapsed
elapsed() -> int
running
running() -> bool
interval
interval() -> int
interval_set
interval_set(self, ms int) -> self
Timer
- program
int
- id
int
view
view() -> string
update
update() -> struct<tui.CMD>
init
init() -> struct<tui.CMDTimerInit>
start
start() -> struct<tui.CMDTimerStart>
stop
stop() -> struct<tui.CMDTimerStop>
toggle
toggle() -> struct<tui.CMDTimerToggle>
running
running() -> bool
timed_out
timed_out() -> bool
timeout
timeout() -> int
timeout_set
timeout_set(self, ms int) -> self
interval
interval() -> int
interval_set
interval_set(self, ms int) -> self
TableOptions
focused
focused(self, focused bool) -> self
width
width(self, width int) -> self
height
height(self, height int) -> self
columns
columns(self, cols struct<tui.TableColumn>) -> self
rows
rows(self, rows [][]string) -> self
styles
styles(self, header struct<lipgloss.Style>, cell struct<lipgloss.Style>, selected struct<lipgloss.Style>) -> self
TableColumn
- title
string
- width
int
Table
- program
int
- id
int
view
view() -> string
update
update() -> struct<tui.CMD>
update_viewport
update_viewport(self) -> self
focused
focused() -> bool
focus
focus(self) -> self
blur
blur(self) -> self
goto_top
goto_top(self) -> self
goto_bottom
goto_bottom(self) -> self
move_up
move_up(self, n int) -> self
move_down
move_down(self, n int) -> self
cursor
cursor() -> int
cursor_set
cursor_set(self, n int) -> self
columns
columns() -> []struct<tui.TableColumn>
rows
rows() -> [][]string
columns_set
columns_set(self, cols []struct<tui.TableColumn>) -> self
rows_set
rows_set(self, rows [][]string) -> self
from_values
from_values(self, value string, separator string) -> self
row_selected
row_selected() -> []string
width
width() -> int
height
height() -> int
width_set
width_set(self, width int) -> self
height_set
height_set(self, height int) -> self
keymap
keymap() -> struct<tui.TableKeymap>
help
help() -> struct<tui.Help>
help_view
help_view() -> string
styles
styles(self, header struct<lipgloss.Style>, cell struct<lipgloss.Style>, selected struct<lipgloss.Style>) -> self
styles_default
styles_default(self) -> self
TableKeymap
- program
int
- id
int
- line_up
int
- line_down
int
- page_up
int
- page_down
int
- half_page_up
int
- half_page_down
int
- goto_top
int
- goto_bottom
int
default
default(self) -> self
help_short
help_short() -> []struct<tui.KeyBinding>
help_full
help_full() -> [][]struct<tui.KeyBinding>
Viewport
- program
int
- id
int
view
view() -> string
update
update() -> struct<tui.CMD>
view_up
view_up() -> []string
view_down
view_down() -> []string
view_up_half
view_up_half() -> []string
view_down_half
view_down_half() -> []string
at_top
at_top() -> bool
at_bottom
at_bottom() -> bool
goto_top
goto_top() -> []string
goto_bottom
goto_bottom() -> []string
line_up
line_up() -> []string
line_down
line_down() -> []string
past_bottom
past_bottom() -> bool
scroll_percent
scroll_percent() -> float
width
width() -> int
height
height() -> int
width_set
width_set(self, width int) -> self
height_set
height_set(self, height int) -> self
content_set
content_set(self, content string) -> self
line_count_total
line_count_total() -> int
line_count_visible
line_count_visible() -> int
mouse_wheel_enabled
mouse_wheel_enabled() -> bool
mouse_wheel_enabled_set
mouse_wheel_enabled_set(self, enabled bool) -> self
mouse_wheel_delta
mouse_wheel_delta() -> int
mouse_wheel_delta_set
mouse_wheel_delta_set(self, delta int) -> self
offset_y
offset_y() -> int
offset_y_set
offset_y_set(self, offset int) -> self
offset_y_set_direct
offset_y_set_direct(self, offset int) -> self
position_y
position_y() -> int
position_y_set
position_y_set(self, position int) -> self
high_performance
high_performance() -> bool
high_performance_set
high_performance_set(self, enabled bool) -> self
keymap
keymap() -> struct<tui.ViewportKeymap>
style
style() -> struct<lipgloss.Style>
style_set
style_set(self, style struct<lipgloss.Style>) -> self
ViewportKeymap
- program
int
- id
int
- page_down
struct<tui.KeyBinding>
- page_up
struct<tui.KeyBinding>
- page_up_half
struct<tui.KeyBinding>
- page_down_half
struct<tui.KeyBinding>
- down
struct<tui.KeyBinding>
- up
struct<tui.KeyBinding>
default
default(self) -> self
help_short
help_short() -> []struct<tui.KeyBinding>
help_full
help_full() -> [][]struct<tui.KeyBinding>
Custom
- program
int
- id
int
init
init() -> struct<tui.CMD>
view
view() -> string
update
update(values []any?) -> struct<tui.CMD>
KeyOptions
disabled
disabled(self, enabled bool) -> self
help
help(self, key string, desc string) -> self
keys
keys(self, keys []string) -> self
KeyBinding
- program
int
- id
int
enabled
enabled() -> bool
enabled_set
enabled_set(enabled bool)
help
help() -> string, string
help_set
help_set(key string, desc string)
keys
keys() -> []string
keys_set
keys_set(keys []string)
unbind
unbind(self) -> self
Keymap
- program
int
- id
int
default
default(self) -> self
help_short
help_short() -> []struct<tui.KeyBinding>
help_full
help_full() -> [][]struct<tui.KeyBinding>
Help
- program
int
- id
int
view
view(keymap struct<tui.Keymap>) -> string
view_help_short
view_help_short(bindings []struct<tui.KeyBinding>) -> string
view_help_full
view_help_full(groups [][]struct<tui.KeyBinding>) -> string
width
width() -> int
width_set
width_set(self, width int) -> self
show_all
show_all() -> bool
show_all_set
show_all_set(self, show_all bool) -> self
separator_short
separator_short() -> string
separator_short_set
separator_short_set(self, separator string) -> self
separator_full
separator_full() -> string
separator_full_set
separator_full_set(self, separator string) -> self
ellipsis
ellipsis() -> string
ellipsis_set
ellipsis_set(self, ellipsis string) -> self
style_ellipsis
style_ellipsis() -> struct<lipgloss.Style>
style_ellipsis_set
style_ellipsis_set(self, style struct<lipgloss.Style>) -> self
style_short_key
style_short_key() -> struct<lipgloss.Style>
style_short_key_set
style_short_key_set(self, style struct<lipgloss.Style>) -> self
style_short_desc
style_short_desc() -> struct<lipgloss.Style>
style_short_desc_set
style_short_desc_set(self, style struct<lipgloss.Style>) -> self
style_short_separator
style_short_separator() -> struct<lipgloss.Style>
style_short_separator_set
style_short_separator_set(self, style struct<lipgloss.Style>) -> self
style_full_key
style_full_key() -> struct<lipgloss.Style>
style_full_key_set
style_full_key_set(self, style struct<lipgloss.Style>) -> self
style_full_desc
style_full_desc() -> struct<lipgloss.Style>
style_full_desc_set
style_full_desc_set(self, style struct<lipgloss.Style>) -> self
style_full_separator
style_full_separator() -> struct<lipgloss.Style>
style_full_separator_set
style_full_separator_set(self, style struct<lipgloss.Style>) -> self
Image
- program
int
- id
int
view
view() -> string
update
update() -> struct<tea.CMD>
image_string
image_string() -> string
image_string_set
image_string_set(self, img string) -> self
image_file
image_file() -> string
image_file_set
image_file_set(filename string) -> struct<tea.CMDImageFile>
size_set
size_set(width int, height int) -> struct<tea.CMDImageSize>
is_active
is_active() -> bool
is_active_set
is_active_set(self, enabled bool) -> self
borderless
borderless() -> bool
borderless_set
borderless_set(self, enabled bool) -> self
border_color
border_color() -> struct<lipgloss.ColorAdaptive>
border_color_set
border_color_set(self, color struct<lipgloss.ColorAny>?) -> self
goto_top
goto_top(self) -> self
viewport
viewport() -> struct<tui.Viewport>
StatusBar
- program
int
- id
int
view
view() -> string
update
update() -> struct<tea.CMD>
content
content() -> string, string, string, string
content_set
content_set(self, first string, second string, third string, fourth string) -> self
colors
colors() -> struct<lipgloss.ColorGeneric>, struct<lipgloss.ColorGeneric>, struct<lipgloss.ColorGeneric>, struct<lipgloss.ColorGeneric>
colors_set
colors_set(self, first_foreground struct<lipgloss.ColorAny>, first_background struct<lipgloss.ColorAny>, second_foreground struct<lipgloss.ColorAny>, second_background struct<lipgloss.ColorAny>, third_foreground struct<lipgloss.ColorAny>, third_background struct<lipgloss.ColorAny>, fourth_foreground struct<lipgloss.ColorAny>, fourth_background struct<lipgloss.ColorAny>) -> self
width
width() -> int
width_set
width_set(self, width int) -> self
height
height() -> int
height_set
height_set(self, height int) -> self
column_first
column_first() -> string
column_first_set
column_first_set(self, first string) -> self
column_second
column_second() -> string
column_second_set
column_second_set(self, second string) -> self
column_third
column_third() -> string
column_third_set
column_third_set(self, third string) -> self
column_fourth
column_fourth() -> string
column_fourth_set
column_fourth_set(self, fourth string) -> self
column_first_colors
column_first_colors() -> struct<lipgloss.ColorAdaptive>, struct<lipgloss.ColorAdaptive>
column_first_colors_set
column_first_colors_set(self, foreground struct<lipgloss.ColorAny>, background struct<lipgloss.ColorAny>) -> self
column_second_colors
column_second_colors() -> struct<lipgloss.ColorAdaptive>, struct<lipgloss.ColorAdaptive>
column_second_colors_set
column_second_colors_set(self, foreground struct<lipgloss.ColorAny>, background struct<lipgloss.ColorAny>) -> self
column_third_colors
column_third_colors() -> struct<lipgloss.ColorAdaptive>, struct<lipgloss.ColorAdaptive>
column_third_colors_set
column_third_colors_set(self, foreground struct<lipgloss.ColorAny>, background struct<lipgloss.ColorAny>) -> self
column_fourth_colors
column_fourth_colors() -> struct<lipgloss.ColorAdaptive>, struct<lipgloss.ColorAdaptive>
column_fourth_colors_set
column_fourth_colors_set(self, foreground struct<lipgloss.ColorAny>, background struct<lipgloss.ColorAny>) -> self
Interfaces
CMD
- cmd
int<tui.CMDID>
- The command type.
MSG
- msg
int<tui.MSGID>
- The message type.