MCPcopy Create free account

hub / github.com/charmbracelet/bubbletea / functions

Functions659 in github.com/charmbracelet/bubbletea

↓ 59 callersMethodRun
Run initializes the program and runs its event loops, blocking until it gets terminated by either [Program.Quit], [Program.Kill], or its signal handle
tea.go:991
↓ 54 callersMethodString
()
examples/send-msg/main.go:31
↓ 43 callersMethodRender
(w io.Writer, m list.Model, index int, listItem list.Item)
examples/list-simple/main.go:47
↓ 39 callersMethodPrintln
Println prints above the Program. This output is unmanaged by the program and will persist across renders by the Program. If the altscreen is active
tea.go:1372
↓ 36 callersMethodView
View renders the program's UI, which can be a string or a [Layer]. The view is rendered after every Update.
tea.go:64
↓ 35 callersMethodRun
()
exec.go:61
↓ 35 callersMethodUpdate
Update is called when a message is received. Use it to inspect messages and, in response, update the model and/or send a command.
tea.go:60
↓ 24 callersFunctionNewProgram
NewProgram creates a new [Program].
tea.go:595
↓ 24 callersMethodSend
Send sends a message to the main update function, effectively allowing messages to be injected from outside the program for interoperability purposes.
tea.go:1183
↓ 24 callersFunctionWithInput
WithInput sets the input which, by default, is stdin. In most cases you won't need to use this. To disable input entirely pass nil. p := NewProgram(
options.go:40
↓ 24 callersFunctionWithOutput
WithOutput sets the output which, by default, is stdout. In most cases you won't need to use this.
options.go:30
↓ 23 callersMethodPrintf
Printf prints above the Program. It takes a format template followed by values similar to fmt.Printf. This output is unmanaged by the program and will
tea.go:1386
↓ 19 callersMethodHeight
()
examples/list-simple/main.go:44
↓ 11 callersMethodSetContent
SetContent is a helper method to set the content of a [View] with a styled string. A styled string represents text with styles and hyperlinks encoded
tea.go:279
↓ 9 callersMethodError
()
examples/http/main.go:25
↓ 9 callersMethodGetenv
Getenv returns the value of the environment variable named by the key. If the variable is not present in the environment, the value returned will be t
environ.go:24
↓ 9 callersMethodString
()
examples/cellbuffer/main.go:118
↓ 8 callersMethodIsDark
IsDark returns whether the color is dark.
color.go:89
↓ 8 callersMethodString
String implements [fmt.Stringer] and is quite useful for matching key events. It will return the textual representation of the [Key] if there is one,
key.go:351
↓ 7 callersMethodCursor
()
examples/autocomplete/main.go:122
↓ 6 callersMethodInit
Init is the first function that will be called. It returns an optional initial command. To not perform an initial command return nil.
tea.go:56
↓ 6 callersFunctionWithContext
WithContext lets you specify a context in which to run the Program. This is useful if you want to cancel the execution from outside. When a Program ge
options.go:22
↓ 5 callersMethodKey
Key returns the underlying key event.
key.go:263
↓ 5 callersMethodMouse
Mouse returns the underlying mouse event.
mouse.go:50
↓ 5 callersMethodQuit
Quit is a convenience function for quitting Bubble Tea programs. Use it when you need to shut down a Bubble Tea program from the outside. If you wish
tea.go:1197
↓ 4 callersMethodString
String returns a string representation of the mouse message.
mouse.go:78
↓ 4 callersMethodWait
Wait waits/blocks until the underlying Program finished shutting down.
tea.go:1209
↓ 4 callersMethodWrite
(p []byte)
examples/progress-download/main.go:34
↓ 3 callersMethodKill
Kill stops the program immediately and restores the former terminal state. The final render that you would normally see when quitting will be skipped.
tea.go:1204
↓ 3 callersFunctionNewView
NewView is a helper function to create a new [View] with the given styled string. A styled string represents text with styles and hyperlinks encoded a
tea.go:76
↓ 3 callersMethodTitle
()
examples/list-fancy/main.go:40
↓ 3 callersFunctionWithEnvironment
WithEnvironment sets the environment variables that the program will use. This useful when the program is running in a remote session (e.g. SSH) and y
options.go:58
↓ 3 callersFunctionWithWindowSize
WithWindowSize sets the initial size of the terminal window. This is useful when you need to set the initial size of the terminal window, for example
options.go:163
↓ 3 callersMethodcheckResize
checkResize detects the current size of the output and informs the program via a WindowSizeMsg.
tty.go:109
↓ 3 callersFunctionenableAltScreen
enableAltScreen sets the alt screen mode. Note that this writes to the buffer directly if write is true.
cursed_renderer.go:645
↓ 3 callersFunctionencodeCursorStyle
encodeCursorStyle returns the integer value for the given cursor style and blink state.
renderer.go:96
↓ 3 callersMethodflush
flush flushes the output buffer to the program output.
tea.go:1221
↓ 3 callersFunctionmin
(a, b int)
examples/capability/main.go:71
↓ 3 callersMethodreleaseTerminal
(reset bool)
tea.go:1323
↓ 3 callersFunctionreset
(s *cursedRenderer)
cursed_renderer.go:593
↓ 3 callersMethodshutdown
shutdown performs operations to free up resources and restore the terminal to its original state.
tea.go:1241
↓ 3 callersFunctiontick
()
examples/views/main.go:56
↓ 3 callersMethodwaitForReadLoop
waitForReadLoop waits for the cancelReader to finish its read loop.
tty.go:97
↓ 3 callersMethodwindowView
()
examples/clickable/main.go:307
↓ 2 callersFunctionBatch
Batch performs a bunch of commands concurrently with no ordering guarantees about the results. Use a Batch to return several commands. Example:
commands.go:15
↓ 2 callersFunctionExecProcess
ExecProcess runs the given *exec.Cmd in a blocking fashion, effectively pausing the Program while the command is running. After the *exec.Cmd exists t
exec.go:50
↓ 2 callersMethodKeystroke
Keystroke returns the keystroke representation of the [Key]. While less type safe than looking at the individual fields, it will usually be more conve
key.go:369
↓ 2 callersMethodLookupEnv
LookupEnv retrieves the value of the environment variable named by the key. If the variable is present in the environment the value (which may be empt
environ.go:32
↓ 2 callersFunctionQuit
Quit is a special command that tells the Bubble Tea program to exit.
tea.go:555
↓ 2 callersMethodRestoreTerminal
RestoreTerminal reinitializes the Program's input reader, restores the terminal to the former state when the program was running, and repaints. Use it
tea.go:1344
↓ 2 callersFunctionSequence
Sequence runs the given commands one at a time, in order. Contrast this with Batch, which runs commands concurrently.
commands.go:25
↓ 2 callersMethodSetOutput
(io.Writer)
logging.go:30
↓ 2 callersMethodString
String returns the hex representation of the color.
color.go:84
↓ 2 callersMethodString
()
examples/set-terminal-color/main.go:22
↓ 2 callersMethodSupportsEventTypes
SupportsEventTypes returns whether the terminal supports reporting different types of key events (press, release, and repeat).
keyboard.go:39
↓ 2 callersFunctionWithColorProfile
WithColorProfile sets the color profile that the program will use. This is useful when you want to force a specific color profile. By default, Bubble
options.go:153
↓ 2 callersFunctionWithoutSignals
WithoutSignals will ignore OS signals. This is mainly useful for testing.
options.go:84
↓ 2 callersFunctionanimate
()
examples/cellbuffer/main.go:131
↓ 2 callersMethodcanFindBook
canFindBook returns whether the find button is to be pressed
examples/isbn-form/main.go:42
↓ 2 callersMethodcheckOptimizedMovements
(s *term.State)
termios_bsd.go:11
↓ 2 callersFunctionclamp
(n, min, max int)
examples/clickable/main.go:361
↓ 2 callersFunctiondownloadAndInstall
(pkg string)
examples/package-manager/main.go:117
↓ 2 callersFunctionenableTextCursor
enableTextCursor sets the text cursor mode.
cursed_renderer.go:674
↓ 2 callersMethodexecBatchMsg
(msg BatchMsg)
tea.go:918
↓ 2 callersMethodexecSequenceMsg
(msg sequenceMsg)
tea.go:892
↓ 2 callersMethodexecute
execute writes the given sequence to the program output.
tea.go:1214
↓ 2 callersMethodflush
flush flushes the renderer's buffer to the output.
renderer.go:29
↓ 2 callersMethodfooterView
()
examples/pager/main.go:112
↓ 2 callersFunctionframe
()
examples/views/main.go:62
↓ 2 callersMethodheaderView
()
examples/autocomplete/main.go:181
↓ 2 callersMethodheaderView
()
examples/pager/main.go:106
↓ 2 callersMethodinitInputReader
initInputReader (re)commences reading inputs.
tty.go:56
↓ 2 callersMethodinitTerminal
()
tty.go:24
↓ 2 callersMethodinputViews
()
examples/split-editors/main.go:188
↓ 2 callersFunctionkeyboardEnhancementsFlags
(ke KeyboardEnhancements)
cursed_renderer.go:845
↓ 2 callersFunctionnewStyles
(darkBG bool)
examples/list-fancy/main.go:20
↓ 2 callersFunctionnewTextarea
()
examples/split-editors/main.go:49
↓ 2 callersMethodnext
()
examples/list-fancy/randomitems.go:140
↓ 2 callersMethodrecoverFromGoPanic
recoverFromGoPanic recovers from a goroutine panic, prints a stack trace and signals for the program to be killed and terminal restored to a usable st
tea.go:1294
↓ 2 callersMethodrecoverFromPanic
recoverFromPanic recovers from a panic, prints the stack trace, and restores the terminal to a usable state.
tea.go:1269
↓ 2 callersMethodrender
render renders the given view to the renderer.
tea.go:886
↓ 2 callersMethodresetSpinner
()
examples/spinners/main.go:82
↓ 2 callersMethodresize
resize notify the renderer of a terminal resize.
renderer.go:44
↓ 2 callersMethodrestoreTerminalState
restoreTerminalState restores the terminal to the state prior to running the Bubble Tea program.
tty.go:33
↓ 2 callersMethodsetColorProfile
setColorProfile sets the color profile.
renderer.go:47
↓ 2 callersFunctionsetProgressBar
(s *cursedRenderer, pb *ProgressBar)
cursed_renderer.go:779
↓ 2 callersMethodstartRenderer
startRenderer starts the renderer.
tea.go:1393
↓ 2 callersMethodstopRenderer
stopRenderer stops the renderer. If kill is true, the renderer will be stopped immediately without flushing the last frame.
tea.go:1427
↓ 2 callersFunctiontick
()
examples/fullscreen/main.go:54
↓ 2 callersFunctiontickCmd
()
examples/progress-animated/main.go:89
↓ 2 callersFunctiontickCmd
()
examples/progress-static/main.go:93
↓ 2 callersFunctiontickCmd
()
examples/eyes/main.go:79
↓ 2 callersFunctiontickCmd
()
examples/space/main.go:35
↓ 2 callersMethodupdateEyePositions
()
examples/eyes/main.go:67
↓ 2 callersMethodupdateKeybindings
()
examples/split-editors/main.go:183
↓ 2 callersMethodupdateStyles
(isDark bool)
examples/paginator/main.go:56
↓ 2 callersMethodupdateStyles
(isDark bool)
examples/keyboard-enhancements/main.go:85
↓ 2 callersFunctionwaitForActivity
A command that waits for the activity on a channel.
examples/realtime/main.go:34
↓ 2 callersMethodwipe
()
examples/cellbuffer/main.go:96
↓ 1 callersMethodCursor
()
examples/split-editors/main.go:210
next →1–100 of 659, ranked by callers