gelook

package module
v0.0.4-0...-0609e80 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Unlicense Imports: 20 Imported by: 0

README

gelook

Gio elements ParallelCoin theme

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DuoUIdrawRectangle

func DuoUIdrawRectangle(gtx *layout.Context, w, h int, color string, borderRadius [4]float32, padding [4]float32)

func DuoUIfill

func DuoUIfill(gtx *layout.Context, col string)

func HexARGB

func HexARGB(s string) (c color.RGBA)

func NewDuoUIcolors

func NewDuoUIcolors() (c map[string]string)

func NewDuoUIfonts

func NewDuoUIfonts() (f map[string]text.Typeface)

func NewDuoUIicons

func NewDuoUIicons() (i map[string]*DuoUIicon)

Types

type Button

type Button struct {
	Text string
	// Color is the text color.
	Color        color.RGBA
	Font         text.Font
	TextSize     unit.Value
	Background   color.RGBA
	CornerRadius unit.Value
	// contains filtered or unexported fields
}

func (Button) Layout

func (b Button) Layout(gtx *layout.Context, button *gel.Button)

type Command

type Command struct {
	Com      interface{}
	ComID    string
	Category string
	Out      func()
	Time     time.Time
}

func (Command) Layout

func (p Command) Layout(gtx *layout.Context, f func())

type DuoUIbutton

type DuoUIbutton struct {
	Text string
	// Color is the text color.
	TxColor           color.RGBA
	BgColor           color.RGBA
	TxColorHover      color.RGBA
	BgColorHover      color.RGBA
	Font              text.Font
	TextSize          unit.Value
	Width             int
	Height            int
	CornerRadius      unit.Value
	Icon              *DuoUIicon
	IconSize          int
	IconColor         color.RGBA
	PaddingVertical   unit.Value
	PaddingHorizontal unit.Value
	// contains filtered or unexported fields
}

func (DuoUIbutton) IconLayout

func (b DuoUIbutton) IconLayout(gtx *layout.Context, button *gel.Button)

func (DuoUIbutton) Layout

func (b DuoUIbutton) Layout(gtx *layout.Context, button *gel.Button)

func (DuoUIbutton) MenuLayout

func (b DuoUIbutton) MenuLayout(gtx *layout.Context, button *gel.Button)

type DuoUIcheckBox

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

func (DuoUIcheckBox) Layout

func (c DuoUIcheckBox) Layout(gtx *layout.Context, checkBox *gel.CheckBox)

type DuoUIcomponent

type DuoUIcomponent struct {
	Name    string
	Version string
	M       interface{}
	V       func()
	C       func()
}

func (DuoUIcomponent) Layout

func (p DuoUIcomponent) Layout(gtx *layout.Context, f func())

type DuoUIcounter

type DuoUIcounter struct {
	Font     text.Font
	TextSize unit.Value
	TxColor  string
	BgColor  string
	// contains filtered or unexported fields
}

func (DuoUIcounter) Layout

func (c DuoUIcounter) Layout(gtx *layout.Context, cc *gel.DuoUIcounter, label, value string)

type DuoUIeditor

type DuoUIeditor struct {
	Font     text.Font
	TextSize unit.Value
	// Color is the text color.
	Color color.RGBA
	// Hint contains the text displayed when the editor is empty.
	Hint string
	// HintColor is the color of hint text.
	HintColor color.RGBA
	// contains filtered or unexported fields
}

func (DuoUIeditor) Layout

func (e DuoUIeditor) Layout(gtx *layout.Context, editor *gel.Editor)

type DuoUIicon

type DuoUIicon struct {
	Color color.RGBA
	// contains filtered or unexported fields
}

func NewDuoUIicon

func NewDuoUIicon(data []byte) (*DuoUIicon, error)

NewDuoUIicon returns a new DuoUIicon from DuoUIiconVG data.

func (*DuoUIicon) Layout

func (ic *DuoUIicon) Layout(gtx *layout.Context, sz unit.Value)

type DuoUIimage

type DuoUIimage struct {
	// Src is the image to display.
	Src paint.ImageOp
	// Scale is the ratio of image pixels to
	// dps.
	Scale float32
}

Image is a widget that displays an image.

func (DuoUIimage) Layout

func (im DuoUIimage) Layout(gtx *layout.Context)

type DuoUIitem

type DuoUIitem struct {
	// Color is the text color.
	Color        string
	Font         text.Font
	TextSize     unit.Value
	Background   string
	TxColor      string
	BgColor      string
	TxColorHover string
	BgColorHover string
	Width        int
	Height       int
	CornerRadius unit.Value
	// contains filtered or unexported fields
}

func (DuoUIitem) Layout

func (d DuoUIitem) Layout(gtx *layout.Context, itemContent func())

type DuoUIlabel

type DuoUIlabel struct {
	// Face defines the text style.
	Font text.Font
	// Color is the text color.
	Color color.RGBA
	// Alignment specify the text alignment.
	Alignment text.Alignment
	// MaxLines limits the number of lines. Zero means no limit.
	MaxLines int
	Text     string
	TextSize unit.Value
	// contains filtered or unexported fields
}

func (DuoUIlabel) Layout

func (l DuoUIlabel) Layout(gtx *layout.Context)

type DuoUIpage

type DuoUIpage struct {
	Title       string
	TxColor     string
	Font        text.Font
	BgColor     string
	BorderColor string
	Border      float32

	Command func()
	// contains filtered or unexported fields
}

