Documentation ¶
Index ¶
- func InterfaceSlice(slice interface{}) []interface{}
- type BarChart
- type BarChartRenderer
- type BaseWidget
- type DataProvider
- type DataRenderer
- type File
- type Gauge
- func NewGauge2(gaugeWidget *widgets.Gauge, provider DataProvider) *Gauge
- func NewGaugeDefaultRenderer(provider DataProvider) *Gauge
- func NewGaugeWithExisting(gaugeWidget *widgets.Gauge, provider DataProvider, renderer GaugeRenderer) *Gauge
- func NewGaugeWithRenderer(provider DataProvider, renderer GaugeRenderer) *Gauge
- type GaugeRenderer
- type Grid
- type GridItem
- type HTTP
- type Image
- type ImageRenderer
- type List
- type ListRenderer
- type Paragraph
- type ParagraphRenderer
- type PieChart
- type PieChartRenderer
- type Plot
- type PlotRenderer
- type Refreshable
- type SparklineGroup
- type SparklineGroupRenderer
- type StackedBarChart
- type StackedBarChartRenderer
- type Table
- type TableRenderer
- type WidgetData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterfaceSlice ¶
func InterfaceSlice(slice interface{}) []interface{}
Types ¶
type BarChart ¶
type BarChart struct { *widgets.BarChart BaseWidget }
func NewBarChart ¶
func NewBarChart(provider DataProvider) *BarChart
func NewBarChartWithRenderer ¶
func NewBarChartWithRenderer(provider DataProvider, renderer BarChartRenderer) *BarChart
type BarChartRenderer ¶
type BarChartRenderer struct {
BarChart BarChart
}
func (BarChartRenderer) PostRender ¶
func (renderer BarChartRenderer) PostRender(data *WidgetData) error
func (BarChartRenderer) PreRender ¶
func (renderer BarChartRenderer) PreRender(data *WidgetData) error
func (BarChartRenderer) Render ¶
func (renderer BarChartRenderer) Render(data *WidgetData) error
type BaseWidget ¶
type BaseWidget struct { Name string DataProvider DataRenderer Drawable ui.Drawable // contains filtered or unexported fields }
func (*BaseWidget) GetDrawable ¶
func (widget *BaseWidget) GetDrawable() ui.Drawable
func (*BaseWidget) GetName ¶
func (widget *BaseWidget) GetName() *string
func (*BaseWidget) GoRefresh ¶
func (widget *BaseWidget) GoRefresh(d time.Duration)
func (*BaseWidget) OneRefresh ¶
func (widget *BaseWidget) OneRefresh()
func (*BaseWidget) Refresh ¶
func (widget *BaseWidget) Refresh(d time.Duration)
func (*BaseWidget) Shutdown ¶
func (widget *BaseWidget) Shutdown()
type DataProvider ¶
type DataProvider interface { PreRetrieve() error Retrieve() (*WidgetData, error) PostRetrieve(*WidgetData, error) error }
type DataRenderer ¶
type DataRenderer interface { PreRender(*WidgetData) error Render(*WidgetData) error PostRender(*WidgetData) error }
type File ¶
type File struct {
Path string
}
func (File) PostRetrieve ¶
func (dp File) PostRetrieve(*WidgetData, error) error
func (File) PreRetrieve ¶
func (File) Retrieve ¶
func (dp File) Retrieve() (*WidgetData, error)
type Gauge ¶
type Gauge struct { *widgets.Gauge BaseWidget }
func NewGaugeDefaultRenderer ¶
func NewGaugeDefaultRenderer(provider DataProvider) *Gauge
func NewGaugeWithExisting ¶
func NewGaugeWithExisting(gaugeWidget *widgets.Gauge, provider DataProvider, renderer GaugeRenderer) *Gauge
func NewGaugeWithRenderer ¶
func NewGaugeWithRenderer(provider DataProvider, renderer GaugeRenderer) *Gauge
type GaugeRenderer ¶
type GaugeRenderer struct {
Gauge Gauge
}
func (GaugeRenderer) PostRender ¶
func (renderer GaugeRenderer) PostRender(data *WidgetData) error
func (GaugeRenderer) PreRender ¶
func (renderer GaugeRenderer) PreRender(data *WidgetData) error
func (GaugeRenderer) Render ¶
func (renderer GaugeRenderer) Render(data *WidgetData) error
type Grid ¶
type Grid struct { termui.Block Items []*GridItem }
func (*Grid) Set ¶
func (self *Grid) Set(entries ...interface{})
Set is used to add Columns and Rows to the grid. It recursively searches the GridItems, adding leaves to the grid and calculating the dimensions of the leaves.
func (*Grid) StartRefresh ¶
type GridItem ¶
type GridItem struct { Type gridItemType XRatio float64 YRatio float64 WidthRatio float64 HeightRatio float64 Entry interface{} // Entry.type == GridBufferer if IsLeaf else []GridItem IsLeaf bool // contains filtered or unexported fields }
GridItem represents either a Row or Column in a grid. Holds sizing information and either an []GridItems or a widget.
type HTTP ¶
type HTTP struct {
Url string
}
func (HTTP) PostRetrieve ¶
func (dp HTTP) PostRetrieve(*WidgetData, error) error
func (HTTP) PreRetrieve ¶
func (HTTP) Retrieve ¶
func (dp HTTP) Retrieve() (*WidgetData, error)
type Image ¶
type Image struct { *widgets.Image BaseWidget }
func NewImage ¶
func NewImage(provider DataProvider) *Image
func NewImageWithRenderer ¶
func NewImageWithRenderer(provider DataProvider, renderer ImageRenderer) *Image
type ImageRenderer ¶
type ImageRenderer struct {
Image Image
}
func (ImageRenderer) PostRender ¶
func (renderer ImageRenderer) PostRender(data *WidgetData) error
func (ImageRenderer) PreRender ¶
func (renderer ImageRenderer) PreRender(data *WidgetData) error
func (ImageRenderer) Render ¶
func (renderer ImageRenderer) Render(data *WidgetData) error
type List ¶
type List struct { *widgets.List BaseWidget }
func NewList ¶
func NewList(provider DataProvider) *List
func NewListWithRenderer ¶
func NewListWithRenderer(provider DataProvider, renderer ListRenderer) *List
type ListRenderer ¶
type ListRenderer struct {
List List
}
func (ListRenderer) PostRender ¶
func (renderer ListRenderer) PostRender(data *WidgetData) error
func (ListRenderer) PreRender ¶
func (renderer ListRenderer) PreRender(data *WidgetData) error
func (ListRenderer) Render ¶
func (renderer ListRenderer) Render(data *WidgetData) error
type Paragraph ¶
type Paragraph struct { *widgets.Paragraph BaseWidget }
func NewParagraph ¶
func NewParagraph(provider DataProvider) *Paragraph
func NewParagraphWithRenderer ¶
func NewParagraphWithRenderer(provider DataProvider, renderer ParagraphRenderer) *Paragraph
type ParagraphRenderer ¶
type ParagraphRenderer struct {
Paragraph Paragraph
}
func (ParagraphRenderer) PostRender ¶
func (renderer ParagraphRenderer) PostRender(data *WidgetData) error
func (ParagraphRenderer) PreRender ¶
func (renderer ParagraphRenderer) PreRender(data *WidgetData) error
func (ParagraphRenderer) Render ¶
func (renderer ParagraphRenderer) Render(data *WidgetData) error
type PieChart ¶
type PieChart struct { *widgets.PieChart BaseWidget }
func NewPieChart ¶
func NewPieChart(provider DataProvider) *PieChart
func NewPieChartWithRenderer ¶
func NewPieChartWithRenderer(provider DataProvider, renderer PieChartRenderer) *PieChart
type PieChartRenderer ¶
type PieChartRenderer struct {
PieChart PieChart
}
func (PieChartRenderer) PostRender ¶
func (renderer PieChartRenderer) PostRender(data *WidgetData) error
func (PieChartRenderer) PreRender ¶
func (renderer PieChartRenderer) PreRender(data *WidgetData) error
func (PieChartRenderer) Render ¶
func (renderer PieChartRenderer) Render(data *WidgetData) error
type Plot ¶
type Plot struct { *widgets.Plot BaseWidget }
func NewPlot ¶
func NewPlot(provider DataProvider) *Plot
func NewPlotWithRenderer ¶
func NewPlotWithRenderer(provider DataProvider, renderer PlotRenderer) *Plot
type PlotRenderer ¶
type PlotRenderer struct {
Plot Plot
}
func (PlotRenderer) PostRender ¶
func (renderer PlotRenderer) PostRender(data *WidgetData) error
func (PlotRenderer) PreRender ¶
func (renderer PlotRenderer) PreRender(data *WidgetData) error
func (PlotRenderer) Render ¶
func (renderer PlotRenderer) Render(data *WidgetData) error
type Refreshable ¶
type SparklineGroup ¶
type SparklineGroup struct { *widgets.SparklineGroup BaseWidget }
func NewSparklineGroup ¶
func NewSparklineGroup(provider DataProvider) *SparklineGroup
func NewSparklineGroupWithRenderer ¶
func NewSparklineGroupWithRenderer(provider DataProvider, renderer SparklineGroupRenderer) *SparklineGroup
type SparklineGroupRenderer ¶
type SparklineGroupRenderer struct {
SparklineGroup SparklineGroup
}
func (SparklineGroupRenderer) PostRender ¶
func (renderer SparklineGroupRenderer) PostRender(data *WidgetData) error
func (SparklineGroupRenderer) PreRender ¶
func (renderer SparklineGroupRenderer) PreRender(data *WidgetData) error
func (SparklineGroupRenderer) Render ¶
func (renderer SparklineGroupRenderer) Render(data *WidgetData) error
type StackedBarChart ¶
type StackedBarChart struct { *widgets.StackedBarChart BaseWidget }
func NewStackedBarChart ¶
func NewStackedBarChart(provider DataProvider) *StackedBarChart
func NewStackedBarChartWithRenderer ¶
func NewStackedBarChartWithRenderer(provider DataProvider, renderer StackedBarChartRenderer) *StackedBarChart
type StackedBarChartRenderer ¶
type StackedBarChartRenderer struct {
StackedBarChart StackedBarChart
}
func (StackedBarChartRenderer) PostRender ¶
func (renderer StackedBarChartRenderer) PostRender(data *WidgetData) error
func (StackedBarChartRenderer) PreRender ¶
func (renderer StackedBarChartRenderer) PreRender(data *WidgetData) error
func (StackedBarChartRenderer) Render ¶
func (renderer StackedBarChartRenderer) Render(data *WidgetData) error
type Table ¶
type Table struct { *widgets.Table BaseWidget }
func NewTable ¶
func NewTable(provider DataProvider) *Table
func NewTableWithRenderer ¶
func NewTableWithRenderer(provider DataProvider, renderer TableRenderer) *Table
type TableRenderer ¶
type TableRenderer struct {
Table Table
}
func (TableRenderer) PostRender ¶
func (renderer TableRenderer) PostRender(data *WidgetData) error
func (TableRenderer) PreRender ¶
func (renderer TableRenderer) PreRender(data *WidgetData) error
func (TableRenderer) Render ¶
func (renderer TableRenderer) Render(data *WidgetData) error
type WidgetData ¶
Source Files ¶
- barchart.go
- barchart_renderer.go
- base_widget.go
- data_provider.go
- data_renderer.go
- file_data_provider.go
- gauge.go
- gauge_renderer.go
- grid.go
- http_data_provider.go
- image.go
- image_renderer.go
- list.go
- list_renderer.go
- paragraph.go
- paragraph_renderer.go
- piechart.go
- piechart_renderer.go
- plot.go
- plot_renderer.go
- sparkline_group.go
- sparkline_group_renderer.go
- stacked_barchart.go
- stacked_barchart_renderer.go
- table.go
- table_renderer.go
- widget_data.go
Click to show internal directories.
Click to hide internal directories.