Documentation ¶
Index ¶
- Constants
- func ParseColor(s string) (color.Color, error)
- func Print(d Drawable, prop string)
- func StartCommand(cmd string)
- type Context
- type Drawable
- type Event
- type EventType
- type ParentDrawable
- type Root
- func (r *Root) Add(Drawable)
- func (r *Root) ChildContext(int) Context
- func (r *Root) Children() []Drawable
- func (r *Root) Context() Context
- func (r *Root) Draw(x, y int, im draw.Image)
- func (r *Root) Height() int
- func (r *Root) Image() *image.RGBA
- func (r *Root) Init() error
- func (r *Root) Notify()
- func (r *Root) OnHeightChange(func(int))
- func (b *Root) OnLeftClick() func(Event) bool
- func (b *Root) OnPointerEnter() func(Event) bool
- func (b *Root) OnPointerLeave() func(Event) bool
- func (b *Root) OnPointerMove() func(Event) bool
- func (b *Root) OnRightClick() func(Event) bool
- func (r *Root) OnVisibleChange(func(bool))
- func (r *Root) OnWidthChange(func(int))
- func (r *Root) Paint()
- func (r *Root) SendEvent(ev Event) bool
- func (r *Root) SetContext(Context)
- func (b *Root) SetOnLeftClick(cb func(Event) bool)
- func (b *Root) SetOnPointerEnter(cb func(Event) bool)
- func (b *Root) SetOnPointerLeave(cb func(Event) bool)
- func (b *Root) SetOnPointerMove(cb func(Event) bool)
- func (b *Root) SetOnRightClick(cb func(Event) bool)
- func (r *Root) SetVisible(bool)
- func (r *Root) Visible() bool
- func (r *Root) Width() int
Constants ¶
View Source
const ( EventTypeLeftClick = iota EventTypeRightClick EventPointerMove EventPointerEnter EventPointerLeave )
Variables ¶
This section is empty.
Functions ¶
func StartCommand ¶
func StartCommand(cmd string)
Types ¶
type Drawable ¶
type Drawable interface { Init() error SetContext(ctx Context) Width() int OnWidthChange(func(int)) Height() int OnHeightChange(func(int)) Visible() bool SetVisible(v bool) OnVisibleChange(func(bool)) SendEvent(Event) bool OnLeftClick() func(Event) bool OnRightClick() func(Event) bool SetOnLeftClick(cb func(Event) bool) SetOnRightClick(cb func(Event) bool) OnPointerMove() func(Event) bool SetOnPointerMove(cb func(Event) bool) OnPointerEnter() func(Event) bool SetOnPointerEnter(cb func(Event) bool) OnPointerLeave() func(Event) bool SetOnPointerLeave(cb func(Event) bool) Draw(x, y int, im draw.Image) Notify() Context() Context Children() []Drawable }
type ParentDrawable ¶
type Root ¶
type Root struct { Inner Drawable // contains filtered or unexported fields }
func (*Root) ChildContext ¶
func (*Root) OnHeightChange ¶
func (*Root) OnLeftClick ¶ added in v0.2.3
func (*Root) OnPointerEnter ¶ added in v0.2.3
func (*Root) OnPointerLeave ¶ added in v0.2.3
func (*Root) OnPointerMove ¶ added in v0.2.3
func (*Root) OnRightClick ¶ added in v0.2.3
func (*Root) OnVisibleChange ¶
func (*Root) OnWidthChange ¶
func (*Root) SetContext ¶
func (*Root) SetOnLeftClick ¶ added in v0.2.3
func (*Root) SetOnPointerEnter ¶ added in v0.2.3
func (*Root) SetOnPointerLeave ¶ added in v0.2.3
func (*Root) SetOnPointerMove ¶ added in v0.2.3
func (*Root) SetOnRightClick ¶ added in v0.2.3
func (*Root) SetVisible ¶
Click to show internal directories.
Click to hide internal directories.