Documentation ¶
Index ¶
- Variables
- type BarChartOldTheme
- type BlockOldTheme
- type GaugeOldTheme
- type ListOldTheme
- type OldElement
- func (e *OldElement) Draw(s tcell.Screen)
- func (e *OldElement) DrawableHeight() int
- func (e *OldElement) DrawableWidth() int
- func (e *OldElement) GetRect() image.Rectangle
- func (e *OldElement) SetRect(x1 int, y1 int, x2 int, y2 int)
- func (e *OldElement) X1() int
- func (e *OldElement) X2() int
- func (e *OldElement) Y1() int
- func (e *OldElement) Y2() int
- type ParagraphOldTheme
- type PieChartOldTheme
- type PlotOldTheme
- type RootOldTheme
- type SparklineOldTheme
- type StackedBarChartOldTheme
- type TabOldTheme
- type TableOldTheme
- type TreeOldTheme
Constants ¶
This section is empty.
Variables ¶
View Source
var OldTheme = RootOldTheme{ Default: NewStyle(ColorWhite), Block: BlockOldTheme{ Title: NewStyle(ColorWhite), Border: NewStyle(ColorWhite), }, BarChart: BarChartOldTheme{ Bars: StandardColors, Nums: StandardStyles, Labels: StandardStyles, }, Paragraph: ParagraphOldTheme{ Text: NewStyle(ColorWhite), }, PieChart: PieChartOldTheme{ Slices: StandardColors, }, List: ListOldTheme{ Text: NewStyle(ColorWhite), }, Tree: TreeOldTheme{ Text: NewStyle(ColorWhite), Collapsed: COLLAPSED, Expanded: EXPANDED, }, StackedBarChart: StackedBarChartOldTheme{ Bars: StandardColors, Nums: StandardStyles, Labels: StandardStyles, }, Gauge: GaugeOldTheme{ Bar: ColorWhite, Label: NewStyle(ColorWhite), }, Sparkline: SparklineOldTheme{ Title: NewStyle(ColorWhite), Line: ColorWhite, }, Plot: PlotOldTheme{ Lines: StandardColors, Axes: ColorWhite, }, Table: TableOldTheme{ Text: NewStyle(ColorWhite), }, Tab: TabOldTheme{ Active: NewStyle(ColorRed), Inactive: NewStyle(ColorWhite), }, }
OldTheme holds the default Styles and Colors for all widgets. You can set default widget Styles by modifying the OldTheme before creating the widgets.
View Source
var StandardColors = []tcell.Color{
ColorRed,
ColorGreen,
ColorYellow,
ColorBlue,
ColorMagenta,
ColorCyan,
ColorWhite,
}
View Source
var StandardStyles = []Style{
NewStyle(ColorRed),
NewStyle(ColorGreen),
NewStyle(ColorYellow),
NewStyle(ColorBlue),
NewStyle(ColorMagenta),
NewStyle(ColorCyan),
NewStyle(ColorWhite),
}
Functions ¶
This section is empty.
Types ¶
type BarChartOldTheme ¶
type BarChartOldTheme struct { Bars []tcell.Color Nums []Style Labels []Style }
type BlockOldTheme ¶
type BlockOldTheme struct { Title Style Border Style }
type GaugeOldTheme ¶
type GaugeOldTheme struct { Bar tcell.Color Label Style }
type ListOldTheme ¶
type ListOldTheme struct {
Text Style
}
type OldElement ¶
type OldElement struct { // Padding allows the drawable borders of an OldElement to be inset Padding *Padding // OldElementStyle represents the style of the space the OldElement covers OldElementStyle Style image.Rectangle // Inner represents the inner drawable space of an OldElement Inner image.Rectangle // Border whether or not to draw borders Border bool // BorderStyle represents the styling to apply to the borders BorderStyle Style BorderLeft bool BorderRight bool BorderTop bool BorderBottom bool // The optional Title of this OldElement which will be rendered in the top row Title string // TitleStyle represents the style of the title characters - this will override the border it draws on TitleStyle Style // TitlePadding defines the left and right inset for title drawing // top and bottom are unused TitlePadding *Padding sync.Mutex }
OldElement is the base struct inherited by most widgets OldElement manages size, position, inner drawable space, borders, and titles All other widgets and ui OldElements will oerride the Draw method
func NewOldElement ¶
func NewOldElement() *OldElement
NewOldElement returns a new stable OldElement that is drawable but can be modified
func (*OldElement) Draw ¶
func (e *OldElement) Draw(s tcell.Screen)
Draw implements the Drawable interface
func (*OldElement) GetRect ¶
func (e *OldElement) GetRect() image.Rectangle
GetRect implements the Drawable interface
type ParagraphOldTheme ¶
type ParagraphOldTheme struct {
Text Style
}
type PieChartOldTheme ¶
type PieChartOldTheme struct {
Slices []tcell.Color
}
type PlotOldTheme ¶
type PlotOldTheme struct { Lines []tcell.Color Axes tcell.Color }
type RootOldTheme ¶
type RootOldTheme struct { Default Style Block BlockOldTheme BarChart BarChartOldTheme Gauge GaugeOldTheme Plot PlotOldTheme List ListOldTheme Tree TreeOldTheme Paragraph ParagraphOldTheme PieChart PieChartOldTheme Sparkline SparklineOldTheme StackedBarChart StackedBarChartOldTheme Tab TabOldTheme Table TableOldTheme }
type SparklineOldTheme ¶
type SparklineOldTheme struct { Title Style Line tcell.Color }
type StackedBarChartOldTheme ¶
type StackedBarChartOldTheme struct { Bars []tcell.Color Nums []Style Labels []Style }
type TabOldTheme ¶
type TabOldTheme struct { Active Style Inactive Style }
type TableOldTheme ¶
type TableOldTheme struct {
Text Style
}
type TreeOldTheme ¶
Click to show internal directories.
Click to hide internal directories.