ui

package
v0.0.0-...-e2c201e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HEADER_HEIGHT = 25

Variables

This section is empty.

Functions

func TableWithDetailsRowByInteger

func TableWithDetailsRowByInteger(l1, l2 string) bool

TableWithDetailsRowByInteger is a TableWithDetailsRowBy helper implementation for string like "123"

func TableWithDetailsRowByPriceDollar

func TableWithDetailsRowByPriceDollar(l1, l2 string) bool

TableWithDetailsRowByPriceDollar is TableWithDetailsRowBy helper implementation for string like "123.45 $"

func TableWithDetailsRowByString

func TableWithDetailsRowByString(l1, l2 string) bool

TableWithDetailsRowByString is TableWithDetailsRowBy helper implementation for string content

func TableWithDetailsRowByYearMonthDay

func TableWithDetailsRowByYearMonthDay(l1, l2 string) bool

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)

func (*BarChartWidget) SetPoint

func (self *BarChartWidget) SetPoint(t time.Time, value int32)

AddPoint is really about adding/appending a new data point into the currenttimeline barchart

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

type TableWithDetailsRowBy

type TableWithDetailsRowBy func(l1, l2 string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL