Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BarChart ¶
type BarChart struct { NumFormatter func(float64) string Labels []string BarColors []ui.Color LabelStyles []ui.Style NumStyles []ui.Style Data []float64 ui.Block BarWidth int BarGap int MaxVal float64 }
BarChart represnts a custom UI widget
func NewBarChart ¶
func NewBarChart() *BarChart
NewBarChart initialises and returns a pointer to a BarChart instance
type EditBox ¶
type EditBox struct {
// contains filtered or unexported fields
}
EditBox helps user provide input through a text box like widget
func (*EditBox) AdjustVOffset ¶
AdjustVOffset adjusts line visual offset to a proper value depending on width
type HelpMenu ¶
HelpMenu is a wrapper widget around a List meant to display the help menu for a command
func (*HelpMenu) SelectHelpMenu ¶
SelectHelpMenu selects the appropriate text based on the command for which the help page is needed
type LineGraph ¶
type LineGraph struct { *ui.Block Data map[string][]float64 Labels map[string]string HorizontalScale int MaxVal float64 LineColors map[string]ui.Color DefaultLineColor ui.Color }
LineGraph implements a line graph of data points.
func NewLineGraph ¶
func NewLineGraph() *LineGraph
NewLineGraph creates and returns a lineGraph instance
type Table ¶
type Table struct { *ui.Block Header []string Rows [][]string // Different Styles for Header and Rows HeaderStyle ui.Style RowStyle ui.Style ColWidths []int ColGap int PadLeft int ShowCursor bool CursorColor ui.Color ShowLocation bool UniqueCol int // the column used to uniquely identify each table row SelectedItem string // used to keep the cursor on the correct item if the data changes SelectedRow int TopRow int // used to indicate where in the table we are scrolled at ChangeCol map[int]bool // Used to set if a column represents change ColColor map[int]ui.Color // Set a custom colour to a column ColResizer func() IsHelp bool }
Table represents a custom table widget
func (*Table) ScrollBottom ¶
func (t *Table) ScrollBottom()
ScrollBottom moves the cursor to the bottom
func (*Table) ScrollDown ¶
func (t *Table) ScrollDown()
ScrollDown moves the cursor one position downwards
func (*Table) ScrollHalfPageDown ¶
func (t *Table) ScrollHalfPageDown()
ScrollHalfPageDown moves the cursor half a page down
func (*Table) ScrollHalfPageUp ¶
func (t *Table) ScrollHalfPageUp()
ScrollHalfPageUp moves the cursor half a page up
func (*Table) ScrollPageDown ¶
func (t *Table) ScrollPageDown()
ScrollPageDown moves the cursor a page down