Documentation ¶
Index ¶
- Constants
- func TableWithDetailsRowByInteger(l1, l2 string) bool
- func TableWithDetailsRowByPriceDollar(l1, l2 string) bool
- func TableWithDetailsRowByString(l1, l2 string) bool
- func TableWithDetailsRowByYearMonthDay(l1, l2 string) bool
- type BarChartWidget
- func (self *BarChartWidget) ChangeSpeed(speed int)
- func (self *BarChartWidget) ClearData(t time.Time)
- func (self *BarChartWidget) NewDay(timer *timer.GameTimer)
- func (self *BarChartWidget) Repaint()
- func (self *BarChartWidget) SetChartColor(color uint32)
- func (self *BarChartWidget) SetPoint(t time.Time, value int32)
- type NothingWidget
- type StackedBarChartWidget
- func (self *StackedBarChartWidget) AddCategory(name string, color uint32)
- func (self *StackedBarChartWidget) AddPoint(t time.Time, category string)
- func (self *StackedBarChartWidget) ChangeSpeed(speed int)
- func (self *StackedBarChartWidget) ClearData(t time.Time)
- func (self *StackedBarChartWidget) NewDay(timer *timer.GameTimer)
- func (self *StackedBarChartWidget) Repaint()
- type TableWithDetails
- func (self *TableWithDetails) AddHeader(label string, size int32, sorterfunction TableWithDetailsRowBy)
- func (self *TableWithDetails) AddRow(row *TableWithDetailsRow)
- func (self *TableWithDetails) AddRowTop(row *TableWithDetailsRow)
- func (self *TableWithDetails) ClearRows()
- func (self *TableWithDetails) GetRows() []*TableWithDetailsRow
- func (t *TableWithDetails) Len() int
- func (t *TableWithDetails) Less(i, j int) bool
- func (self *TableWithDetails) MousePressDown(x, y int32, button uint8)
- func (self *TableWithDetails) RemoveRow(row *TableWithDetailsRow)
- func (self *TableWithDetails) Repaint()
- func (self *TableWithDetails) Resize(width, height int32)
- func (self *TableWithDetails) SetHeaderTextColor(color sdl.Color)
- func (self *TableWithDetails) SetTextColor(color sdl.Color)
- func (t *TableWithDetails) Swap(i, j int)
- func (self *TableWithDetails) Truncate(length int)
- type TableWithDetailsRow
- type TableWithDetailsRowBy
Constants ¶
const HEADER_HEIGHT = 25
Variables ¶
This section is empty.
Functions ¶
func TableWithDetailsRowByInteger ¶
TableWithDetailsRowByInteger is a TableWithDetailsRowBy helper implementation for string like "123"
func TableWithDetailsRowByPriceDollar ¶
TableWithDetailsRowByPriceDollar is TableWithDetailsRowBy helper implementation for string like "123.45 $"
func TableWithDetailsRowByString ¶
TableWithDetailsRowByString is TableWithDetailsRowBy helper implementation for string content
func TableWithDetailsRowByYearMonthDay ¶
TableWithDetailsRowByYearMonthDay is a TableWithDetailsRowBy helper implementation for string like "24-1-1995"
Types ¶
type BarChartWidget ¶
type BarChartWidget struct { sws.CoreWidget // contains filtered or unexported fields }
BarChartWidget is a bar chart widget streamlining nb months of graph in a sliding window style
func NewBarChartWidget ¶
func NewBarChartWidget(w, h int32) *BarChartWidget
NewBarChartWidget create a simple timeline stacked barchart graph widget with - legend on the right - time point on the bottom
func (*BarChartWidget) ChangeSpeed ¶
func (self *BarChartWidget) ChangeSpeed(speed int)
ChangeSpeed is part of GameTimerSubscriber interface
func (*BarChartWidget) ClearData ¶
func (self *BarChartWidget) ClearData(t time.Time)
ClearData removes all data (but not categories)
func (*BarChartWidget) NewDay ¶
func (self *BarChartWidget) NewDay(timer *timer.GameTimer)
NewDay is part of GameTimerSubscriber interface
func (*BarChartWidget) Repaint ¶
func (self *BarChartWidget) Repaint()
func (*BarChartWidget) SetChartColor ¶
func (self *BarChartWidget) SetChartColor(color uint32)
type NothingWidget ¶
type NothingWidget struct {
sws.CoreWidget
}
NothingWidget is used to print a "N/A" banner widget
func NewNothingWidget ¶
func NewNothingWidget(width, height int32) *NothingWidget
func (*NothingWidget) Repaint ¶
func (self *NothingWidget) Repaint()
type StackedBarChartWidget ¶
type StackedBarChartWidget struct { sws.CoreWidget // contains filtered or unexported fields }
StackedBarChartWidget is a bar chart widget streamlining nb months of graph in a sliding window style
func NewStackedBarChartWidget ¶
func NewStackedBarChartWidget(nbmonths int32, w, h int32) *StackedBarChartWidget
NewStackedBarChartWidget create a simple timeline stacked barchart graph widget with - legend on the right - time point on the bottom
func (*StackedBarChartWidget) AddCategory ¶
func (self *StackedBarChartWidget) AddCategory(name string, color uint32)
AddCategory allows to add/represent (with a specific color) a new category in the stack barchart
func (*StackedBarChartWidget) AddPoint ¶
func (self *StackedBarChartWidget) AddPoint(t time.Time, category string)
AddPoint is really about adding/appending a new data point into the currenttimeline barchart
func (*StackedBarChartWidget) ChangeSpeed ¶
func (self *StackedBarChartWidget) ChangeSpeed(speed int)
ChangeSpeed is part of GameTimerSubscriber interface
func (*StackedBarChartWidget) ClearData ¶
func (self *StackedBarChartWidget) ClearData(t time.Time)
ClearData removes all data (but not categories)
func (*StackedBarChartWidget) NewDay ¶
func (self *StackedBarChartWidget) NewDay(timer *timer.GameTimer)
NewDay is part of GameTimerSubscriber interface
func (*StackedBarChartWidget) Repaint ¶
func (self *StackedBarChartWidget) Repaint()
type TableWithDetails ¶
type TableWithDetails struct { sws.CoreWidget // contains filtered or unexported fields }
TableWithDetails is a data table with header + expandable details widget
func NewTableWithDetails ¶
func NewTableWithDetails(w, h int32) *TableWithDetails
NewTableWithDetails creates a TableWithDetails i.e. a data table with header + expandable details widget
func (*TableWithDetails) AddHeader ¶
func (self *TableWithDetails) AddHeader(label string, size int32, sorterfunction TableWithDetailsRowBy)
func (*TableWithDetails) AddRow ¶
func (self *TableWithDetails) AddRow(row *TableWithDetailsRow)
func (*TableWithDetails) AddRowTop ¶
func (self *TableWithDetails) AddRowTop(row *TableWithDetailsRow)
func (*TableWithDetails) ClearRows ¶
func (self *TableWithDetails) ClearRows()
func (*TableWithDetails) GetRows ¶
func (self *TableWithDetails) GetRows() []*TableWithDetailsRow
func (*TableWithDetails) Len ¶
func (t *TableWithDetails) Len() int
func (*TableWithDetails) Less ¶
func (t *TableWithDetails) Less(i, j int) bool
func (*TableWithDetails) MousePressDown ¶
func (self *TableWithDetails) MousePressDown(x, y int32, button uint8)
func (*TableWithDetails) RemoveRow ¶
func (self *TableWithDetails) RemoveRow(row *TableWithDetailsRow)
func (*TableWithDetails) Repaint ¶
func (self *TableWithDetails) Repaint()
func (*TableWithDetails) Resize ¶
func (self *TableWithDetails) Resize(width, height int32)
func (*TableWithDetails) SetHeaderTextColor ¶
func (self *TableWithDetails) SetHeaderTextColor(color sdl.Color)
func (*TableWithDetails) SetTextColor ¶
func (self *TableWithDetails) SetTextColor(color sdl.Color)
func (*TableWithDetails) Swap ¶
func (t *TableWithDetails) Swap(i, j int)
func (*TableWithDetails) Truncate ¶
func (self *TableWithDetails) Truncate(length int)
type TableWithDetailsRow ¶
type TableWithDetailsRow struct {
// contains filtered or unexported fields
}
func NewTableWithDetailsRow ¶
func NewTableWithDetailsRow(bgcolor uint32, labels []string, details sws.Widget) *TableWithDetailsRow
NewTableWithDetailsRow is about create a new row for a TableWithDetailsRow