Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/jroimartin/gocui
/ functions
Functions
171 in github.com/jroimartin/gocui
⨍
Functions
171
◇
Types & classes
21
↓ 62 callers
Method
SetView
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 callers
Method
SetKeybinding
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 callers
Method
Size
Size returns the terminal's size.
gui.go:100
↓ 21 callers
Method
Close
Close finalizes the library. It should be called after a successful initialization and when gocui is not needed anymore.
gui.go:95
↓ 19 callers
Method
MainLoop
MainLoop runs the main loop until an error is returned. A successful finish should return ErrQuit.
gui.go:351
↓ 19 callers
Function
NewGui
NewGui returns a new Gui object with a given output mode.
gui.go:72
↓ 17 callers
Method
SetManagerFunc
SetManagerFunc sets the given manager function. It deletes all views and keybindings.
gui.go:345
↓ 14 callers
Method
SetCurrentView
SetCurrentView gives the focus to a given view.
gui.go:230
↓ 10 callers
Method
MoveCursor
MoveCursor moves the cursor taking into account the width of the line/view, displacing the origin if necessary.
edit.go:118
↓ 8 callers
Method
realPosition
realPosition returns the position in the internal buffer corresponding to the point (x, y) of the view.
view.go:365
↓ 6 callers
Method
Name
Name returns the name of the view.
view.go:119
↓ 6 callers
Method
SetRune
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 callers
Method
Size
Size returns the number of visible columns and rows in the View.
view.go:114
↓ 6 callers
Method
String
String returns a string from a given cell slice.
view.go:89
↓ 5 callers
Function
NewLabel
(name string, body string)
_examples/flow_layout.go:21
↓ 5 callers
Method
SetViewOnTop
SetViewOnTop sets the given view on top of the existing ones.
gui.go:155
↓ 4 callers
Method
Clear
Clear empties the view's internal buffer.
view.go:391
↓ 4 callers
Method
Cursor
Cursor returns the cursor position of the view.
view.go:175
↓ 4 callers
Method
SetCursor
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 callers
Function
moveView
(g *gocui.Gui, v *gocui.View, dx, dy int)
_examples/dynamic.go:180
↓ 3 callers
Method
DeleteView
DeleteView deletes a view by name.
gui.go:219
↓ 3 callers
Method
Origin
Origin returns the origin position of the view.
view.go:194
↓ 3 callers
Method
SetManager
SetManager sets the given GUI managers. It deletes all views and keybindings.
gui.go:334
↓ 3 callers
Method
SetOrigin
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 callers
Method
View
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 callers
Method
deleteRune
deleteRune removes a rune from the view's internal buffer, at the position corresponding to the point (x, y).
edit.go:278
↓ 3 callers
Method
outputNormal
outputNormal provides 8 different colors: black, red, green, yellow, blue, magenta, cyan, white
escape.go:145
↓ 2 callers
Method
Buffer
Buffer returns a string with the contents of the view's internal buffer.
view.go:425
↓ 2 callers
Method
EditDelete
EditDelete deletes a rune at the cursor position. back determines the direction.
edit.go:63
↓ 2 callers
Method
EditWrite
EditWrite writes a rune at the cursor position.
edit.go:56
↓ 2 callers
Method
Line
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 callers
Function
NewButtonWidget
(name string, x, y int, label string, handler func(g *gocui.Gui, v *gocui.View) error)
_examples/widgets.go:94
↓ 2 callers
Method
ViewBuffer
ViewBuffer returns a string with the contents of the view's buffer that is shown to the user.
view.go:447
↓ 2 callers
Method
clearRunes
clearRunes erases all the cells in the view.
view.go:401
↓ 2 callers
Method
execKeybindings
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 callers
Method
flush
flush updates the gui, re-drawing frames and buffers.
gui.go:422
↓ 2 callers
Function
getKey
getKey takes an empty interface with a key and returns the corresponding typed Key or rune.
gui.go:290
↓ 2 callers
Method
handleEvent
handleEvent handles an event, based on its type (key-press, error, etc.)
gui.go:410
↓ 2 callers
Method
mergeLines
mergeLines merges the lines "y" and "y+1" if possible.
edit.go:294
↓ 2 callers
Function
newView
(g *gocui.Gui)
_examples/dynamic.go:132
↓ 2 callers
Function
nextView
(g *gocui.Gui, disableCurrent bool)
_examples/dynamic.go:166
↓ 2 callers
Function
scrollView
(v *gocui.View, dy int)
_examples/stdin.go:100
↓ 2 callers
Function
setCurrentViewOnTop
(g *gocui.Gui, name string)
_examples/active.go:19
↓ 2 callers
Function
statusSet
(sw *StatusbarWidget, inc float64)
_examples/widgets.go:168
↓ 1 callers
Method
Edit
(v *View, key Key, ch rune, mod Modifier)
edit.go:13
↓ 1 callers
Method
EditNewLine
EditNewLine inserts a new line under the cursor.
edit.go:109
↓ 1 callers
Method
Layout
Layout is called every time the GUI is redrawn, it must contain the base views and its initializations.
gui.go:319
↓ 1 callers
Function
NewHelpWidget
(name string, x, y int, body string)
_examples/widgets.go:25
↓ 1 callers
Function
NewStatusbarWidget
(name string, x, y, w int)
_examples/widgets.go:58
↓ 1 callers
Method
Read
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 callers
Method
Rewind
Rewind sets the offset for the next Read to 0, which also refresh the read cache.
view.go:283
↓ 1 callers
Method
SetVal
(val float64)
_examples/widgets.go:62
↓ 1 callers
Method
SetViewOnBottom
SetViewOnBottom sets the given view on bottom of the existing ones.
gui.go:167
↓ 1 callers
Method
Update
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 callers
Method
Val
()
_examples/widgets.go:70
↓ 1 callers
Method
ViewByPosition
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 callers
Method
ViewPosition
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 callers
Method
Views
Views returns all the views in the GUI.
gui.go:179
↓ 1 callers
Method
Write
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 callers
Method
breakLine
breakLine breaks a line of the internal buffer at the position corresponding to the point (x, y).
edit.go:315
↓ 1 callers
Method
consumeevents
consumeevents handles the remaining events in the events pool.
gui.go:391
↓ 1 callers
Function
counter
(g *gocui.Gui)
_examples/goroutine.go:73
↓ 1 callers
Function
delView
(g *gocui.Gui)
_examples/dynamic.go:153
↓ 1 callers
Method
draw
draw manages the cursor and calls the draw function of a view.
gui.go:553
↓ 1 callers
Method
drawFrameCorners
drawFrameCorners draws the corners of the view.
gui.go:511
↓ 1 callers
Method
drawFrameEdges
drawFrameEdges draws the horizontal and vertical edges of a view.
gui.go:471
↓ 1 callers
Method
drawTitle
drawTitle draws the title of the view.
gui.go:533
↓ 1 callers
Function
initKeybindings
(g *gocui.Gui)
_examples/stdin.go:67
↓ 1 callers
Function
initKeybindings
(g *gocui.Gui)
_examples/mask.go:60
↓ 1 callers
Function
initKeybindings
(g *gocui.Gui)
_examples/dynamic.go:66
↓ 1 callers
Function
keybindings
(g *gocui.Gui)
_examples/demo.go:88
↓ 1 callers
Function
keybindings
(g *gocui.Gui)
_examples/ontop.go:55
↓ 1 callers
Function
keybindings
(g *gocui.Gui)
_examples/mouse.go:60
↓ 1 callers
Function
keybindings
(g *gocui.Gui)
_examples/goroutine.go:61
↓ 1 callers
Method
matchKeypress
matchKeypress returns if the keybinding matches the keypress.
keybinding.go:31
↓ 1 callers
Method
matchView
matchView returns if the keybinding matches the current view.
keybinding.go:36
↓ 1 callers
Function
newEscapeInterpreter
newEscapeInterpreter returns an escapeInterpreter that will be able to parse terminal escape sequences.
escape.go:57
↓ 1 callers
Function
newKeybinding
newKeybinding returns a new Keybinding object.
keybinding.go:19
↓ 1 callers
Function
newView
newView returns a new View object.
view.go:98
↓ 1 callers
Method
onKey
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 callers
Method
output256
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 callers
Method
parseInput
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 callers
Method
parseOne
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 callers
Method
reset
reset sets the escapeInterpreter in initial state.
escape.go:68
↓ 1 callers
Method
runes
runes in case of error will output the non-parsed runes as a string.
escape.go:36
↓ 1 callers
Method
setRune
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 callers
Function
statusDown
(status *StatusbarWidget)
_examples/widgets.go:162
↓ 1 callers
Function
statusUp
(status *StatusbarWidget)
_examples/widgets.go:156
↓ 1 callers
Method
writeRune
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
Method
BufferLines
BufferLines returns the lines in the view's internal buffer.
view.go:413
Method
CurrentView
CurrentView returns the currently focused view, or nil if no view owns the focus.
gui.go:242
Method
DeleteKeybinding
DeleteKeybinding deletes a keybinding.
gui.go:262
Method
DeleteKeybindings
DeleteKeybindings deletes all keybindings of view.
gui.go:278
Method
Edit
Edit calls f(v, key, ch, mod)
edit.go:22
Method
Layout
Layout calls f(g)
gui.go:328
Method
Layout
(g *gocui.Gui)
_examples/flow_layout.go:36
Method
Layout
(g *gocui.Gui)
_examples/widgets.go:40
Method
Layout
(g *gocui.Gui)
_examples/widgets.go:74
Method
Layout
(g *gocui.Gui)
_examples/widgets.go:98
Method
Rune
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