Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/rivo/tview
/ functions
Functions
690 in github.com/rivo/tview
⨍
Functions
690
◇
Types & classes
50
↓ 1 callers
Method
GetFieldHeight
GetFieldHeight returns this primitive's field height. This is the image's height or 8 if the height is 0 or less.
image.go:247
↓ 1 callers
Method
GetFieldHeight
GetFieldHeight returns the height of the form item's field (the area which is manipulated by the user). This value must be greater than 0.
form.go:39
↓ 1 callers
Method
GetFieldWidth
GetFieldWidth returns the width of the form item's field (the area which is manipulated by the user) in number of screen cells. A value of 0 indicates
form.go:35
↓ 1 callers
Method
GetLabelStyle
GetLabelStyle returns the style of the label.
inputfield.go:204
↓ 1 callers
Method
GetLabelWidth
GetLabelWidth returns the screen width of the label.
textarea.go:810
↓ 1 callers
Method
GetPlaceholderStyle
GetPlaceholderStyle returns the style of the input area (when a placeholder is shown).
inputfield.go:248
↓ 1 callers
Method
GetTextLength
GetTextLength returns the string length of the text in the text area.
textarea.go:616
↓ 1 callers
Method
InsertColumn
Insert a new empty column at the given position by shifting all columns at that position and to the right by one to the right. Implementers may decide
table.go:272
↓ 1 callers
Method
InsertItem
InsertItem adds a new item to the list at the specified index. An index of 0 will insert the item at the beginning, an index of 1 before the second it
list.go:388
↓ 1 callers
Method
InsertRow
Insert a new empty row at the given position by shifting all rows at that position and below down by one. Implementers may decide what to do with out
table.go:267
↓ 1 callers
Method
IsDisabled
IsDisabled returns whether or not the button is disabled.
button.go:110
↓ 1 callers
Function
NewRadioButtons
NewRadioButtons returns a new radio button primitive.
demos/primitive/main.go:19
↓ 1 callers
Method
RemoveColumn
Remove the column at the given position by shifting all following columns left by one. Out of range positions may be ignored.
table.go:262
↓ 1 callers
Method
RemoveItem
RemoveItem removes all items for the given primitive from the grid, keeping the order of the remaining items intact.
grid.go:217
↓ 1 callers
Method
RemovePage
RemovePage removes the page with the given name. If that page was the only visible page, visibility is assigned to the last page.
pages.go:104
↓ 1 callers
Method
RemoveRow
Remove the row at the given position by shifting all following rows up by one. Out of range positions may be ignored.
table.go:258
↓ 1 callers
Method
Select
Select selects a section of the text. The start and end positions refer to index positions within the entire text string (as a half-open interval). Th
textarea.go:653
↓ 1 callers
Method
SetActivatedStyle
SetActivatedStyle sets the style of the button used when it is focused.
button.go:88
↓ 1 callers
Method
SetAutocompletedFunc
SetAutocompletedFunc sets a callback function which is invoked when the user selects an entry from the autocomplete drop-down list. The function is pa
inputfield.go:341
↓ 1 callers
Method
SetBorderAttributes
SetBorderAttributes sets the border's style attributes. You can combine different attributes using bitmask operations: box.SetBorderAttributes(tcell
box.go:318
↓ 1 callers
Method
SetBordersColor
SetBordersColor sets the color of the item borders.
grid.go:169
↓ 1 callers
Method
SetButtonBackgroundColor
SetButtonBackgroundColor sets the background color of the buttons.
modal.go:68
↓ 1 callers
Method
SetButtonTextColor
SetButtonTextColor sets the color of the button texts.
modal.go:74
↓ 1 callers
Method
SetButtonsAlign
SetButtonsAlign sets how the buttons align horizontally, one of AlignLeft (the default), AlignCenter, and AlignRight. This is only
form.go:169
↓ 1 callers
Method
SetCancelFunc
SetCancelFunc sets a handler which is called when the user hits the Escape key.
form.go:501
↓ 1 callers
Method
SetCell
SetCell sets the content of a cell the specified position. It is ok to directly instantiate a TableCell object. If the cell has content, at least the
table.go:724
↓ 1 callers
Method
SetCellSimple
SetCellSimple calls SetCell() with the given text, left-aligned, in white.
table.go:730
↓ 1 callers
Method
SetChecked
SetChecked sets the state of the checkbox. This also triggers the "changed" callback if the state changes with this call.
checkbox.go:74
↓ 1 callers
Method
SetClipboard
SetClipboard allows you to implement your own clipboard by providing a function that is called when the user wishes to store text in the clipboard (co
textarea.go:927
↓ 1 callers
Method
SetCurrentOption
SetCurrentOption sets the index of the currently selected option. This may be a negative value to indicate that no option is currently selected. Calli
dropdown.go:125
↓ 1 callers
Method
SetDisabled
SetDisabled sets whether or not the item is disabled / read-only. A form must have at least one item that is not disabled.
form.go:51
↓ 1 callers
Method
SetDisabledStyle
SetDisabledStyle sets the style of the button used when it is disabled.
button.go:94
↓ 1 callers
Method
SetExitFunc
SetExitFunc sets a handler which is called when the user leaves the button. The callback function is provided with the key that was pressed, which is
button.go:127
↓ 1 callers
Method
SetExpansion
SetExpansion sets the value by which the column of this cell expands if the available width for the table is more than the table width (prior to apply
table.go:117
↓ 1 callers
Method
SetFieldBackgroundColor
SetFieldBackgroundColor sets the background color of the input area.
checkbox.go:120
↓ 1 callers
Method
SetFieldStyle
SetFieldStyle sets the style of the options area.
dropdown.go:225
↓ 1 callers
Method
SetFieldTextColor
SetFieldTextColor sets the text color of the input area.
checkbox.go:128
↓ 1 callers
Method
SetFinishedFunc
SetFinishedFunc sets the handler function for when the user finished entering data into the item. The handler may receive events for the Enter key (we
form.go:47
↓ 1 callers
Method
SetFocusFunc
SetFocusFunc sets a callback function which is invoked when this primitive receives focus. Container primitives such as [Flex] or [Grid] may not be no
box.go:452
↓ 1 callers
Method
SetHighlightedFunc
SetHighlightedFunc sets a handler which is called when the list of currently highlighted regions change. It receives a list of region IDs which were n
textview.go:525
↓ 1 callers
Method
SetInputCapture
SetInputCapture sets a function which captures all key events before they are forwarded to the key event handler of the primitive which currently has
application.go:164
↓ 1 callers
Method
SetItemText
SetItemText sets an item's main and secondary text. Panics if the index is out of range.
list.go:447
↓ 1 callers
Method
SetLabelColor
SetLabelColor sets the color of the label.
dropdown.go:199
↓ 1 callers
Method
SetLabelColor
SetLabelColor sets the color of the label.
checkbox.go:108
↓ 1 callers
Method
SetLabelStyle
SetLabelStyle sets the style of the label.
inputfield.go:198
↓ 1 callers
Method
SetLabelStyle
SetLabelStyle sets the style of the label.
image.go:269
↓ 1 callers
Method
SetMaskCharacter
SetMaskCharacter sets a character that masks user input on a screen. A value of 0 disables masking.
inputfield.go:303
↓ 1 callers
Method
SetMaxLength
SetMaxLength sets the maximum number of bytes allowed in the text area. A value of 0 means there is no limit. If the text area currently contains more
textarea.go:851
↓ 1 callers
Method
SetMovedFunc
SetMovedFunc sets a handler which is called whenever the cursor position or the text selection has changed.
textarea.go:960
↓ 1 callers
Method
SetPlaceholderStyle
SetPlaceholderStyle sets the style of the input area (when a placeholder is shown).
inputfield.go:241
↓ 1 callers
Method
SetRect
SetRect sets a new position of the primitive. Note that this has no effect if this primitive is part of a layout (e.g. Flex, Grid) or if it was added
box.go:129
↓ 1 callers
Method
SetSelectedFunc
SetSelectedFunc sets a handler which is called when the user changes the drop-down's option. This handler will be called in addition and prior to an o
dropdown.go:359
↓ 1 callers
Method
SetStyle
SetStyle sets the style of the button used when it is not focused.
button.go:68
↓ 1 callers
Method
SetText
SetText sets the text of the text area. All existing text is deleted and replaced with the new text. Any edits are discarded, no undos are available.
textarea.go:390
↓ 1 callers
Method
SetUseStyleTags
SetUseStyleTags sets a flag which determines whether style tags are used in the main and secondary texts. The default is true.
list.go:282
↓ 1 callers
Method
SetWordWrap
SetWordWrap sets the flag that causes lines that are longer than the available width to be wrapped onto the next line at spaces or after punctuation m
textarea.go:777
↓ 1 callers
Function
WordWrap
WordWrap splits a text such that each resulting line does not exceed the given screen width. Split points are determined using the algorithm described
strings.go:551
↓ 1 callers
Method
Write
Write lets us implement the io.Writer interface.
textview.go:808
↓ 1 callers
Method
Write
Write parses the given text as a string of runes, translates ANSI escape codes to style tags and writes them to the output writer.
ansi.go:49
↓ 1 callers
Function
alert
alert shows a confirmation dialog.
demos/unicode/main.go:37
↓ 1 callers
Method
deleteLine
deleteLine deletes all characters between the last newline before the cursor and the next newline after the cursor (inclusive).
textarea.go:1836
↓ 1 callers
Method
drawPlaceholder
drawPlaceholder draws the placeholder text into the given rectangle. It does not do anything if the text area already contains text or if there is no
textarea.go:1324
↓ 1 callers
Method
evalPrefix
evalPrefix selects an item in the drop-down list based on the current prefix.
dropdown.go:576
↓ 1 callers
Method
fireMouseActions
fireMouseActions analyzes the provided mouse event, derives mouse actions from it and then forwards them to the corresponding primitives.
application.go:526
↓ 1 callers
Method
indexAtPoint
indexAtPoint returns the index of the list item found at the given position or a negative value if there is no such list item.
list.go:709
↓ 1 callers
Method
render
render re-populates the [Image.pixels] slice based on the current settings, if [Image.lastWidth] and [Image.lastHeight] don't match the current image'
image.go:300
↓ 1 callers
Method
resize
resize resizes the image to the current size and returns the result as a slice of pixels. It is assumed that [Image.lastWidth] (w) and [Image.lastHeig
image.go:372
↓ 1 callers
Method
setMinCursorPadding
setMinCursorPadding sets a minimum width to be reserved left and right of the cursor. This is ignored if wrapping is enabled.
textarea.go:858
↓ 1 callers
Method
stamp
stamp takes the pixels generated by [Image.resize] and populates the [Image.pixels] slice accordingly.
image.go:441
Method
AddFormItem
AddFormItem adds a new item to the form. This can be used to add your own objects to the form. Note, however, that the Form class will override some o
form.go:436
Method
AddItem
AddItem adds a new item to the container. The "fixedSize" argument is a width or height that may not be changed by the layout algorithm. A value of 0
flex.go:96
Method
AddItem
AddItem calls [List.InsertItem] with an index of -1.
list.go:361
Method
BatchWriter
BatchWriter returns a new writer that can be used to write into the buffer but without Locking/Unlocking the buffer on every write, as [TextView.Write
textview.go:847
Method
Blur
Blur is called when this primitive loses focus.
inputfield.go:469
Method
Blur
Blur is called when this primitive loses focus.
box.go:476
Method
Clear
Clear removes all items from the grid.
grid.go:227
Method
Clear
Clear does not do anything.
table.go:311
Method
Clear
Clear clears all data.
table.go:326
Method
Clear
Clear removes all table data.
table.go:567
Method
Clear
Clear removes all items from the container.
flex.go:126
Method
Clear
Clear removes all input elements from the form, including the buttons if specified.
form.go:411
Method
Clear
Clear removes all text from the buffer.
textview.go:39
Method
Clear
Clear removes all text from the buffer. This triggers the "changed" callback.
textview.go:588
Method
Clear
Clear removes all text from the frame.
frame.go:91
Method
Clear
Clear removes all items from the list.
list.go:495
Method
ClearButtons
ClearButtons removes all buttons from the window.
modal.go:134
Method
ClearChildren
ClearChildren removes all child nodes from this node.
treeview.go:127
Method
Close
Close implements io.Closer for the writer by unlocking the original TextView.
textview.go:33
Method
Collapse
Collapse makes the child nodes of this node disappear.
treeview.go:177
Function
Colors
Colors demonstrates how to use colors.
demos/presentation/colors.go:13
Function
Cover
Cover returns the cover page.
demos/presentation/cover.go:27
Method
Draw
Draw draws this primitive onto the screen.
inputfield.go:476
Method
Draw
Draw draws this primitive onto the screen.
dropdown.go:383
Method
Draw
Draw draws this primitive onto the screen.
grid.go:270
Method
Draw
Draw draws this primitive onto the screen.
textarea.go:1162
Method
Draw
Draw draws this primitive onto the screen.
pages.go:292
Method
Draw
Draw draws this primitive onto the screen.
image.go:714
Method
Draw
Draw draws this primitive onto the screen.
table.go:873
Method
Draw
Draw draws this primitive onto the screen.
modal.go:156
Method
Draw
Draw draws this primitive onto the screen.
flex.go:145
← previous
next →
201–300 of 690, ranked by callers