Documentation ¶
Index ¶
- Constants
- func NewFormatterPopup(selectedFn func(fileType input.FileType)) tview.Primitive
- func NewHelpPopup() tview.Primitive
- func NewMainPage(ratio int, nodeList *NodeList, output *Output, statusBar *StatusBar) (page tview.Primitive, topContentFlex *tview.Flex)
- type NodeList
- type Output
- func (o *Output) Blur()
- func (o *Output) Draw(screen tcell.Screen)
- func (o *Output) Focus(delegate func(p tview.Primitive))
- func (o *Output) GetFocusable() tview.Focusable
- func (o *Output) GetRect() (int, int, int, int)
- func (o *Output) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (o *Output) SetRect(x int, y int, width int, height int)
- func (o *Output) SetText(text string) *Output
- type StatusBar
- func (b *StatusBar) Blur()
- func (b *StatusBar) Draw(screen tcell.Screen)
- func (b *StatusBar) Focus(delegate func(p tview.Primitive))
- func (b *StatusBar) GetFocusable() tview.Focusable
- func (b *StatusBar) GetRect() (int, int, int, int)
- func (b *StatusBar) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (b *StatusBar) SetContent(path string, fileType input.FileType) *StatusBar
- func (b *StatusBar) SetFileType(fileType input.FileType) *StatusBar
- func (b *StatusBar) SetPath(path string) *StatusBar
- func (b *StatusBar) SetRect(x, y, width, height int)
Constants ¶
const ( // MainPage Key MainPage = "widgets.page.main" // FormatterPopupPage Key FormatterPopupPage = "widgets.page.formatter-popup" // HelpPopupPage Key HelpPopupPage = "widgets.page.help-popup" )
Variables ¶
This section is empty.
Functions ¶
func NewFormatterPopup ¶
NewFormatterPopup builds a new tview.Primitive for the formatter chooser
func NewHelpPopup ¶
NewHelpPopup builds a tview.Primitive for displaying some help text
Types ¶
type NodeList ¶
NodeList represents a specialized list for nodes.
func NewNodeList ¶
NewNodeList builds a new empty NodeList.
func (*NodeList) GetCurrentNode ¶
GetCurrentNode is a convience method for accessing the currently highlighted node.
func (*NodeList) SetChangedFn ¶
SetChangedFn sets the handler callback on change events.
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
Output is a simple tview.TextView wrapper to simplify the exposed interface
func (*Output) GetFocusable ¶
GetFocusable implements tview.Primitive
func (*Output) InputHandler ¶
InputHandler implements tview.Primitive, restriction to single line navigation only
type StatusBar ¶
type StatusBar struct {
// contains filtered or unexported fields
}
StatusBar is a smal wrapper around tview.TextView representing a simple 1-lined status bar
func (*StatusBar) GetFocusable ¶
GetFocusable implements tview.Primitive
func (*StatusBar) InputHandler ¶
InputHandler implements tview.Primitive
func (*StatusBar) SetContent ¶
SetContent updates the displayed content of the bar
func (*StatusBar) SetFileType ¶
SetFileType only updates the filetype, path remains