style

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Black = Color{}
	White = Color{1, 1, 1, 1}
	Red   = Color{1, 0, 0, 1}
	Green = Color{0, 1, 0, 1}
	Blue  = Color{0, 0, 1, 1}
)

Functions

func AddClass

func AddClass(widget *gtk.Widget, class Class)

func RemoveClass

func RemoveClass(widget *gtk.Widget, class Class)

Types

type Class

type Class string

type Color

type Color struct{ R, G, B, A float64 }

func NewRGB

func NewRGB(r, g, b float64) Color

func NewRGBA

func NewRGBA(r, g, b, a float64) Color

func (Color) ToRGB

func (c Color) ToRGB() (r, g, b float64)

func (Color) ToRGBA

func (c Color) ToRGBA() (r, g, b, a float64)

func (Color) ToWeb

func (c Color) ToWeb() string

func (Color) WithAlpha

func (c Color) WithAlpha(alpha float64) (r, g, b, a float64)

type ColorMap

type ColorMap []Color

func (ColorMap) ToRGB

func (c ColorMap) ToRGB(f float64) (r, g, b float64)

func (ColorMap) ToRGBA

func (c ColorMap) ToRGBA(f float64, alpha float64) (r, g, b, a float64)

type Style

type Style struct {
	// contains filtered or unexported fields
}

func New

func New() *Style

func (*Style) AddToScreen

func (s *Style) AddToScreen(screen *gdk.Screen)

func (*Style) AddToWidget

func (s *Style) AddToWidget(widget *gtk.Widget)

func (*Style) BackgroundColor

func (s *Style) BackgroundColor(widget *gtk.Widget) Color

func (*Style) ColorByName

func (s *Style) ColorByName(widget *gtk.Widget, name string) Color

func (*Style) ForWidget

func (s *Style) ForWidget(widget *gtk.Widget) *WidgetStyle

func (*Style) ForegroundColor

func (s *Style) ForegroundColor(widget *gtk.Widget) Color

func (*Style) HasColor

func (s *Style) HasColor(widget *gtk.Widget, name string) bool

func (*Style) TextColor

func (s *Style) TextColor(widget *gtk.Widget) Color

type WidgetStyle

type WidgetStyle struct {
	// contains filtered or unexported fields
}

func (*WidgetStyle) BackgroundColor

func (s *WidgetStyle) BackgroundColor() Color

func (*WidgetStyle) ColorByName

func (s *WidgetStyle) ColorByName(name string) Color

func (*WidgetStyle) ForegroundColor

func (s *WidgetStyle) ForegroundColor() Color

func (*WidgetStyle) HasColor

func (s *WidgetStyle) HasColor(name string) bool

func (*WidgetStyle) TextColor

func (s *WidgetStyle) TextColor() Color

Jump to

Keyboard shortcuts

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