toolkit

package
v0.0.0-...-8e656ca Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2014 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BS_TEXT      = 1 << iota
	BS_ICON      = 1 << iota
	BS_ICON_TEXT = 1 << iota

	BS_TOGGLE = 1 << iota
)
View Source
const (
	CBS_LEFTTEXT = 1 << iota
)
View Source
const (
	CB_TEXT_SPACE = 5 // horizontal space in pixels between the checkbox and the text
)
View Source
const (
	ICON_TEXT_SPACE = 5 // horizontal space in pixels between icon and text for BS_ICON_TEXT buttons
)
View Source
const (
	THEME_PATH = "data/elements/"
)
View Source
const (
	WS_TITLEBAR_HIDDEN = 1 << iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	base.Element
	// contains filtered or unexported fields
}

func (*Button) Draw

func (but *Button) Draw()

func (*Button) Mouse

func (but *Button) Mouse(x int, y int, deltaX int, deltaY int, flags uint16)

mouse handler

type CheckBox

type CheckBox struct {
	base.Element
	// contains filtered or unexported fields
}

func (*CheckBox) Draw

func (cb *CheckBox) Draw()

func (*CheckBox) Mouse

func (cb *CheckBox) Mouse(x int, y int, deltaX int, deltaY int, flags uint16)

type Desktop

type Desktop struct {
	base.Element
	// contains filtered or unexported fields
}

func CreateDesktop

func CreateDesktop(fb *fbdev.Framebuffer, ms *mouse.Mouse, imp chan int64, red, green, blue, alpha byte) (*Desktop, error)

type Label

type Label struct {
	base.Element
	// contains filtered or unexported fields
}

func (*Label) Draw

func (lab *Label) Draw()

func (*Label) Mouse

func (lab *Label) Mouse(x int, y int, deltaX int, deltaY int, flags uint16)

mouse handler

type TitleBarButton

type TitleBarButton struct {
	base.Element
	// contains filtered or unexported fields
}

func (*TitleBarButton) Draw

func (but *TitleBarButton) Draw()

func (*TitleBarButton) Mouse

func (but *TitleBarButton) Mouse(x int, y int, deltaX int, deltaY int, flags uint16)

mouse handler

type Toolkit

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

type Window

type Window struct {
	base.Element
	// contains filtered or unexported fields
}

func CreateWindow

func CreateWindow(style byte, fnCmpWinActivate cmpWinActivateHandler, fb *fbdev.Framebuffer, ms *mouse.Mouse, imp chan int64,
	x, y, w, h int) (*Window, error)

func (*Window) Button

func (win *Window) Button(style byte, ms *mouse.Mouse, icon image.Image, txt string, fnClick clickHandler, x, y, w, h int) *Button

style should be one of BS_TEXT, BS_ICON_TEXT, BS_ICON icon should be nil for BS_TEXT txt should be empty string for BS_ICON

func (*Window) CheckBox

func (win *Window) CheckBox(style byte, ms *mouse.Mouse, txt string, fnClick clickHandler, x, y int) *CheckBox

func (*Window) Deactivate

func (win *Window) Deactivate()

func (*Window) Draw

func (win *Window) Draw()

func (*Window) GetBG

func (win *Window) GetBG() color.RGBA

func (*Window) Label

func (win *Window) Label(ms *mouse.Mouse, txt string, x, y, w, h int) *Label

func (*Window) Mouse

func (win *Window) Mouse(x int, y int, deltaX int, deltaY int, flags uint16)

mouse handler

func (*Window) TitleBarButton

func (win *Window) TitleBarButton(ms *mouse.Mouse, fnClick clickHandler, x, y, w, h int) *TitleBarButton

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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