MCPcopy Index your code

hub / github.com/rivo/tview / functions

Functions690 in github.com/rivo/tview

↓ 88 callersMethodAddItem
AddItem adds a primitive and its position to the grid. The top-left corner of the primitive will be located in the top-left corner of the grid cell at
grid.go:201
↓ 46 callersMethodHasFocus
HasFocus determines if the primitive has focus. This function must return true also if one of this primitive's child elements has focus.
primitive.go:43
↓ 33 callersMethodGetInnerRect
GetInnerRect returns the position of the inner rectangle (x, y, width, height), without the border and without any padding. Width and height values wi
box.go:100
↓ 33 callersFunctionNewBox
NewBox returns a Box without a border.
box.go:72
↓ 30 callersMethodSetBorder
SetBorder sets the flag indicating whether or not the box should have a border.
box.go:297
↓ 28 callersMethodSetContent
SetContent sets a new content type for this table. This allows you to back the table by a data structure of your own, for example one that cannot be f
table.go:555
↓ 27 callersMethodSetTitle
SetTitle sets the box's title.
box.go:341
↓ 26 callersMethodfindCursor
findCursor determines the cursor position if its "row" value is < 0 (=unknown) but only its span position ("pos" value) is known. If the cursor positi
textarea.go:1464
↓ 25 callersMethodSetText
SetText sets the message text of the window. The text may contain line breaks but style tag states will not transfer to following lines. Note that wor
modal.go:103
↓ 25 callersFunctionprintWithStyle
printWithStyle works like [Print] but it takes a style instead of just a foreground color. The skipWidth parameter specifies the number of cells skipp
util.go:60
↓ 23 callersMethodEnableMouse
EnableMouse enables mouse events or disables them (if "false" is provided).
application.go:237
↓ 23 callersFunctionNewApplication
NewApplication creates and returns a new application.
application.go:137
↓ 23 callersMethodRun
Run starts the application and thus the event loop. This function returns when [Application.Stop] was called. Note that while an application is runni
application.go:279
↓ 19 callersFunctionNewTextView
NewTextView returns a new text view.
textview.go:244
↓ 18 callersMethodDrawForSubclass
DrawForSubclass draws this box under the assumption that primitive p is a subclass of this box. This is needed e.g. to draw proper box frames which de
box.go:375
↓ 18 callersMethodSetDoneFunc
SetDoneFunc sets a function which is called when the user presses the Escape key.
list.go:355
↓ 18 callersMethodSetRect
SetRect sets a new position of the primitive.
primitive.go:17
↓ 17 callersMethodInRect
InRect returns true if the given coordinate is within the bounds of the box's rectangle.
box.go:270
↓ 17 callersMethodSetBorders
SetBorders sets whether or not borders are drawn around grid items. Setting this value to true will cause the gap values (see SetGap()) to be ignored
grid.go:163
↓ 17 callersFunctionTaggedStringWidth
TaggedStringWidth returns the width of the given string needed to print it on screen. The text may contain style tags which are not counted.
strings.go:535
↓ 17 callersMethodWrapInputHandler
WrapInputHandler wraps an input handler (see [Box.InputHandler]) with the functionality to capture input (see [Box.SetInputCapture]) before passing it
box.go:161
↓ 17 callersMethodWrapMouseHandler
WrapMouseHandler wraps a mouse event handler (see [Box.MouseHandler]) with the functionality to capture mouse events (see [Box.SetMouseCapture]) befor
box.go:220
↓ 17 callersMethodtruncateLines
truncateLines truncates the trailing lines of the [TextArea.lineStarts] slice such that len(lineStarts) <= fromLine. If fromLine is negative, a value
textarea.go:1443
↓ 16 callersMethodDraw
Draw draws this primitive onto the screen. Implementers can call the screen's ShowCursor() function but should only do so when they have focus. (They
primitive.go:10
↓ 15 callersMethodInputHandler
InputHandler returns a handler which receives key events when it has focus. It is called by the Application class. A value of nil may also be returne
primitive.go:35
↓ 15 callersMethodSetRoot
SetRoot sets the root primitive for this application. If "fullscreen" is set to true, the root primitive's position will be changed to fill the screen
application.go:808
↓ 14 callersFunctionNewFlex
NewFlex returns a new flexbox layout container with no primitives and its direction set to FlexColumn. To add primitives to this layout, see AddItem()
flex.go:57
↓ 14 callersMethodmoveCursor
moveCursor sets the cursor's screen position and span position for the given row and column which are screen space coordinates relative to the top-lef
textarea.go:1693
↓ 14 callersMethodreplace
replace deletes a range of text and inserts the given text at that position. If the resulting text would exceed the maximum length, the function does
textarea.go:1007
↓ 13 callersMethodClear
Remove all table data.
table.go:275
↓ 13 callersMethodFocus
Focus is called by the application when the primitive receives focus. Implementers may call delegate() to pass the focus on to another primitive.
primitive.go:39
↓ 13 callersMethodMouseHandler
MouseHandler returns a handler which receives mouse events. It is called by the Application class. A value of nil may also be returned to stop the do
primitive.go:57
↓ 13 callersMethodSetLabel
SetLabel sets the text to be displayed before the image.
image.go:212
↓ 13 callersMethodStop
Stop stops the application, causing Run() to return.
application.go:624
↓ 13 callersFunctionstep
step uses uniseg.Step to iterate over the grapheme clusters of a string but (optionally) also parses the string for style or region tags. This functi
strings.go:110
↓ 12 callersMethodAddText
AddText adds text to the frame. Set "header" to true if the text is to appear in the header, above the contained primitive. Set it to false for it to
frame.go:80
↓ 12 callersMethodHighlight
Highlight specifies which regions should be highlighted. If highlight toggling is set to true (see [TextView.SetToggleHighlights]), the highlight of t
textview.go:623
↓ 12 callersMethodSetDynamicColors
SetDynamicColors sets the flag that allows the text color to be changed dynamically with style tags. See class description for details.
textview.go:470
↓ 12 callersMethodSetSelectable
SetSelectable sets the flags which determine what can be selected in a table. There are three selection modi: - rows = false, columns = false: Nothin
table.go:624
↓ 11 callersMethodWidth
Width returns the grapheme cluster's width in cells.
strings.go:72
↓ 11 callersMethoddraw
draw actually does what Draw() promises to do.
application.go:703
↓ 11 callersMethodresetIndex
resetIndex resets all indexed data, including the line index.
textview.go:855
↓ 11 callersMethodstep
step is similar to [github.com/rivo/uniseg.StepString] but it iterates over the piece chain, starting with "pos", a span position plus state (which ma
textarea.go:1621
↓ 10 callersMethodAddPage
AddPage adds a new page with the given name and primitive. If there was previously a page with the same name, it is overwritten. Leaving the name empt
pages.go:76
↓ 10 callersFunctionPrintJoinedSemigraphics
PrintJoinedSemigraphics prints a semigraphics rune into the screen at the given position with the given style, joining it with any existing semigraphi
semigraphics.go:309
↓ 10 callersMethodSetRoot
SetRoot sets the root node of the tree.
treeview.go:367
↓ 9 callersFunctionEscape
Escape escapes the given text such that color and/or region tags are not recognized and substituted by the print functions of this package. For exampl
strings.go:612
↓ 9 callersMethodGetCell
Return the cell at the given position or nil if there is no cell. The row and column arguments start at 0 and end at what GetRowCount() and GetColumnC
table.go:238
↓ 9 callersMethodGetText
GetText returns the current text of the input field.
inputfield.go:163
↓ 9 callersMethodPasteHandler
PasteHandler returns a handler which receives pasted text. It is called by the Application class. A value of nil may also be returned to stop the dow
primitive.go:68
↓ 9 callersMethodWrapPasteHandler
WrapPasteHandler wraps a paste handler (see [Box.PasteHandler]).
box.go:178
↓ 9 callersMethodextendLines
extendLines traverses the current text and extends [TextArea.lineStarts] such that it describes at least maxLines+1 lines (or less if the text is shor
textarea.go:1353
↓ 9 callersMethodgetSelection
getSelection returns the current selection as span locations where the first returned location is always before or the same as the second returned loc
textarea.go:1910
↓ 8 callersMethodGetLabel
GetLabel returns the item's label text.
form.go:26
↓ 8 callersFunctionNewList
NewList returns a new list.
list.go:101
↓ 8 callersMethodSetBorderPadding
SetBorderPadding sets the size of the borders around the box content.
box.go:86
↓ 8 callersMethodSetSelectedFunc
SetSelectedFunc sets the function which is called when the user selects a list item by pressing Enter on the current selection. The function receives
list.go:342
↓ 8 callersMethodSetWrap
SetWrap sets the flag that, if true, leads to lines that are longer than the available width being wrapped onto the next line. If false, any character
textarea.go:762
↓ 7 callersMethodAddButton
AddButton adds a new button to the form. The "selected" function is called when the user selects this button. It may be nil.
form.go:373
↓ 7 callersMethodFocus
Focus is called by the application when the primitive receives focus.
pages.go:273
↓ 7 callersMethodGrossLength
GrossLength returns the grapheme cluster's length in bytes, including any tags that were parsed but not explicitly returned.
strings.go:78
↓ 7 callersMethodHasFocus
HasFocus returns whether or not this primitive has focus.
pages.go:263
↓ 7 callersFunctionNewInputField
NewInputField returns a new input field.
inputfield.go:131
↓ 7 callersMethodScrollToHighlight
ScrollToHighlight will cause the visible area to be scrolled so that the highlighted regions appear in the visible area of the text view. This reposit
textview.go:721
↓ 7 callersMethodSetAlign
SetAlign sets the vertical and horizontal alignment of the image within the widget's space. The possible values are [AlignTop], [AlignCenter], and [Al
image.go:205
↓ 7 callersMethodSetInputCapture
SetInputCapture installs a function which captures key events before they are forwarded to the primitive's default key event handler. This function ca
box.go:204
↓ 7 callersMethodparseAhead
parseAhead parses the text buffer starting at the last line in [TextView.lineIndex] until either the end of the buffer or until stop returns true for
textview.go:872
↓ 6 callersMethodEnablePaste
EnablePaste enables the capturing of paste events or disables them (if "false" is provided). This must be supported by the terminal. Widgets won't in
application.go:257
↓ 6 callersFunctionNewPages
NewPages returns a new Pages object.
pages.go:36
↓ 6 callersMethodReplace
Replace replaces a section of the text with new text. The start and end positions refer to index positions within the entire text string (as a half-op
textarea.go:632
↓ 6 callersMethodSetBackgroundColor
SetBackgroundColor sets the box's background color.
box.go:289
↓ 6 callersMethodSetChangedFunc
SetChangedFunc sets the function which is called when the user navigates to a list item. The function receives the item's index in the list of items (
list.go:333
↓ 6 callersMethodSetCurrentItem
SetCurrentItem sets the currently selected item by its index, starting at 0 for the first item. If a negative index is provided, items are referred to
list.go:121
↓ 6 callersMethodSetDirection
SetDirection sets the direction in which the contained primitives are distributed. This can be either FlexColumn (default) or FlexRow. Note that these
flex.go:70
↓ 6 callersMethodSetFocus
SetFocus sets the focus to a new primitive. All key events will be directed down the hierarchy (starting at the root) until a primitive handles them,
application.go:838
↓ 6 callersMethodShowSecondaryText
ShowSecondaryText determines whether or not to show secondary item texts.
list.go:312
↓ 5 callersMethodAddButtons
AddButtons adds buttons to the window. There must be at least one button and a "done" handler so the window can be closed again.
modal.go:110
↓ 5 callersMethodAddInputField
AddInputField adds an input field to the form. It has a label, an optional initial value, a field width (a value of 0 extends it as far as possible),
form.go:304
↓ 5 callersMethodAutocomplete
Autocomplete invokes the autocomplete callback (if there is one, see [InputField.SetAutocompleteFunc]). If the length of the returned autocomplete ent
inputfield.go:354
↓ 5 callersMethodBlur
Blur is called by the application when the primitive loses focus.
primitive.go:46
↓ 5 callersMethodGetRowCount
Return the total number of rows in the table.
table.go:241
↓ 5 callersFunctionNewFrame
NewFrame returns a new frame around the given primitive. The primitive's size will be changed to fit within this frame. The primitive may be nil, in w
frame.go:38
↓ 5 callersFunctionNewGrid
NewGrid returns a new grid-based layout container with no initial primitives. Note that Box, the superclass of Grid, will be transparent so that any
grid.go:69
↓ 5 callersFunctionNewModal
NewModal returns a new modal message window.
modal.go:33
↓ 5 callersFunctionPrint
Print prints text onto the screen into the given box at (x,y,maxWidth,1), not exceeding that box. "align" is one of AlignLeft, AlignCenter, or AlignRi
util.go:49
↓ 5 callersMethodSetColors
SetColors sets the number of colors to use. This should be the number of colors supported by the terminal. If 0, the number of colors is chosen based
image.go:154
↓ 5 callersMethodSetFieldWidth
SetFieldWidth sets the screen width of the options area. A value of 0 means extend to as long as the longest option text.
dropdown.go:281
↓ 5 callersMethodSetRows
SetRows defines how the rows of the grid are distributed. These values behave the same as the column values provided with [Grid.SetColumns], see there
grid.go:119
↓ 5 callersMethodSetSeparator
SetSeparator sets the character used to fill the space between two neighboring cells. This is a space character ' ' per default but you may want to se
table.go:604
↓ 5 callersMethodSetTextColor
SetTextColor sets the color of the message text.
modal.go:62
↓ 5 callersMethodmoveWordLeft
moveWordLeft moves the cursor to the beginning of the current or previous word. If clamp is true, the cursor will be visible during the next call to [
textarea.go:1781
↓ 5 callersFunctionstripTags
stripTags strips style tags from the given string. (Region tags are not stripped.)
strings.go:623
↓ 4 callersFunctionCenter
Center returns a new primitive which shows the provided primitive in its center, given the provided primitive's size.
demos/presentation/center.go:7
↓ 4 callersFunctionCode
Code returns a primitive which displays the given primitive (with the given size) on the left side and its source code on the right side.
demos/presentation/code.go:14
↓ 4 callersMethodGetDisabled
GetDisabled returns whether or not the item is disabled / read-only.
textarea.go:844
↓ 4 callersMethodGetHighlights
GetHighlights returns the IDs of all currently highlighted regions.
textview.go:697
↓ 4 callersMethodGetText
GetText returns the entire text of the text area. Note that this will newly allocate the entire text.
textarea.go:440
↓ 4 callersFunctionNewForm
NewForm returns a new form.
form.go:108
↓ 4 callersFunctionNewTable
NewTable returns a new table.
table.go:538
↓ 4 callersFunctionNewTableCell
NewTableCell returns a new table cell with sensible defaults. That is, left aligned text with the primary text color (see Styles) and a transparent ba
table.go:74
next →1–100 of 690, ranked by callers