widgets

package
v0.0.0-...-1c0f6f5 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseWidget

type BaseWidget struct {
	X      int /* Widget position X */
	Y      int /* Widget position Y */
	Width  int
	Height int
}

func (*BaseWidget) Render

func (self *BaseWidget) Render()

func (*BaseWidget) SetRect

func (self *BaseWidget) SetRect(x int, y int, width int, height int)

type ButtonWidget

type ButtonWidget struct {
	IWidget
	// contains filtered or unexported fields
}

func NewButtonWidget

func NewButtonWidget() *ButtonWidget

func (*ButtonWidget) Render

func (self *ButtonWidget) Render()

func (*ButtonWidget) SetCallback

func (self *ButtonWidget) SetCallback(callback func())

type IWidget

type IWidget interface {
	Render()
	ProcessEvent(e *evt.Event)
	SetRect(x int, y int, width int, height int)
}

type ImageWidget

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

func NewImageWidget

func NewImageWidget(path string) *ImageWidget

func (*ImageWidget) Destroy

func (self *ImageWidget) Destroy()

func (*ImageWidget) ProcessEvent

func (self *ImageWidget) ProcessEvent(e *evt.Event)

func (*ImageWidget) Render

func (self *ImageWidget) Render()

func (*ImageWidget) SetRect

func (self *ImageWidget) SetRect(x int, y int, width int, height int)

type ProgressWidget

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

func NewProgressWidget

func NewProgressWidget() *ProgressWidget

func (*ProgressWidget) Render

func (self *ProgressWidget) Render()

type RectangleWidget

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

func NewRectangleWidget

func NewRectangleWidget() *RectangleWidget

func (*RectangleWidget) Render

func (self *RectangleWidget) Render()

func (*RectangleWidget) SetColor

func (self *RectangleWidget) SetColor(r, g, b, a uint8)

func (*RectangleWidget) SetRect

func (self *RectangleWidget) SetRect(x, y, width, height int)

type TextWidget

type TextWidget struct {
	IWidget /* Widget interface is implementing */
	// contains filtered or unexported fields
}

func NewTextWidget

func NewTextWidget(fontAlias string, fontSize int) *TextWidget

func (*TextWidget) Destroy

func (self *TextWidget) Destroy()

func (*TextWidget) Render

func (self *TextWidget) Render()

func (*TextWidget) SetColor

func (self *TextWidget) SetColor(r byte, g byte, b byte, a byte)

func (*TextWidget) SetRect

func (self *TextWidget) SetRect(x int, y int, width int, height int)

func (*TextWidget) SetText

func (self *TextWidget) SetText(body string)

type WidgetGroup

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

func NewWidgetGroup

func NewWidgetGroup() *WidgetGroup

func (*WidgetGroup) ProcessEvent

func (self *WidgetGroup) ProcessEvent(e *evt.Event)

func (*WidgetGroup) RegisterWidget

func (self *WidgetGroup) RegisterWidget(w IWidget)

func (*WidgetGroup) Render

func (self *WidgetGroup) Render()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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