MCPcopy Create free account

hub / github.com/jroimartin/gocui / functions

Functions171 in github.com/jroimartin/gocui

↓ 62 callersMethodSetView
SetView creates a new view with its top-left corner at (x0, y0) and the bottom-right one at (x1, y1). If a view with the same name already exists, its
gui.go:130
↓ 49 callersMethodSetKeybinding
SetKeybinding creates a new keybinding. If viewname equals to "" (empty string) then the keybinding will apply to all views. key must be a rune or a K
gui.go:249
↓ 22 callersMethodSize
Size returns the terminal's size.
gui.go:100
↓ 21 callersMethodClose
Close finalizes the library. It should be called after a successful initialization and when gocui is not needed anymore.
gui.go:95
↓ 19 callersMethodMainLoop
MainLoop runs the main loop until an error is returned. A successful finish should return ErrQuit.
gui.go:351
↓ 19 callersFunctionNewGui
NewGui returns a new Gui object with a given output mode.
gui.go:72
↓ 17 callersMethodSetManagerFunc
SetManagerFunc sets the given manager function. It deletes all views and keybindings.
gui.go:345
↓ 14 callersMethodSetCurrentView
SetCurrentView gives the focus to a given view.
gui.go:230
↓ 10 callersMethodMoveCursor
MoveCursor moves the cursor taking into account the width of the line/view, displacing the origin if necessary.
edit.go:118
↓ 8 callersMethodrealPosition
realPosition returns the position in the internal buffer corresponding to the point (x, y) of the view.
view.go:365
↓ 6 callersMethodName
Name returns the name of the view.
view.go:119
↓ 6 callersMethodSetRune
SetRune writes a rune at the given point, relative to the top-left corner of the terminal. It checks if the position is valid and applies the given co
gui.go:107
↓ 6 callersMethodSize
Size returns the number of visible columns and rows in the View.
view.go:114
↓ 6 callersMethodString
String returns a string from a given cell slice.
view.go:89
↓ 5 callersFunctionNewLabel
(name string, body string)
_examples/flow_layout.go:21
↓ 5 callersMethodSetViewOnTop
SetViewOnTop sets the given view on top of the existing ones.
gui.go:155
↓ 4 callersMethodClear
Clear empties the view's internal buffer.
view.go:391
↓ 4 callersMethodCursor
Cursor returns the cursor position of the view.
view.go:175
↓ 4 callersMethodSetCursor
SetCursor sets the cursor position of the view at the given point, relative to the view. It checks if the position is valid.
view.go:164
↓ 4 callersFunctionmoveView
(g *gocui.Gui, v *gocui.View, dx, dy int)
_examples/dynamic.go:180
↓ 3 callersMethodDeleteView
DeleteView deletes a view by name.
gui.go:219
↓ 3 callersMethodOrigin
Origin returns the origin position of the view.
view.go:194
↓ 3 callersMethodSetManager
SetManager sets the given GUI managers. It deletes all views and keybindings.
gui.go:334
↓ 3 callersMethodSetOrigin
SetOrigin sets the origin position of the view's internal buffer, so the buffer starts to be printed from this point, which means that it is linked wi
view.go:184
↓ 3 callersMethodView
View returns a pointer to the view with the given name, or error ErrUnknownView if a view with that name does not exist.
gui.go:185
↓ 3 callersMethoddeleteRune
deleteRune removes a rune from the view's internal buffer, at the position corresponding to the point (x, y).
edit.go:278
↓ 3 callersMethodoutputNormal
outputNormal provides 8 different colors: black, red, green, yellow, blue, magenta, cyan, white
escape.go:145
↓ 2 callersMethodBuffer
Buffer returns a string with the contents of the view's internal buffer.
view.go:425
↓ 2 callersMethodEditDelete
EditDelete deletes a rune at the cursor position. back determines the direction.
edit.go:63
↓ 2 callersMethodEditWrite
EditWrite writes a rune at the cursor position.
edit.go:56
↓ 2 callersMethodLine
Line returns a string with the line of the view's internal buffer at the position corresponding to the point (x, y).
view.go:457
↓ 2 callersFunctionNewButtonWidget
(name string, x, y int, label string, handler func(g *gocui.Gui, v *gocui.View) error)
_examples/widgets.go:94
↓ 2 callersMethodViewBuffer
ViewBuffer returns a string with the contents of the view's buffer that is shown to the user.
view.go:447
↓ 2 callersMethodclearRunes
clearRunes erases all the cells in the view.
view.go:401
↓ 2 callersMethodexecKeybindings
execKeybindings executes the keybinding handlers that match the passed view and event. The value of matched is true if there is a match and no errors.
gui.go:622
↓ 2 callersMethodflush
flush updates the gui, re-drawing frames and buffers.
gui.go:422
↓ 2 callersFunctiongetKey
getKey takes an empty interface with a key and returns the corresponding typed Key or rune.
gui.go:290
↓ 2 callersMethodhandleEvent
handleEvent handles an event, based on its type (key-press, error, etc.)
gui.go:410
↓ 2 callersMethodmergeLines
mergeLines merges the lines "y" and "y+1" if possible.
edit.go:294
↓ 2 callersFunctionnewView
(g *gocui.Gui)
_examples/dynamic.go:132
↓ 2 callersFunctionnextView
(g *gocui.Gui, disableCurrent bool)
_examples/dynamic.go:166
↓ 2 callersFunctionscrollView
(v *gocui.View, dy int)
_examples/stdin.go:100
↓ 2 callersFunctionsetCurrentViewOnTop
(g *gocui.Gui, name string)
_examples/active.go:19
↓ 2 callersFunctionstatusSet
(sw *StatusbarWidget, inc float64)
_examples/widgets.go:168
↓ 1 callersMethodEdit
(v *View, key Key, ch rune, mod Modifier)
edit.go:13
↓ 1 callersMethodEditNewLine
EditNewLine inserts a new line under the cursor.
edit.go:109
↓ 1 callersMethodLayout
Layout is called every time the GUI is redrawn, it must contain the base views and its initializations.
gui.go:319
↓ 1 callersFunctionNewHelpWidget
(name string, x, y int, body string)
_examples/widgets.go:25
↓ 1 callersFunctionNewStatusbarWidget
(name string, x, y, w int)
_examples/widgets.go:58
↓ 1 callersMethodRead
Read reads data into p. It returns the number of bytes read into p. At EOF, err will be io.EOF. Calling Read() after Rewind() makes the cache to be re
view.go:268
↓ 1 callersMethodRewind
Rewind sets the offset for the next Read to 0, which also refresh the read cache.
view.go:283
↓ 1 callersMethodSetVal
(val float64)
_examples/widgets.go:62
↓ 1 callersMethodSetViewOnBottom
SetViewOnBottom sets the given view on bottom of the existing ones.
gui.go:167
↓ 1 callersMethodUpdate
Update executes the passed function. This method can be called safely from a goroutine in order to update the GUI. It is important to note that the pa
gui.go:311
↓ 1 callersMethodVal
()
_examples/widgets.go:70
↓ 1 callersMethodViewByPosition
ViewByPosition returns a pointer to a view matching the given position, or error ErrUnknownView if a view in that position does not exist.
gui.go:196
↓ 1 callersMethodViewPosition
ViewPosition returns the coordinates of the view with the given name, or error ErrUnknownView if a view with that name does not exist.
gui.go:209
↓ 1 callersMethodViews
Views returns all the views in the GUI.
gui.go:179
↓ 1 callersMethodWrite
Write appends a byte slice into the view's internal buffer. Because View implements the io.Writer interface, it can be passed as parameter of function
view.go:202
↓ 1 callersMethodbreakLine
breakLine breaks a line of the internal buffer at the position corresponding to the point (x, y).
edit.go:315
↓ 1 callersMethodconsumeevents
consumeevents handles the remaining events in the events pool.
gui.go:391
↓ 1 callersFunctioncounter
(g *gocui.Gui)
_examples/goroutine.go:73
↓ 1 callersFunctiondelView
(g *gocui.Gui)
_examples/dynamic.go:153
↓ 1 callersMethoddraw
draw manages the cursor and calls the draw function of a view.
gui.go:553
↓ 1 callersMethoddrawFrameCorners
drawFrameCorners draws the corners of the view.
gui.go:511
↓ 1 callersMethoddrawFrameEdges
drawFrameEdges draws the horizontal and vertical edges of a view.
gui.go:471
↓ 1 callersMethoddrawTitle
drawTitle draws the title of the view.
gui.go:533
↓ 1 callersFunctioninitKeybindings
(g *gocui.Gui)
_examples/stdin.go:67
↓ 1 callersFunctioninitKeybindings
(g *gocui.Gui)
_examples/mask.go:60
↓ 1 callersFunctioninitKeybindings
(g *gocui.Gui)
_examples/dynamic.go:66
↓ 1 callersFunctionkeybindings
(g *gocui.Gui)
_examples/demo.go:88
↓ 1 callersFunctionkeybindings
(g *gocui.Gui)
_examples/ontop.go:55
↓ 1 callersFunctionkeybindings
(g *gocui.Gui)
_examples/mouse.go:60
↓ 1 callersFunctionkeybindings
(g *gocui.Gui)
_examples/goroutine.go:61
↓ 1 callersMethodmatchKeypress
matchKeypress returns if the keybinding matches the keypress.
keybinding.go:31
↓ 1 callersMethodmatchView
matchView returns if the keybinding matches the current view.
keybinding.go:36
↓ 1 callersFunctionnewEscapeInterpreter
newEscapeInterpreter returns an escapeInterpreter that will be able to parse terminal escape sequences.
escape.go:57
↓ 1 callersFunctionnewKeybinding
newKeybinding returns a new Keybinding object.
keybinding.go:19
↓ 1 callersFunctionnewView
newView returns a new View object.
view.go:98
↓ 1 callersMethodonKey
onKey manages key-press events. A keybinding handler is called when a key-press or mouse event satisfies a configured keybinding. Furthermore, current
gui.go:590
↓ 1 callersMethodoutput256
output256 allows you to leverage the 256-colors terminal mode: 0x01 - 0x08: the 8 colors as in OutputNormal 0x09 - 0x10: Color* | AttrBold 0x11 - 0xe8
escape.go:181
↓ 1 callersMethodparseInput
parseInput parses char by char the input written to the View. It returns nil while processing ESC sequences. Otherwise, it returns a cell slice that c
view.go:236
↓ 1 callersMethodparseOne
parseOne parses a rune. If isEscape is true, it means that the rune is part of an escape sequence, and as such should not be printed verbatim. Otherwi
escape.go:78
↓ 1 callersMethodreset
reset sets the escapeInterpreter in initial state.
escape.go:68
↓ 1 callersMethodrunes
runes in case of error will output the non-parsed runes as a string.
escape.go:36
↓ 1 callersMethodsetRune
setRune sets a rune at the given point relative to the view. It applies the specified colors, taking into account if the cell must be highlighted. Als
view.go:126
↓ 1 callersFunctionstatusDown
(status *StatusbarWidget)
_examples/widgets.go:162
↓ 1 callersFunctionstatusUp
(status *StatusbarWidget)
_examples/widgets.go:156
↓ 1 callersMethodwriteRune
writeRune writes a rune into the view's internal buffer, at the position corresponding to the point (x, y). The length of the internal buffer is incre
edit.go:237
MethodBufferLines
BufferLines returns the lines in the view's internal buffer.
view.go:413
MethodCurrentView
CurrentView returns the currently focused view, or nil if no view owns the focus.
gui.go:242
MethodDeleteKeybinding
DeleteKeybinding deletes a keybinding.
gui.go:262
MethodDeleteKeybindings
DeleteKeybindings deletes all keybindings of view.
gui.go:278
MethodEdit
Edit calls f(v, key, ch, mod)
edit.go:22
MethodLayout
Layout calls f(g)
gui.go:328
MethodLayout
(g *gocui.Gui)
_examples/flow_layout.go:36
MethodLayout
(g *gocui.Gui)
_examples/widgets.go:40
MethodLayout
(g *gocui.Gui)
_examples/widgets.go:74
MethodLayout
(g *gocui.Gui)
_examples/widgets.go:98
MethodRune
Rune returns the rune contained in the cell at the given position. It checks if the position is valid.
gui.go:117
next →1–100 of 171, ranked by callers