Documentation ¶
Index ¶
- Constants
- Variables
- func FormatTextWithStyle(text string, style tcell.Style) string
- func GetCity(sfa *types.FidoAddr) string
- func GetElementStyle(section string, element string) tcell.Style
- func InitVars()
- func MaskToStringStyle(attrMask tcell.AttrMask) string
- func Read(fn string) error
- func StringToColor(str string) tcell.Color
- func StringToStyle(str string) (tcell.Style, error)
- type ColorMap
- type ColorScheme
- type ColorSchemeMap
- type DefaultColorsMap
- type SortTypeMap
Constants ¶
const ( ColorAreaStatusBar = "statusbar" ColorAreaDialog = "dialog" ColorAreaMessageList = "messageList" ColorAreaMessageHeader = "messageHeader" ColorAreaAreaList = "areaList" ColorAreaAreaListModal = "areaListModal" ColorAreaEditor = "editor" ColorAreaHelp = "help" ColorAreaDefault = "default" )
const ( ColorElementHeader = "header" ColorElementSelection = "selection" ColorElementTitle = "title" ColorElementItem = "item" ColorElementHighlight = "highlight" ColorElementBorder = "border" ColorElementText = "text" ColorElementPrompt = "prompt" ColorElementWindow = "window" )
const ( StyleUnderline = "underline" StyleBold = "bold" StyleReverse = "reverse" )
Variables ¶
var ( Version string PID string LongPID string Config configS Template []string StyleDefault tcell.Style )
vars
Functions ¶
func FormatTextWithStyle ¶
func GetElementStyle ¶
func MaskToStringStyle ¶
func MaskToStringStyle(attrMask tcell.AttrMask) string
func StringToColor ¶
func StringToColor(str string) tcell.Color
StringToColor returns a tcell color from a string representation of a color
func StringToStyle ¶
StringToStyle returns a style from a string The strings must be in the format "extra foregroundcolor,backgroundcolor" The 'extra' can be bold, reverse, or underline
Types ¶
type ColorScheme ¶
type ColorScheme map[string]tcell.Style
func ParseColorscheme ¶
func ParseColorscheme(text string) ColorScheme
ParseColorscheme parses the text definition for a colorscheme and returns the corresponding object Colorschemes are made up of color-link statements linking a color group to a list of colors For example, color-link keyword (blue,red) makes all keywords have a blue foreground and red background Todo: Implement to read Golded schemes in future
func ProduceColorSchemeFromConfig ¶
func ProduceColorSchemeFromConfig(colorArea string, defaultColors *ColorMap) *ColorScheme
ProduceColorSchemeFromConfig colorArea: node name in gossiped.yml defaultColors: pointer to default ColorMap values returns pointer to ColorScheme object
func (ColorScheme) GetColor ¶
func (colorscheme ColorScheme) GetColor(color string) tcell.Style
GetColor takes in a syntax group and returns the colorscheme's style for that group
type ColorSchemeMap ¶
type ColorSchemeMap map[string]*ColorScheme