Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterMarkup(mk *markup.Markup)
- type BGRA
- type BGRAColor
- type Bar
- func (b *Bar) BgColor() color.Color
- func (b *Bar) Direction() string
- func (b *Bar) Draw(x, y int, im draw.Image)
- func (b *Bar) FgColor() color.Color
- func (b *Bar) Radius() int
- func (b *Bar) SetBgColor(v color.Color)
- func (b *Bar) SetDirection(v string)
- func (b *Bar) SetFgColor(v color.Color)
- func (b *Bar) SetHeight(v int)
- func (b *Bar) SetRadius(v int)
- func (b *Bar) SetValue(v float64)
- func (b *Bar) SetWidth(v int)
- func (b *Bar) Value() float64
- type Base
- func (b *Base) Children() []ui.Drawable
- func (b *Base) Context() ui.Context
- func (b *Base) Height() int
- func (b *Base) Init() error
- func (b Base) Notify()
- func (b *Base) OnHeightChange(c func(int))
- func (b *Base) OnLeftClick() func(ui.Event) bool
- func (b *Base) OnPointerEnter() func(ui.Event) bool
- func (b *Base) OnPointerLeave() func(ui.Event) bool
- func (b *Base) OnPointerMove() func(ui.Event) bool
- func (b *Base) OnRightClick() func(ui.Event) bool
- func (b *Base) OnVisibleChange(c func(bool))
- func (b *Base) OnWidthChange(c func(int))
- func (b *Base) Parent() ui.ParentDrawable
- func (b *Base) SendEvent(ev ui.Event) bool
- func (b *Base) SetContext(ctx ui.Context)
- func (b *Base) SetOnLeftClick(cb func(ui.Event) bool)
- func (b *Base) SetOnPointerEnter(cb func(ui.Event) bool)
- func (b *Base) SetOnPointerLeave(cb func(ui.Event) bool)
- func (b *Base) SetOnPointerMove(cb func(ui.Event) bool)
- func (b *Base) SetOnRightClick(cb func(ui.Event) bool)
- func (b *Base) SetVisible(v bool)
- func (b Base) Visible() bool
- func (b *Base) Width() int
- type Circle
- type Col
- func (c *Col) Add(d ui.Drawable)
- func (c *Col) Align() string
- func (c *Col) ChildContext(i int) ui.Context
- func (c *Col) Children() []ui.Drawable
- func (c *Col) Draw(x, y int, im draw.Image)
- func (c *Col) SendEvent(ev ui.Event) bool
- func (c *Col) SetAlign(v string)
- func (c *Col) SetContext(ctx ui.Context)
- type Graph
- func (b *Graph) Color() color.Color
- func (b *Graph) Data() []float64
- func (b *Graph) Direction() string
- func (g Graph) Draw(xt, yt int, im draw.Image)
- func (b *Graph) SetColor(v color.Color)
- func (b *Graph) SetData(v []float64)
- func (b *Graph) SetDirection(v string)
- func (b *Graph) SetHeight(v int)
- func (b *Graph) SetWidth(v int)
- type Image
- type Layers
- func (l *Layers) Add(d ui.Drawable)
- func (c *Layers) ChildContext(i int) ui.Context
- func (c *Layers) Children() []ui.Drawable
- func (l *Layers) Draw(x, y int, im draw.Image)
- func (l *Layers) HAlign() string
- func (c *Layers) SendEvent(ev ui.Event) bool
- func (l *Layers) SetContext(ctx ui.Context)
- func (l *Layers) SetHAlign(v string)
- func (l *Layers) SetVAlign(v string)
- func (l *Layers) VAlign() string
- type Pattern
- func (p *Pattern) Add(d ui.Drawable)
- func (p *Pattern) ChildContext(i int) ui.Context
- func (p *Pattern) Children() []ui.Drawable
- func (p *Pattern) Draw(dx, dy int, im draw.Image)
- func (p *Pattern) SendEvent(ev ui.Event) bool
- func (p *Pattern) SetContext(ctx ui.Context)
- func (p *Pattern) SetHeight(v int)
- func (p *Pattern) SetWidth(v int)
- type Rect
- func (s *Rect) Add(d ui.Drawable)
- func (c *Rect) ChildContext(i int) ui.Context
- func (r *Rect) Children() []ui.Drawable
- func (b *Rect) Color() color.Color
- func (r *Rect) Draw(x, y int, im draw.Image)
- func (b *Rect) Radius() int
- func (s *Rect) SendEvent(ev ui.Event) bool
- func (b *Rect) SetColor(v color.Color)
- func (c *Rect) SetContext(ctx ui.Context)
- func (b *Rect) SetHeight(v int)
- func (b *Rect) SetRadius(v int)
- func (b *Rect) SetWidth(v int)
- type Row
- func (c *Row) Add(d ui.Drawable)
- func (c *Row) Align() string
- func (c *Row) ChildContext(i int) ui.Context
- func (c *Row) Children() []ui.Drawable
- func (r Row) Draw(x, y int, im draw.Image)
- func (c *Row) SendEvent(ev ui.Event) bool
- func (c *Row) SetAlign(v string)
- func (c *Row) SetContext(ctx ui.Context)
- type Sizer
- func (s *Sizer) Add(d ui.Drawable)
- func (c *Sizer) ChildContext(i int) ui.Context
- func (r *Sizer) Children() []ui.Drawable
- func (s *Sizer) Draw(tx, ty int, im draw.Image)
- func (s *Sizer) HAlign() string
- func (s *Sizer) PaddingBottom() int
- func (s *Sizer) PaddingLeft() int
- func (s *Sizer) PaddingRight() int
- func (s *Sizer) PaddingTop() int
- func (s *Sizer) SendEvent(ev ui.Event) bool
- func (c *Sizer) SetContext(ctx ui.Context)
- func (s *Sizer) SetHAlign(v string)
- func (s *Sizer) SetHeight(v int)
- func (s *Sizer) SetPaddingBottom(v int)
- func (s *Sizer) SetPaddingLeft(v int)
- func (s *Sizer) SetPaddingRight(v int)
- func (s *Sizer) SetPaddingTop(v int)
- func (s *Sizer) SetVAlign(v string)
- func (s *Sizer) SetWidth(v int)
- func (s *Sizer) VAlign() string
- type Text
- func (t *Text) Color() color.Color
- func (t *Text) Draw(x, y int, im draw.Image)
- func (t *Text) Font() string
- func (t *Text) FontSize() float64
- func (t *Text) Init() error
- func (t *Text) MaxWidth() int
- func (t *Text) SetColor(c color.Color)
- func (t *Text) SetFont(f string)
- func (t *Text) SetFontSize(f float64)
- func (t *Text) SetMaxWidth(i int)
- func (t *Text) SetText(s string)
- func (t *Text) Text() string
- type WatchBool
- type WatchInt
Constants ¶
View Source
const ( BarDirectionBottomTop = "bottom-top" BarDirectionLeftRight = "left-right" )
View Source
const ( GraphDirUp = "up" GraphDirDown = "down" )
View Source
const ( HAlighCenter = "center" HAlignLeft = "left" HAlignRight = "right" )
View Source
const ( VAlighMiddle = "middle" VAlignTop = "top" VAlignBottom = "bottom" )
Variables ¶
Functions ¶
func RegisterMarkup ¶
Types ¶
type BGRA ¶
type BGRA struct { // Pix holds the image's pixels, in B, G, R, A order on small endian systems // and A, R, G, B on big endian systems. // See http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-format-t // The pixel at (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*4]. Pix []uint8 // Stride is the Pix stride (in bytes) between vertically adjacent pixels. Stride int // Rect is the image's bounds. Rect image.Rectangle }
BGRA is an in-memory image whose At method returns BGRAColor values.
func (*BGRA) ColorModel ¶
type BGRAColor ¶
type BGRAColor struct {
B, G, R, A uint8
}
BGRAColor represents a traditional 32-bit alpha-premultiplied color, having 8 bits for each of alpha, red, green and blue.
type Bar ¶
type Bar struct { Base // contains filtered or unexported fields }
func NewBar ¶
func NewBar(p ui.ParentDrawable) *Bar
func (*Bar) SetBgColor ¶
func (*Bar) SetDirection ¶
func (*Bar) SetFgColor ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
func NewBase ¶
func NewBase(p ui.ParentDrawable) Base
func (*Base) OnHeightChange ¶
func (*Base) OnVisibleChange ¶
func (*Base) OnWidthChange ¶
func (*Base) Parent ¶
func (b *Base) Parent() ui.ParentDrawable
func (*Base) SetContext ¶
func (*Base) SetOnPointerEnter ¶ added in v0.2.3
func (*Base) SetOnPointerLeave ¶ added in v0.2.3
func (*Base) SetOnPointerMove ¶ added in v0.2.3
func (*Base) SetVisible ¶
type Circle ¶ added in v0.3.0
type Circle struct { Base // contains filtered or unexported fields }
func NewCircle ¶ added in v0.3.0
func NewCircle(p ui.ParentDrawable) *Circle
func (*Circle) SetContext ¶ added in v0.3.0
type Col ¶
type Col struct { Base // contains filtered or unexported fields }
func NewCol ¶
func NewCol(p ui.ParentDrawable) *Col
func (*Col) SetContext ¶
type Graph ¶
type Graph struct { Base // contains filtered or unexported fields }
func NewGraph ¶
func NewGraph(p ui.ParentDrawable) *Graph
func (*Graph) SetDirection ¶
type Image ¶
type Image struct { Base // contains filtered or unexported fields }
func NewImage ¶
func NewImage(p ui.ParentDrawable) *Image
type Layers ¶
type Layers struct { Base // contains filtered or unexported fields }
func NewLayers ¶
func NewLayers(p ui.ParentDrawable) *Layers
func (*Layers) SetContext ¶
type Pattern ¶
type Pattern struct { Base // contains filtered or unexported fields }
func NewPattern ¶
func NewPattern(p ui.ParentDrawable) *Pattern
func (*Pattern) SetContext ¶
type Rect ¶
type Rect struct { Base // contains filtered or unexported fields }
func NewRect ¶
func NewRect(p ui.ParentDrawable) *Rect
func (*Rect) SetContext ¶
type Row ¶
type Row struct { Base // contains filtered or unexported fields }
func NewRow ¶
func NewRow(p ui.ParentDrawable) *Row
func (*Row) SetContext ¶
type Sizer ¶
type Sizer struct { Base // contains filtered or unexported fields }
func NewSizer ¶
func NewSizer(p ui.ParentDrawable) *Sizer
func (*Sizer) PaddingBottom ¶
func (*Sizer) PaddingLeft ¶
func (*Sizer) PaddingRight ¶
func (*Sizer) PaddingTop ¶
func (*Sizer) SetContext ¶
func (*Sizer) SetPaddingBottom ¶
func (*Sizer) SetPaddingLeft ¶
func (*Sizer) SetPaddingRight ¶
func (*Sizer) SetPaddingTop ¶
type Text ¶
type Text struct { Base // contains filtered or unexported fields }
func NewIcon ¶
func NewIcon(p ui.ParentDrawable) *Text
func NewText ¶
func NewText(p ui.ParentDrawable) *Text
func (*Text) SetFontSize ¶
func (*Text) SetMaxWidth ¶
Click to show internal directories.
Click to hide internal directories.