func (DuoUIpage) Layout

func (p DuoUIpage) Layout(gtx *layout.Context)

type DuoUIpanel

type DuoUIpanel struct {
	Name string
	// contains filtered or unexported fields
}

func (*DuoUIpanel) Layout

func (p *DuoUIpanel) Layout(gtx *layout.Context, panel *gel.Panel)

type DuoUItheme

type DuoUItheme struct {
	Shaper   text.Shaper
	TextSize unit.Value
	Colors   map[string]string
	Fonts    map[string]text.Typeface
	Icons    map[string]*DuoUIicon
	// contains filtered or unexported fields
}

func NewDuoUItheme

func NewDuoUItheme() *DuoUItheme

func (*DuoUItheme) Body1

func (t *DuoUItheme) Body1(txt string) DuoUIlabel

func (*DuoUItheme) Body2

func (t *DuoUItheme) Body2(txt string) DuoUIlabel

func (*DuoUItheme) Button

func (t *DuoUItheme) Button(txt string) Button

func (*DuoUItheme) Caption

func (t *DuoUItheme) Caption(txt string) DuoUIlabel

func (*DuoUItheme) Command

func (t *DuoUItheme) Command(name string) *Command

func (*DuoUItheme) DuoUIbutton

func (t *DuoUItheme) DuoUIbutton(txtFont text.Typeface, txt, txtColor, bgColor, txtHoverColor, bgHoverColor, icon, iconColor string, textSize, iconSize, width, height, paddingVertical, paddingHorizontal int) DuoUIbutton

func (*DuoUItheme) DuoUIcheckBox

func (t *DuoUItheme) DuoUIcheckBox(label, color, iconColor string) DuoUIcheckBox

func (*DuoUItheme) DuoUIcomponent

func (t *DuoUItheme) DuoUIcomponent(name string) *DuoUIcomponent

func (*DuoUItheme) DuoUIcounter

func (t *DuoUItheme) DuoUIcounter(pageFunction func()) DuoUIcounter

func (*DuoUItheme) DuoUIeditor

func (t *DuoUItheme) DuoUIeditor(hint string) DuoUIeditor

func (*DuoUItheme) DuoUIitem

func (t *DuoUItheme) DuoUIitem(background string) DuoUIitem

func (*DuoUItheme) DuoUIlabel

func (t *DuoUItheme) DuoUIlabel(size unit.Value, txt string) DuoUIlabel

func (*DuoUItheme) DuoUIline

func (t *DuoUItheme) DuoUIline(gtx *layout.Context, color string) func()

func (*DuoUItheme) DuoUIpage

func (t *DuoUItheme) DuoUIpage(txt string, border float32, command, header, body, footer func()) *DuoUIpage

func (*DuoUItheme) DuoUIpanel

func (t *DuoUItheme) DuoUIpanel(content func()) *DuoUIpanel

func (*DuoUItheme) H1

func (t *DuoUItheme) H1(txt string) DuoUIlabel

func (*DuoUItheme) H2

func (t *DuoUItheme) H2(txt string) DuoUIlabel

func (*DuoUItheme) H3

func (t *DuoUItheme) H3(txt string) DuoUIlabel

func (*DuoUItheme) H4

func (t *DuoUItheme) H4(txt string) DuoUIlabel

func (*DuoUItheme) H5

func (t *DuoUItheme) H5(txt string) DuoUIlabel

func (*DuoUItheme) H6

func (t *DuoUItheme) H6(txt string) DuoUIlabel

func (*DuoUItheme) IconButton

func (t *DuoUItheme) IconButton(icon *DuoUIicon) IconButton

func (*DuoUItheme) Image

func (t *DuoUItheme) Image(img paint.ImageOp) DuoUIimage

func (*DuoUItheme) ScrollBar

func (t *DuoUItheme) ScrollBar(c *gel.ScrollBar) *ScrollBar

type DuoUIthemeNav

type DuoUIthemeNav struct {
	Title string
	// Color is the text color.
	TxColor      color.RGBA
	Font         text.Font
	BgColor      color.RGBA
	CornerRadius unit.Value
	// Icon          *DuoUIicon
	IcoBackground color.RGBA
	IcoColor      color.RGBA
	IcoPadding    unit.Value
	IcoSize       unit.Value
	Size          unit.Value
	Padding       unit.Value
}

func (DuoUIthemeNav) Layout

func (n DuoUIthemeNav) Layout(gtx *layout.Context)

type IconButton

type IconButton struct {
	Background color.RGBA
	Color      color.RGBA
	Icon       *DuoUIicon
	Size       unit.Value
	Padding    unit.Value
}

func (IconButton) Layout

func (b IconButton) Layout(gtx *layout.Context, button *gel.Button)

type ScrollBar

type ScrollBar struct {
	ColorBg      string
	BorderRadius [4]float32
	OperateValue interface{}
	// contains filtered or unexported fields
}

func (*ScrollBar) Layout

func (s *ScrollBar) Layout(gtx *layout.Context, positionOffset int, scrollUnit float32)

type ScrollBarBody

type ScrollBarBody struct {
	ColorBg string
	Height  int
	Icon    DuoUIicon
}

type ScrollBarButton

type ScrollBarButton struct {
	Height int
	// contains filtered or unexported fields
}

Directories

Path Synopsis
ico
svg

Jump to

Keyboard shortcuts

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