Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/rivo/tview
/ types & classes
Types & classes
50 in github.com/rivo/tview
⨍
Functions
690
◇
Types & classes
50
Struct
Application
Application represents the top node of an application. It is not strictly required to use this class as none of the other classes depend on it. Howev
application.go:72
Struct
Box
Box implements the Primitive interface with an empty background and optional elements such as a border and a title. Box itself does not hold any conte
box.go:16
Struct
Button
Button is labeled box that triggers an action when selected. See https://github.com/rivo/tview/wiki/Button for an example.
button.go:10
Struct
Checkbox
Checkbox implements a simple box for boolean values which can be checked and unchecked. See https://github.com/rivo/tview/wiki/Checkbox for an exampl
checkbox.go:11
Struct
DropDown
DropDown implements a selection widget whose options become visible in a drop-down list when activated. See https://github.com/rivo/tview/wiki/DropDo
dropdown.go:20
Struct
Flex
Flex is a basic implementation of the Flexbox layout. The contained primitives are arranged horizontally or vertically. The way they are distributed a
flex.go:33
Struct
Form
Form allows you to combine multiple one-line form elements into a vertical or horizontal layout. Form elements include types such as InputField or Che
form.go:60
Interface
FormItem
FormItem is the interface all form items must implement to be able to be included in a form.
form.go:22
Struct
Frame
Frame is a wrapper which adds space around another primitive. In addition, the top area (header) and the bottom area (footer) may also contain text.
frame.go:19
Struct
Grid
Grid is an implementation of a grid-based layout. It works by defining the size of the rows and columns, then placing primitives into the grid. Some
grid.go:31
Struct
Image
Image implements a widget that displays one image. The original image (specified with [Image.SetImage]) is resized according to the specified size (se
image.go:63
Struct
InputField
InputField is a one-line box into which the user can enter text. Use [InputField.SetAcceptanceFunc] to accept or reject input, [InputField.SetChangedF
inputfield.go:78
Struct
List
List displays rows of items, each of which can be selected. List items can be shown as a single line or as two lines. They can be selected by pressing
list.go:41
Struct
Modal
Modal is a centered message window used to inform the user or prompt them for an immediate decision. It needs to have at least one button (added via [
modal.go:12
TypeAlias
MouseAction
MouseAction indicates one of the actions the mouse is logically doing.
application.go:24
Struct
Pages
Pages is a container for other primitives laid out on top of each other, overlapping or not. It is often used as the application's root primitive. It
pages.go:20
Interface
Primitive
Primitive is the top-most interface for all graphical primitives.
primitive.go:6
Struct
RadioButtons
RadioButtons implements a simple primitive for radio button selections.
demos/primitive/main.go:12
FuncType
Slide
Slide is a function which returns the slide's main primitive and its title. It receives a "nextSlide" function which can be called to advance the pres
demos/presentation/main.go:26
Struct
Table
Table visualizes two-dimensional data consisting of rows and columns. Each Table cell is defined via [Table.SetCell] by the [TableCell] type. They can
table.go:463
Struct
TableCell
TableCell represents one cell inside a Table. You can instantiate this type directly but all colors (background and text) will be set to their default
table.go:13
Interface
TableContent
TableContent defines a Table's data. You may replace a Table's default implementation with your own using the Table.SetContent() function. This will a
table.go:234
Struct
TableContentReadOnly
TableContentReadOnly is an empty struct which implements the write operations of the TableContent interface. None of the implemented functions do anyt
table.go:283
Struct
TableData
demos/table/virtualtable/main.go:10
Struct
TextArea
TextArea implements a simple text editor for multi-line text. Multi-color text is not supported. Word-wrapping is enabled by default but can be turned
textarea.go:192
Struct
TextView
TextView is a component to display read-only text. While the text to be displayed can be changed or appended to, there is no functionality that allows
textview.go:136
Struct
TextViewWriter
TextViewWriter is a writer that can be used to write to and clear a TextView in batches, i.e. multiple writes with the lock only being acquired once.
textview.go:28
Struct
Theme
Theme defines the colors used when primitives are initialized.
styles.go:6
Struct
TreeNode
TreeNode represents one node in a tree view.
treeview.go:19
Struct
TreeView
TreeView displays tree structures. A tree consists of nodes (TreeNode objects) where each node has zero or more child nodes and exactly one parent nod
treeview.go:299
Struct
ansi
ansi is a io.Writer which translates ANSI escape codes into tview color tags.
ansi.go:21
Struct
cellInfo
Color the cell backgrounds. To avoid undesirable artefacts, we combine the drawing of a cell by background color, selected cells last.
table.go:1289
Struct
company
demos/inputfield/autocompleteasync/main.go:14
Struct
dropDownOption
dropDownOption is one option that can be selected in a drop-down primitive.
dropdown.go:11
Struct
flexItem
flexItem holds layout options for one item.
flex.go:20
Struct
frameText
frameText holds information about a line of text shown in the frame.
frame.go:8
Struct
gridItem
gridItem represents one primitive and its possible position on a grid.
grid.go:10
Struct
listItem
listItem represents one item in a List.
list.go:11
Struct
node
demos/presentation/treeview.go:51
Struct
page
page represents one page of a Pages object.
pages.go:8
Struct
pixel
pixel represents a character on screen used to draw part of an image.
image.go:46
Struct
position
Add one space. Calculate positions of form items.
form.go:533
Struct
queuedUpdate
queuedUpdate represented the execution of f queued by Application.QueueUpdate(). If "done" is not nil, it receives exactly one element after f has exe
application.go:55
TypeAlias
stepOptions
stepOptions is a bit field of options for [step]. A value of 0 results in [step] having the same behavior as uniseg.Step, i.e. no tview-related parsin
strings.go:21
Struct
stepState
stepState represents the current state of the parser implemented in [step].
strings.go:31
TypeAlias
taAction
Types of user actions on a text area.
textarea.go:32
Struct
tableDefaultContent
tableDefaultContent implements the default TableContent interface for the Table class.
table.go:317
Struct
textAreaSpan
textAreaSpan represents a range of text in a text area. The text area widget roughly follows the concept of Piece Chains outlined in http://www.catch2
textarea.go:68
Struct
textAreaUndoItem
textAreaUndoItem represents an undoable edit to the text area. It describes the two spans wrapping a text change.
textarea.go:85
Struct
textViewLine
textViewLine contains information about a line displayed in the text view.
textview.go:16