fltk

package module
v0.0.0-...-f086de1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 4 Imported by: 0

README

go-fltk

A simple wrapper around FLTK 1.4 library, which is a lightweight GUI library which allows creating small, self-contained and fast gui applications.

Requirements

In addition to Go, you will also need a C++11 compiler. The FLTK libraries are bundled with the repo for x86_64 Linux, MacOS and Windows (mingw64). You also need some system libs which are normally available on operating systems with a graphical user interfaces:

  • Windows: No external dependencies (for mingw64)
  • MacOS: No external dependencies
  • Linux: You need:
    • x11
    • Xrender
    • Xcursor
    • Xfixes
    • Xext
    • Xft
    • Xinerama
    • OpenGL

Usage

package main

import "github.com/pwiecz/go-fltk"

func main() {
    win := fltk.NewWindow(100, 100, 400, 300, "Main Window")
    btn := fltk.NewButton(160, 200, 80, 30, "Click")
    btn.SetCallback(func() {
        btn.SetLabel("Clicked")
    })
    win.End()
    win.Show()
    fltk.Run()
}

Widgets are created using the fltk.New<WidgetType> functions, modified for whatever widget you're instantiating. Function and method names resemble the original C++ names, while however, following the Golang convention of PascalCase. Setter methods are also preceded by a Set prefix.

Styling

FLTk offers 4 builtin schemes:

  • base (default)
  • gtk+
  • gleam
  • plastic These can be set using fltk.SetScheme("gtk+") for example.

FLTK also allows custom styling of your widgets:

package main

import (
	"strconv"

	"github.com/pwiecz/go-fltk"
)

// FLTK uses an RGBI color representation, the I is an index into FLTK's color map
// Passing 00 as I will use the RGB part of the value
const GRAY = 0x75757500
const BLUE = 0x42A5F500
const SEL_BLUE = 0x2196F300
const WIDTH = 600
const HEIGHT = 400

func main() {
	curr := 0
	fltk.InitStyles()
	win := fltk.NewWindow(WIDTH, HEIGHT)
	win.SetLabel("Flutter-like")
	win.SetColor(fltk.WHITE)
	bar := fltk.NewBox(fltk.FLAT_BOX, 0, 0, WIDTH, 60, "    FLTK App!")
	bar.SetAlign(fltk.ALIGN_INSIDE | fltk.ALIGN_LEFT)
	bar.SetLabelColor(255) // this uses the index into the color map, here it's white
	bar.SetColor(BLUE)
	bar.SetLabelSize(22)
	text := fltk.NewBox(fltk.NO_BOX, 250, 180, 100, 40, "You have pushed the button this many times:")
	text.SetLabelSize(18)
	text.SetLabelFont(fltk.TIMES)
	count := fltk.NewBox(fltk.NO_BOX, 250, 180+40, 100, 40, "0")
	count.SetLabelSize(36)
	count.SetLabelColor(GRAY)
	btn := fltk.NewButton(WIDTH-100, HEIGHT-100, 60, 60, "@+6plus") // this translates into a plus sign
	btn.SetColor(BLUE)
	btn.SetSelectionColor(SEL_BLUE)
	btn.SetLabelColor(255)
	btn.SetBox(fltk.OFLAT_BOX)
	btn.ClearVisibleFocus()
	btn.SetCallback(func() {
		curr += 1
		count.SetLabel(strconv.Itoa(curr))
	})
	win.End()
	win.Show()
	fltk.Run()
}

image

Label attributes can be seen here

Image support

FLTK supports vector and raster graphics, via several image types:

  • SvgImage
  • RgbImage
  • JpegImage
  • PngImage
  • BmpImage
  • SharedImage

Some of these can be instantiated from an image file or from data:

package main

import (
	"fmt"

	"github.com/pwiecz/go-fltk"
)

func main() {
	win := fltk.NewWindow(400, 300)
	box := fltk.NewBox(fltk.FLAT_BOX, 0, 0, 400, 300, "")
	image, err := fltk.NewJpegImageLoad("image.jpg")
	if err != nil {
		fmt.Printf("An error occured: %s\n", err)
	} else {
		box.SetImage(image)
	}
	win.End()
	win.Show()
	fltk.Run()
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ALIGN_CENTER             = Align(C.go_FL_ALIGN_CENTER)
	ALIGN_TOP                = Align(C.go_FL_ALIGN_TOP)
	ALIGN_BOTTOM             = Align(C.go_FL_ALIGN_BOTTOM)
	ALIGN_LEFT               = Align(C.go_FL_ALIGN_LEFT)
	ALIGN_RIGHT              = Align(C.go_FL_ALIGN_RIGHT)
	ALIGN_INSIDE             = Align(C.go_FL_ALIGN_INSIDE)
	ALIGN_TEXT_OVER_IMAGE    = Align(C.go_FL_ALIGN_TEXT_OVER_IMAGE)
	ALIGN_IMAGE_OVER_TEXT    = Align(C.go_FL_ALIGN_IMAGE_OVER_TEXT)
	ALIGN_CLIP               = Align(C.go_FL_ALIGN_CLIP)
	ALIGN_WRAP               = Align(C.go_FL_ALIGN_WRAP)
	ALIGN_IMAGE_NEXT_TO_TEXT = Align(C.go_FL_ALIGN_IMAGE_NEXT_TO_TEXT)
	ALIGN_TEXT_NEXT_TO_IMAGE = Align(C.go_FL_ALIGN_TEXT_NEXT_TO_IMAGE)
	ALIGN_IMAGE_BACKDROP     = Align(C.go_FL_ALIGN_IMAGE_BACKDROP)
	ALIGN_TOP_LEFT           = Align(C.go_FL_ALIGN_TOP_LEFT)
	ALIGN_TOP_RIGHT          = Align(C.go_FL_ALIGN_TOP_RIGHT)
	ALIGN_BOTTOM_LEFT        = Align(C.go_FL_ALIGN_BOTTOM_LEFT)
	ALIGN_BOTTOM_RIGHT       = Align(C.go_FL_ALIGN_BOTTOM_RIGHT)
	ALIGN_LEFT_TOP           = Align(C.go_FL_ALIGN_LEFT_TOP)
	ALIGN_RIGHT_TOP          = Align(C.go_FL_ALIGN_RIGHT_TOP)
	ALIGN_LEFT_BOTTOM        = Align(C.go_FL_ALIGN_LEFT_BOTTOM)
	ALIGN_RIGHT_BOTTOM       = Align(C.go_FL_ALIGN_RIGHT_BOTTOM)
	ALIGN_NOWRAP             = Align(C.go_FL_ALIGN_NOWRAP)
	ALIGN_POSITION_MASK      = Align(C.go_FL_ALIGN_POSITION_MASK)
	ALIGN_IMAGE_MASK         = Align(C.go_FL_ALIGN_IMAGE_MASK)
)
View Source
var (
	NO_BOX                 = BoxType(C.go_FL_NO_BOX)
	FLAT_BOX               = BoxType(C.go_FL_FLAT_BOX)
	UP_BOX                 = BoxType(C.go_FL_UP_BOX)
	DOWN_BOX               = BoxType(C.go_FL_DOWN_BOX)
	UP_FRAME               = BoxType(C.go_FL_UP_FRAME)
	DOWN_FRAME             = BoxType(C.go_FL_DOWN_FRAME)
	THIN_UP_BOX            = BoxType(C.go_FL_THIN_UP_BOX)
	THIN_DOWN_BOX          = BoxType(C.go_FL_THIN_DOWN_BOX)
	ENGRAVED_BOX           = BoxType(C.go_FL_ENGRAVED_BOX)
	EMBOSSED_BOX           = BoxType(C.go_FL_EMBOSSED_BOX)
	ENGRAVED_FRAME         = BoxType(C.go_FL_ENGRAVED_FRAME)
	EMBOSSED_FRAME         = BoxType(C.go_FL_EMBOSSED_FRAME)
	BORDER_BOX             = BoxType(C.go_FL_BORDER_BOX)
	BORDER_FRAME           = BoxType(C.go_FL_BORDER_FRAME)
	SHADOW_FRAME           = BoxType(C.go_FL_SHADOW_FRAME)
	ROUNDED_BOX            = BoxType(C.go_FL_ROUNDED_BOX)
	RSHADOW_BOX            = BoxType(C.go_FL_RSHADOW_BOX)
	ROUNDED_FRAME          = BoxType(C.go_FL_ROUNDED_FRAME)
	RFLAT_BOX              = BoxType(C.go_FL_RFLAT_BOX)
	ROUND_UP_BOX           = BoxType(C.go_FL_ROUND_UP_BOX)
	ROUND_DOWN_BOX         = BoxType(C.go_FL_ROUND_DOWN_BOX)
	DIAMOND_UP_BOX         = BoxType(C.go_FL_DIAMOND_UP_BOX)
	DIAMOND_DOWN_BOX       = BoxType(C.go_FL_DIAMOND_DOWN_BOX)
	OVAL_BOX               = BoxType(C.go_FL_OVAL_BOX)
	OSHADOW_BOX            = BoxType(C.go_FL_OSHADOW_BOX)
	OVAL_FRAME             = BoxType(C.go_FL_OVAL_FRAME)
	OFLAT_BOX              = BoxType(C.go_FL_OFLAT_BOX)
	PLASTIC_UP_BOX         = BoxType(C.go_FL_PLASTIC_UP_BOX)
	PLASTIC_DOWN_BOX       = BoxType(C.go_FL_PLASTIC_DOWN_BOX)
	PLASTIC_UP_FRAME       = BoxType(C.go_FL_PLASTIC_UP_FRAME)
	PLASTIC_DOWN_FRAME     = BoxType(C.go_FL_PLASTIC_DOWN_FRAME)
	PLASTIC_THIN_UP_BOX    = BoxType(C.go_FL_PLASTIC_THIN_UP_BOX)
	PLASTIC_THIN_DOWN_BOX  = BoxType(C.go_FL_PLASTIC_THIN_DOWN_BOX)
	PLASTIC_ROUND_UP_BOX   = BoxType(C.go_FL_PLASTIC_ROUND_UP_BOX)
	PLASTIC_ROUND_DOWN_BOX = BoxType(C.go_FL_PLASTIC_ROUND_DOWN_BOX)
	GTK_UP_BOX             = BoxType(C.go_FL_GTK_UP_BOX)
	GTK_DOWN_BOX           = BoxType(C.go_FL_GTK_DOWN_BOX)
	GTK_UP_FRAME           = BoxType(C.go_FL_GTK_UP_FRAME)
	GTK_DOWN_FRAME         = BoxType(C.go_FL_GTK_DOWN_FRAME)
	GTK_THIN_UP_BOX        = BoxType(C.go_FL_GTK_THIN_UP_BOX)
	GTK_THIN_DOWN_BOX      = BoxType(C.go_FL_GTK_THIN_DOWN_BOX)
	GTK_THIN_UP_FRAME      = BoxType(C.go_FL_GTK_THIN_UP_FRAME)
	GTK_THIN_DOWN_FRAME    = BoxType(C.go_FL_GTK_THIN_DOWN_FRAME)
	GTK_ROUND_UP_BOX       = BoxType(C.go_FL_GTK_ROUND_UP_BOX)
	GTK_ROUND_DOWN_BOX     = BoxType(C.go_FL_GTK_ROUND_DOWN_BOX)
	GLEAM_UP_BOX           = BoxType(C.go_FL_GLEAM_UP_BOX)
	GLEAM_DOWN_BOX         = BoxType(C.go_FL_GLEAM_DOWN_BOX)
	GLEAM_UP_FRAME         = BoxType(C.go_FL_GLEAM_UP_FRAME)
	GLEAM_DOWN_FRAME       = BoxType(C.go_FL_GLEAM_DOWN_FRAME)
	GLEAM_THIN_UP_BOX      = BoxType(C.go_FL_GLEAM_THIN_UP_BOX)
	GLEAM_THIN_DOWN_BOX    = BoxType(C.go_FL_GLEAM_THIN_DOWN_BOX)
	GLEAM_ROUND_UP_BOX     = BoxType(C.go_FL_GLEAM_ROUND_UP_BOX)
	GLEAM_ROUND_DOWN_BOX   = BoxType(C.go_FL_GLEAM_ROUND_DOWN_BOX)
)
View Source
var (
	HELVETICA             = Font(C.go_FL_HELVETICA)
	HELVETICA_BOLD        = Font(C.go_FL_HELVETICA_BOLD)
	HELVETICA_ITALIC      = Font(C.go_FL_HELVETICA_ITALIC)
	HELVETICA_BOLD_ITALIC = Font(C.go_FL_HELVETICA_BOLD_ITALIC)
	COURIER               = Font(C.go_FL_COURIER)
	COURIER_BOLD          = Font(C.go_FL_COURIER_BOLD)
	COURIER_ITALIC        = Font(C.go_FL_COURIER_ITALIC)
	COURIER_BOLD_ITALIC   = Font(C.go_FL_COURIER_BOLD_ITALIC)
	TIMES                 = Font(C.go_FL_TIMES)
	TIMES_BOLD            = Font(C.go_FL_TIMES_BOLD)
	TIMES_ITALIC          = Font(C.go_FL_TIMES_ITALIC)
	TIMES_BOLD_ITALIC     = Font(C.go_FL_TIMES_BOLD_ITALIC)
	SYMBOL                = Font(C.go_FL_SYMBOL)
	SCREEN                = Font(C.go_FL_SCREEN)
	SCREEN_BOLD           = Font(C.go_FL_SCREEN_BOLD)
	ZAPF_DINGBATS         = Font(C.go_FL_ZAPF_DINGBATS)
	FREE_FONT             = Font(C.go_FL_FREE_FONT)
	BOLD                  = Font(C.go_FL_BOLD)
	ITALIC                = Font(C.go_FL_ITALIC)
	BOLD_ITALIC           = Font(C.go_FL_BOLD_ITALIC)
)
View Source
var (
	NORMAL_LABEL = LabelType(C.go_FL_NORMAL_LABEL)
	NO_LABEL     = LabelType(C.go_FL_NO_LABEL)
)
View Source
var (
	NO_EVENT       = Event(C.go_FL_NO_EVENT)
	PUSH           = Event(C.go_FL_PUSH)
	DRAG           = Event(C.go_FL_DRAG)
	RELEASE        = Event(C.go_FL_RELEASE)
	MOVE           = Event(C.go_FL_MOVE)
	MOUSEWHEEL     = Event(C.go_FL_MOUSEWHEEL)
	ENTER          = Event(C.go_FL_ENTER)
	LEAVE          = Event(C.go_FL_LEAVE)
	FOCUS          = Event(C.go_FL_FOCUS)
	UNFOCUS        = Event(C.go_FL_UNFOCUS)
	KEY            = Event(C.go_FL_KEYDOWN)
	KEYDOWN        = Event(C.go_FL_KEYDOWN)
	KEYUP          = Event(C.go_FL_KEYUP)
	SHORTCUT       = Event(C.go_FL_SHORTCUT)
	DEACTIVATE     = Event(C.go_FL_DEACTIVATE)
	ACTIVATE       = Event(C.go_FL_ACTIVATE)
	HIDE           = Event(C.go_FL_HIDE)
	SHOW           = Event(C.go_FL_SHOW)
	PASTE          = Event(C.go_FL_PASTE)
	SELECTIONCLEAR = Event(C.go_FL_SELECTIONCLEAR)
	DND_ENTER      = Event(C.go_FL_DND_ENTER)
	DND_DRAG       = Event(C.go_FL_DND_DRAG)
	DND_LEAVE      = Event(C.go_FL_DND_LEAVE)
	DND_RELEASE    = Event(C.go_FL_DND_RELEASE)
)
View Source
var (
	RGB         = int(C.go_FL_RGB)
	INDEX       = int(C.go_FL_INDEX)
	SINGLE      = int(C.go_FL_SINGLE)
	DOUBLE      = int(C.go_FL_DOUBLE)
	ACCUM       = int(C.go_FL_ACCUM)
	ALPHA       = int(C.go_FL_ALPHA)
	DEPTH       = int(C.go_FL_DEPTH)
	STENCIL     = int(C.go_FL_STENCIL)
	RGB8        = int(C.go_FL_RGB8)
	MULTISAMPLE = int(C.go_FL_MULTISAMPLE)
	STEREO      = int(C.go_FL_STEREO)
	FAKE_SINGLE = int(C.go_FL_FAKE_SINGLE)
	OPENGL3     = int(C.go_FL_OPENGL3)
)
View Source
var (
	FOREGROUND_COLOR  = Color(C.go_FL_FOREGROUND_COLOR)
	BACKGROUND2_COLOR = Color(C.go_FL_BACKGROUND2_COLOR)
	INACTIVE_COLOR    = Color(C.go_FL_INACTIVE_COLOR)
	SELECTION_COLOR   = Color(C.go_FL_SELECTION_COLOR)
	GRAY0             = Color(C.go_FL_GRAY0)
	DARK3             = Color(C.go_FL_DARK3)
	DARK2             = Color(C.go_FL_DARK2)
	DARK1             = Color(C.go_FL_DARK1)
	BACKGROUND_COLOR  = Color(C.go_FL_BACKGROUND_COLOR)
	LIGHT1            = Color(C.go_FL_LIGHT1)
	LIGHT2            = Color(C.go_FL_LIGHT2)
	LIGHT3            = Color(C.go_FL_LIGHT3)
	BLACK             = Color(C.go_FL_BLACK)
	RED               = Color(C.go_FL_RED)
	GREEN             = Color(C.go_FL_GREEN)
	YELLOW            = Color(C.go_FL_YELLOW)
	BLUE              = Color(C.go_FL_BLUE)
	MAGENTA           = Color(C.go_FL_MAGENTA)
	CYAN              = Color(C.go_FL_CYAN)
	DARK_RED          = Color(C.go_FL_DARK_RED)
	DARK_GREEN        = Color(C.go_FL_DARK_GREEN)
	DARK_YELLOW       = Color(C.go_FL_DARK_YELLOW)
	DARK_BLUE         = Color(C.go_FL_DARK_BLUE)
	DARK_MAGENTA      = Color(C.go_FL_DARK_MAGENTA)
	DARK_CYAN         = Color(C.go_FL_DARK_CYAN)
	WHITE             = Color(C.go_FL_WHITE)
)
View Source
var (
	SHIFT       = int(C.go_FL_SHIFT)
	CAPS_LOCK   = int(C.go_FL_CAPS_LOCK)
	CTRL        = int(C.go_FL_CTRL)
	ALT         = int(C.go_FL_ALT)
	NUM_LOCK    = int(C.go_FL_NUM_LOCK)
	META        = int(C.go_FL_META)
	SCROLL_LOCK = int(C.go_FL_SCROLL_LOCK)
	BUTTON1     = int(C.go_FL_BUTTON1)
	BUTTON2     = int(C.go_FL_BUTTON2)
	BUTTON3     = int(C.go_FL_BUTTON3)
)
View Source
var (
	MENU_INACTIVE  = int(C.go_FL_MENU_INACTIVE)
	MENU_TOGGLE    = int(C.go_FL_MENU_TOGGLE)
	MENU_VALUE     = int(C.go_FL_MENU_VALUE)
	MENU_RADIO     = int(C.go_FL_MENU_RADIO)
	MENU_INVISIBLE = int(C.go_FL_MENU_INVISIBLE)
	SUBMENU        = int(C.go_FL_SUBMENU)
	MENU_DIVIDER   = int(C.go_FL_MENU_DIVIDER)
)
View Source
var (
	CURSOR_DEFAULT = Cursor(C.go_FL_CURSOR_DEFAULT)
	CURSOR_ARROW   = Cursor(C.go_FL_CURSOR_ARROW)
	CURSOR_CROSS   = Cursor(C.go_FL_CURSOR_CROSS)
	CURSOR_WAIT    = Cursor(C.go_FL_CURSOR_WAIT)
	CURSOR_INSERT  = Cursor(C.go_FL_CURSOR_INSERT)
	CURSOR_HAND    = Cursor(C.go_FL_CURSOR_HAND)
	CURSOR_HELP    = Cursor(C.go_FL_CURSOR_HELP)
	CURSOR_MOVE    = Cursor(C.go_FL_CURSOR_MOVE)
	CURSOR_NS      = Cursor(C.go_FL_CURSOR_NS)
	CURSOR_WE      = Cursor(C.go_FL_CURSOR_WE)
	CURSOR_NWSE    = Cursor(C.go_FL_CURSOR_NWSE)
	CURSOR_NESW    = Cursor(C.go_FL_CURSOR_NESW)
	CURSOR_N       = Cursor(C.go_FL_CURSOR_N)
	CURSOR_NE      = Cursor(C.go_FL_CURSOR_NE)
	CURSOR_E       = Cursor(C.go_FL_CURSOR_E)
	CURSOR_SE      = Cursor(C.go_FL_CURSOR_SE)
	CURSOR_S       = Cursor(C.go_FL_CURSOR_S)
	CURSOR_SW      = Cursor(C.go_FL_CURSOR_SW)
	CURSOR_W       = Cursor(C.go_FL_CURSOR_W)
	CURSOR_NW      = Cursor(C.go_FL_CURSOR_NW)
)
View Source
var (
	ESCAPE = int(C.go_FL_ESCAPE)
)
View Source
var SPINNER_FLOAT_INPUT = SpinnerInputType(C.go_FL_FLOAT_INPUT)
View Source
var SPINNER_INT_INPUT = SpinnerInputType(C.go_FL_INT_INPUT)

Functions

func Awake

func Awake(fn func()) bool

func AwakeNullMessage

func AwakeNullMessage()

func ChoiceDialog

func ChoiceDialog(message string, options ...string) int

func ChooseFile

func ChooseFile(message, pattern, initialFilename string, relative bool) (string, bool)

func CopyToClipboard

func CopyToClipboard(text string)

func Draw

func Draw(text string, x, y, w, h int, align Align)

func DrawBox

func DrawBox(boxType BoxType, x, y, w, h int, color Color)

func EventButton1

func EventButton1() bool

func EventDX

func EventDX() int

func EventDY

func EventDY() int

func EventIsClick

func EventIsClick() bool

func EventKey

func EventKey() int

func EventState

func EventState() int

func EventX

func EventX() int

func EventXRoot

func EventXRoot() int

func EventY

func EventY() int

func EventYRoot

func EventYRoot() int

func InitStyles

func InitStyles()

func Lock

func Lock() bool

func MessageBox

func MessageBox(title, message string)

func Run

func Run() int

func ScreenCount

func ScreenCount() int

func ScreenDPI

func ScreenDPI(screenNum int) (float32, float32)

func ScreenScale

func ScreenScale(screenNum int) float32

func ScreenWorkArea

func ScreenWorkArea(screenNum int) (int, int, int, int)

func SetBackground2Color

func SetBackground2Color(r, g, b uint8)

func SetBackgroundColor

func SetBackgroundColor(r, g, b uint8)

func SetColor

func SetColor(col Color, r, g, b uint8)

func SetDrawColor

func SetDrawColor(color Color)

func SetDrawFont

func SetDrawFont(font Font, size int)

func SetForegroundColor

func SetForegroundColor(r, g, b uint8)

func SetKeyboardScreenScaling

func SetKeyboardScreenScaling(value bool)

func SetScheme

func SetScheme(scheme string) int

func SetScreenScale

func SetScreenScale(screenNum int, scale float32)

func Unlock

func Unlock()

Types

type Align

type Align uint

type BmpImage

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

func NewBmpImageFromData

func NewBmpImageFromData(data []uint8) (*BmpImage, error)

func NewBmpImageLoad

func NewBmpImageLoad(path string) (*BmpImage, error)

func (*BmpImage) Count

func (i *BmpImage) Count() int

func (*BmpImage) D

func (i *BmpImage) D() int

func (*BmpImage) DataH

func (i *BmpImage) DataH() int

func (*BmpImage) DataW

func (i *BmpImage) DataW() int

func (*BmpImage) Destroy

func (i *BmpImage) Destroy()

func (*BmpImage) H

func (i *BmpImage) H() int

func (*BmpImage) Inactive

func (i *BmpImage) Inactive()

func (*BmpImage) Ld

func (i *BmpImage) Ld() int

func (*BmpImage) Scale

func (i *BmpImage) Scale(width int, height int, proportional bool, can_expand bool)

func (*BmpImage) W

func (i *BmpImage) W() int

type Box

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

func NewBox

func NewBox(boxType BoxType, x, y, w, h int, text ...string) *Box

func (*Box) Activate

func (w *Box) Activate()

func (*Box) Align

func (w *Box) Align() Align

func (*Box) Box

func (w *Box) Box() BoxType

func (*Box) ClearVisibleFocus

func (w *Box) ClearVisibleFocus()

func (*Box) Color

func (w *Box) Color() Color

func (*Box) Deactivate

func (w *Box) Deactivate()

func (*Box) Destroy

func (w *Box) Destroy()

func (*Box) H

func (w *Box) H() int

func (*Box) Hide

func (w *Box) Hide()

func (*Box) Label

func (w *Box) Label() string

func (*Box) LabelColor

func (w *Box) LabelColor() Color

func (*Box) LabelFont

func (w *Box) LabelFont() Font

func (*Box) LabelSize

func (w *Box) LabelSize() int

func (*Box) LabelType

func (w *Box) LabelType() LabelType

func (*Box) MeasureLabel

func (w *Box) MeasureLabel() (int, int)

func (*Box) Parent

func (w *Box) Parent() *Group

func (*Box) Redraw

func (w *Box) Redraw()

func (*Box) Resize

func (w *Box) Resize(x, y, width, height int)

func (*Box) SelectionColor

func (w *Box) SelectionColor() Color

func (*Box) SetAlign

func (w *Box) SetAlign(align Align)

func (*Box) SetBox

func (w *Box) SetBox(box BoxType)

func (*Box) SetCallback

func (w *Box) SetCallback(f func())

func (*Box) SetCallbackCondition

func (w *Box) SetCallbackCondition(when CallbackCondition)

func (*Box) SetColor

func (w *Box) SetColor(color Color)

func (*Box) SetDeimage

func (w *Box) SetDeimage(i Image)

func (*Box) SetImage

func (w *Box) SetImage(i Image)

func (*Box) SetLabel

func (w *Box) SetLabel(label string)

func (*Box) SetLabelColor

func (w *Box) SetLabelColor(col Color)

func (*Box) SetLabelFont

func (w *Box) SetLabelFont(font Font)

func (*Box) SetLabelSize

func (w *Box) SetLabelSize(size int)

func (*Box) SetLabelType

func (w *Box) SetLabelType(ltype LabelType)

func (*Box) SetPosition

func (w *Box) SetPosition(x, y int)

func (*Box) SetSelectionColor

func (w *Box) SetSelectionColor(color Color)

func (*Box) SetType

func (w *Box) SetType(widgetType uint8)

func (*Box) Show

func (w *Box) Show()

func (*Box) Type

func (w *Box) Type() uint8

func (*Box) W

func (w *Box) W() int

func (*Box) X

func (w *Box) X() int

func (*Box) Y

func (w *Box) Y() int

type BoxType

type BoxType int

type Button

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

func NewButton

func NewButton(x, y, w, h int, text ...string) *Button

func (*Button) Activate

func (w *Button) Activate()

func (*Button) Align

func (w *Button) Align() Align

func (*Button) Box

func (w *Button) Box() BoxType

func (*Button) ClearVisibleFocus

func (w *Button) ClearVisibleFocus()

func (*Button) Color

func (w *Button) Color() Color

func (*Button) Deactivate

func (w *Button) Deactivate()

func (*Button) Destroy

func (w *Button) Destroy()

func (*Button) H

func (w *Button) H() int

func (*Button) Hide

func (w *Button) Hide()

func (*Button) Label

func (w *Button) Label() string

func (*Button) LabelColor

func (w *Button) LabelColor() Color

func (*Button) LabelFont

func (w *Button) LabelFont() Font

func (*Button) LabelSize

func (w *Button) LabelSize() int

func (*Button) LabelType

func (w *Button) LabelType() LabelType

func (*Button) MeasureLabel

func (w *Button) MeasureLabel() (int, int)

func (*Button) Parent

func (w *Button) Parent() *Group

func (*Button) Redraw

func (w *Button) Redraw()

func (*Button) Resize

func (w *Button) Resize(x, y, width, height int)

func (*Button) SelectionColor

func (w *Button) SelectionColor() Color

func (*Button) SetAlign

func (w *Button) SetAlign(align Align)

func (*Button) SetBox

func (w *Button) SetBox(box BoxType)

func (*Button) SetCallback

func (w *Button) SetCallback(f func())

func (*Button) SetCallbackCondition

func (w *Button) SetCallbackCondition(when CallbackCondition)

func (*Button) SetColor

func (w *Button) SetColor(color Color)

func (*Button) SetDeimage

func (w *Button) SetDeimage(i Image)

func (*Button) SetDownBox

func (b *Button) SetDownBox(box BoxType)

func (*Button) SetImage

func (w *Button) SetImage(i Image)

func (*Button) SetLabel

func (w *Button) SetLabel(label string)

func (*Button) SetLabelColor

func (w *Button) SetLabelColor(col Color)

func (*Button) SetLabelFont

func (w *Button) SetLabelFont(font Font)

func (*Button) SetLabelSize

func (w *Button) SetLabelSize(size int)

func (*Button) SetLabelType

func (w *Button) SetLabelType(ltype LabelType)

func (*Button) SetPosition

func (w *Button) SetPosition(x, y int)

func (*Button) SetSelectionColor

func (w *Button) SetSelectionColor(color Color)

func (*Button) SetType

func (w *Button) SetType(widgetType uint8)

func (*Button) SetValue

func (b *Button) SetValue(val bool)

func (*Button) Show

func (w *Button) Show()

func (*Button) Type

func (w *Button) Type() uint8

func (*Button) Value

func (b *Button) Value() bool

func (*Button) W

func (w *Button) W() int

func (*Button) X

func (w *Button) X() int

func (*Button) Y

func (w *Button) Y() int

type CallbackCondition

type CallbackCondition int

type CheckButton

type CheckButton struct {
	Button
}

func NewCheckButton

func NewCheckButton(x, y, w, h int, text ...string) *CheckButton

func (*CheckButton) Activate

func (w *CheckButton) Activate()

func (*CheckButton) Align

func (w *CheckButton) Align() Align

func (*CheckButton) Box

func (w *CheckButton) Box() BoxType

func (*CheckButton) ClearVisibleFocus

func (w *CheckButton) ClearVisibleFocus()

func (*CheckButton) Color

func (w *CheckButton) Color() Color

func (*CheckButton) Deactivate

func (w *CheckButton) Deactivate()

func (*CheckButton) Destroy

func (w *CheckButton) Destroy()

func (*CheckButton) H

func (w *CheckButton) H() int

func (*CheckButton) Hide

func (w *CheckButton) Hide()

func (*CheckButton) Label

func (w *CheckButton) Label() string

func (*CheckButton) LabelColor

func (w *CheckButton) LabelColor() Color

func (*CheckButton) LabelFont

func (w *CheckButton) LabelFont() Font

func (*CheckButton) LabelSize

func (w *CheckButton) LabelSize() int

func (*CheckButton) LabelType

func (w *CheckButton) LabelType() LabelType

func (*CheckButton) MeasureLabel

func (w *CheckButton) MeasureLabel() (int, int)

func (*CheckButton) Parent

func (w *CheckButton) Parent() *Group

func (*CheckButton) Redraw

func (w *CheckButton) Redraw()

func (*CheckButton) Resize

func (w *CheckButton) Resize(x, y, width, height int)

func (*CheckButton) SelectionColor

func (w *CheckButton) SelectionColor() Color

func (*CheckButton) SetAlign

func (w *CheckButton) SetAlign(align Align)

func (*CheckButton) SetBox

func (w *CheckButton) SetBox(box BoxType)

func (*CheckButton) SetCallback

func (w *CheckButton) SetCallback(f func())

func (*CheckButton) SetCallbackCondition

func (w *CheckButton) SetCallbackCondition(when CallbackCondition)

func (*CheckButton) SetColor

func (w *CheckButton) SetColor(color Color)

func (*CheckButton) SetDeimage

func (w *CheckButton) SetDeimage(i Image)

func (*CheckButton) SetImage

func (w *CheckButton) SetImage(i Image)

func (*CheckButton) SetLabel

func (w *CheckButton) SetLabel(label string)

func (*CheckButton) SetLabelColor

func (w *CheckButton) SetLabelColor(col Color)

func (*CheckButton) SetLabelFont

func (w *CheckButton) SetLabelFont(font Font)

func (*CheckButton) SetLabelSize

func (w *CheckButton) SetLabelSize(size int)

func (*CheckButton) SetLabelType

func (w *CheckButton) SetLabelType(ltype LabelType)

func (*CheckButton) SetPosition

func (w *CheckButton) SetPosition(x, y int)

func (*CheckButton) SetSelectionColor

func (w *CheckButton) SetSelectionColor(color Color)

func (*CheckButton) SetType

func (w *CheckButton) SetType(widgetType uint8)

func (*CheckButton) Show

func (w *CheckButton) Show()

func (*CheckButton) Type

func (w *CheckButton) Type() uint8

func (*CheckButton) W

func (w *CheckButton) W() int

func (*CheckButton) X

func (w *CheckButton) X() int

func (*CheckButton) Y

func (w *CheckButton) Y() int

type Choice

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

func NewChoice

func NewChoice(x, y, w, h int, text ...string) *Choice

func (*Choice) Add

func (m *Choice) Add(label string, callback func()) int

func (*Choice) AddEx

func (m *Choice) AddEx(label string, shortcut int, callback func(), flags int) int

func (*Choice) SetValue

func (m *Choice) SetValue(value int)

func (*Choice) Size

func (m *Choice) Size() int

func (*Choice) Value

func (m *Choice) Value() int

type Color

type Color uint

type Cursor

type Cursor int

type Event

type Event int

func EventType

func EventType() Event

type FileChooser

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

func NewFileChooser

func NewFileChooser(pathname, pattern string, fctype FileChooserType, title string) *FileChooser

func (*FileChooser) Destroy

func (c *FileChooser) Destroy()

func (*FileChooser) Popup

func (c *FileChooser) Popup()

func (*FileChooser) Selection

func (c *FileChooser) Selection() []string

func (*FileChooser) SetCallback

func (c *FileChooser) SetCallback(callback func())

func (*FileChooser) SetPreview

func (c *FileChooser) SetPreview(enable bool)

func (*FileChooser) Show

func (c *FileChooser) Show()

func (*FileChooser) Shown

func (c *FileChooser) Shown() bool

type FileChooserType

type FileChooserType int

type Font

type Font int

type GlWindow

type GlWindow struct {
	Window
	// contains filtered or unexported fields
}

func NewGlWindow

func NewGlWindow(x, y, w, h int, drawFun func()) *GlWindow

func (*GlWindow) Activate

func (w *GlWindow) Activate()

func (*GlWindow) Align

func (w *GlWindow) Align() Align

func (*GlWindow) Box

func (w *GlWindow) Box() BoxType

func (*GlWindow) CanDo

func (w *GlWindow) CanDo() bool

func (*GlWindow) ClearVisibleFocus

func (w *GlWindow) ClearVisibleFocus()

func (*GlWindow) Color

func (w *GlWindow) Color() Color

func (*GlWindow) ContextValid

func (w *GlWindow) ContextValid() bool

func (*GlWindow) Deactivate

func (w *GlWindow) Deactivate()

func (*GlWindow) Destroy

func (w *GlWindow) Destroy()

func (*GlWindow) H

func (w *GlWindow) H() int

func (*GlWindow) Hide

func (w *GlWindow) Hide()

func (*GlWindow) Label

func (w *GlWindow) Label() string

func (*GlWindow) LabelColor

func (w *GlWindow) LabelColor() Color

func (*GlWindow) LabelFont

func (w *GlWindow) LabelFont() Font

func (*GlWindow) LabelSize

func (w *GlWindow) LabelSize() int

func (*GlWindow) LabelType

func (w *GlWindow) LabelType() LabelType

func (*GlWindow) MakeCurrent

func (w *GlWindow) MakeCurrent()

func (*GlWindow) MeasureLabel

func (w *GlWindow) MeasureLabel() (int, int)

func (*GlWindow) Parent

func (w *GlWindow) Parent() *Group

func (*GlWindow) Redraw

func (w *GlWindow) Redraw()

func (*GlWindow) Resize

func (w *GlWindow) Resize(x, y, width, height int)

func (*GlWindow) SelectionColor

func (w *GlWindow) SelectionColor() Color

func (*GlWindow) SetAlign

func (w *GlWindow) SetAlign(align Align)

func (*GlWindow) SetBox

func (w *GlWindow) SetBox(box BoxType)

func (*GlWindow) SetCallback

func (w *GlWindow) SetCallback(f func())

func (*GlWindow) SetCallbackCondition

func (w *GlWindow) SetCallbackCondition(when CallbackCondition)

func (*GlWindow) SetColor

func (w *GlWindow) SetColor(color Color)

func (*GlWindow) SetDeimage

func (w *GlWindow) SetDeimage(i Image)

func (*GlWindow) SetEventHandler

func (w *GlWindow) SetEventHandler(handler func(Event) bool)

func (*GlWindow) SetImage

func (w *GlWindow) SetImage(i Image)

func (*GlWindow) SetLabelColor

func (w *GlWindow) SetLabelColor(col Color)

func (*GlWindow) SetLabelFont

func (w *GlWindow) SetLabelFont(font Font)

func (*GlWindow) SetLabelSize

func (w *GlWindow) SetLabelSize(size int)

func (*GlWindow) SetLabelType

func (w *GlWindow) SetLabelType(ltype LabelType)

func (*GlWindow) SetMode

func (w *GlWindow) SetMode(mode int)

func (*GlWindow) SetPosition

func (w *GlWindow) SetPosition(x, y int)

func (*GlWindow) SetResizeHandler

func (w *GlWindow) SetResizeHandler(handler func())

func (*GlWindow) SetSelectionColor

func (w *GlWindow) SetSelectionColor(color Color)

func (*GlWindow) SetType

func (w *GlWindow) SetType(widgetType uint8)

func (*GlWindow) Type

func (w *GlWindow) Type() uint8

func (*GlWindow) Valid

func (w *GlWindow) Valid() bool

func (*GlWindow) W

func (w *GlWindow) W() int

func (*GlWindow) X

func (w *GlWindow) X() int

func (*GlWindow) Y

func (w *GlWindow) Y() int

type Group

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

func NewGroup

func NewGroup(x, y, w, h int, text ...string) *Group

func (*Group) Activate

func (w *Group) Activate()

func (*Group) Add

func (g *Group) Add(w Widget)

func (*Group) Align

func (w *Group) Align() Align

func (*Group) Begin

func (g *Group) Begin()

func (*Group) Box

func (w *Group) Box() BoxType

func (*Group) ClearVisibleFocus

func (w *Group) ClearVisibleFocus()

func (*Group) Color

func (w *Group) Color() Color

func (*Group) Deactivate

func (w *Group) Deactivate()

func (*Group) Destroy

func (w *Group) Destroy()

func (*Group) End

func (g *Group) End()

func (*Group) H

func (w *Group) H() int

func (*Group) Hide

func (w *Group) Hide()

func (*Group) Label

func (w *Group) Label() string

func (*Group) LabelColor

func (w *Group) LabelColor() Color

func (*Group) LabelFont

func (w *Group) LabelFont() Font

func (*Group) LabelSize

func (w *Group) LabelSize() int

func (*Group) LabelType

func (w *Group) LabelType() LabelType

func (*Group) MeasureLabel

func (w *Group) MeasureLabel() (int, int)

func (*Group) Parent

func (w *Group) Parent() *Group

func (*Group) Redraw

func (w *Group) Redraw()

func (*Group) Resizable

func (g *Group) Resizable(w Widget)

func (*Group) Resize

func (w *Group) Resize(x, y, width, height int)

func (*Group) SelectionColor

func (w *Group) SelectionColor() Color

func (*Group) SetAlign

func (w *Group) SetAlign(align Align)

func (*Group) SetBox

func (w *Group) SetBox(box BoxType)

func (*Group) SetCallback

func (w *Group) SetCallback(f func())

func (*Group) SetCallbackCondition

func (w *Group) SetCallbackCondition(when CallbackCondition)

func (*Group) SetColor

func (w *Group) SetColor(color Color)

func (*Group) SetDeimage

func (w *Group) SetDeimage(i Image)

func (*Group) SetImage

func (w *Group) SetImage(i Image)

func (*Group) SetLabel

func (w *Group) SetLabel(label string)

func (*Group) SetLabelColor

func (w *Group) SetLabelColor(col Color)

func (*Group) SetLabelFont

func (w *Group) SetLabelFont(font Font)

func (*Group) SetLabelSize

func (w *Group) SetLabelSize(size int)

func (*Group) SetLabelType

func (w *Group) SetLabelType(ltype LabelType)

func (*Group) SetPosition

func (w *Group) SetPosition(x, y int)

func (*Group) SetSelectionColor

func (w *Group) SetSelectionColor(color Color)

func (*Group) SetType

func (w *Group) SetType(widgetType uint8)

func (*Group) Show

func (w *Group) Show()

func (*Group) Type

func (w *Group) Type() uint8

func (*Group) W

func (w *Group) W() int

func (*Group) X

func (w *Group) X() int

func (*Group) Y

func (w *Group) Y() int

type Image

type Image interface {
	// contains filtered or unexported methods
}

type Input

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

func NewInput

func NewInput(x, y, w, h int, text ...string) *Input

func (*Input) Activate

func (w *Input) Activate()

func (*Input) Align

func (w *Input) Align() Align

func (*Input) Box

func (w *Input) Box() BoxType

func (*Input) ClearVisibleFocus

func (w *Input) ClearVisibleFocus()

func (*Input) Color

func (w *Input) Color() Color

func (*Input) Deactivate

func (w *Input) Deactivate()

func (*Input) Destroy

func (w *Input) Destroy()

func (*Input) H

func (w *Input) H() int

func (*Input) Hide

func (w *Input) Hide()

func (*Input) Label

func (w *Input) Label() string

func (*Input) LabelColor

func (w *Input) LabelColor() Color

func (*Input) LabelFont

func (w *Input) LabelFont() Font

func (*Input) LabelSize

func (w *Input) LabelSize() int

func (*Input) LabelType

func (w *Input) LabelType() LabelType

func (*Input) MeasureLabel

func (w *Input) MeasureLabel() (int, int)

func (*Input) Parent

func (w *Input) Parent() *Group

func (*Input) Redraw

func (w *Input) Redraw()

func (*Input) Resize

func (i *Input) Resize(x int, y int, w int, h int)

func (*Input) SelectionColor

func (w *Input) SelectionColor() Color

func (*Input) SetAlign

func (w *Input) SetAlign(align Align)

func (*Input) SetBox

func (w *Input) SetBox(box BoxType)

func (*Input) SetCallback

func (w *Input) SetCallback(f func())

func (*Input) SetCallbackCondition

func (w *Input) SetCallbackCondition(when CallbackCondition)

func (*Input) SetColor

func (w *Input) SetColor(color Color)

func (*Input) SetDeimage

func (w *Input) SetDeimage(i Image)

func (*Input) SetImage

func (w *Input) SetImage(i Image)

func (*Input) SetLabel

func (w *Input) SetLabel(label string)

func (*Input) SetLabelColor

func (w *Input) SetLabelColor(col Color)

func (*Input) SetLabelFont

func (w *Input) SetLabelFont(font Font)

func (*Input) SetLabelSize

func (w *Input) SetLabelSize(size int)

func (*Input) SetLabelType

func (w *Input) SetLabelType(ltype LabelType)

func (*Input) SetPosition

func (w *Input) SetPosition(x, y int)

func (*Input) SetSelectionColor

func (w *Input) SetSelectionColor(color Color)

func (*Input) SetType

func (w *Input) SetType(widgetType uint8)

func (*Input) SetValue

func (i *Input) SetValue(value string) bool

func (*Input) Show

func (w *Input) Show()

func (*Input) Type

func (w *Input) Type() uint8

func (*Input) Value

func (i *Input) Value() string

func (*Input) W

func (w *Input) W() int

func (*Input) X

func (w *Input) X() int

func (*Input) Y

func (w *Input) Y() int

type JpegImage

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

func NewJpegImageFromData

func NewJpegImageFromData(data []uint8) (*JpegImage, error)

func NewJpegImageLoad

func NewJpegImageLoad(path string) (*JpegImage, error)

func (*JpegImage) Count

func (i *JpegImage) Count() int

func (*JpegImage) D

func (i *JpegImage) D() int

func (*JpegImage) DataH

func (i *JpegImage) DataH() int

func (*JpegImage) DataW

func (i *JpegImage) DataW() int

func (*JpegImage) Destroy

func (i *JpegImage) Destroy()

func (*JpegImage) H

func (i *JpegImage) H() int

func (*JpegImage) Inactive

func (i *JpegImage) Inactive()

func (*JpegImage) Ld

func (i *JpegImage) Ld() int

func (*JpegImage) Scale

func (i *JpegImage) Scale(width int, height int, proportional bool, can_expand bool)

func (*JpegImage) W

func (i *JpegImage) W() int

type LabelType

type LabelType int
type MenuBar struct {
	// contains filtered or unexported fields
}

func NewMenuBar

func NewMenuBar(x, y, w, h int, text ...string) *MenuBar
func (m *MenuBar) Add(label string, callback func()) int
func (m *MenuBar) AddEx(label string, shortcut int, callback func(), flags int) int
func (m *MenuBar) SetValue(value int)
func (m *MenuBar) Size() int
func (m *MenuBar) Value() int
type MenuButton struct {
	// contains filtered or unexported fields
}

func NewMenuButton

func NewMenuButton(x, y, w, h int, text ...string) *MenuButton
func (m *MenuButton) Add(label string, callback func()) int
func (m *MenuButton) AddEx(label string, shortcut int, callback func(), flags int) int
func (m *MenuButton) Destroy()
func (m *MenuButton) Popup()
func (m *MenuButton) SetType(menuType MenuType)
func (m *MenuButton) SetValue(value int)
func (m *MenuButton) Size() int
func (m *MenuButton) Value() int
type MenuType int

type MouseButton

type MouseButton int

func EventButton

func EventButton() MouseButton

type Pack

type Pack struct {
	Group
}

func NewPack

func NewPack(x, y, w, h int, text ...string) *Pack

func (*Pack) Activate

func (w *Pack) Activate()

func (*Pack) Align

func (w *Pack) Align() Align

func (*Pack) Box

func (w *Pack) Box() BoxType

func (*Pack) ClearVisibleFocus

func (w *Pack) ClearVisibleFocus()

func (*Pack) Color

func (w *Pack) Color() Color

func (*Pack) Deactivate

func (w *Pack) Deactivate()

func (*Pack) Destroy

func (w *Pack) Destroy()

func (*Pack) H

func (w *Pack) H() int

func (*Pack) Hide

func (w *Pack) Hide()

func (*Pack) Label

func (w *Pack) Label() string

func (*Pack) LabelColor

func (w *Pack) LabelColor() Color

func (*Pack) LabelFont

func (w *Pack) LabelFont() Font

func (*Pack) LabelSize

func (w *Pack) LabelSize() int

func (*Pack) LabelType

func (w *Pack) LabelType() LabelType

func (*Pack) MeasureLabel

func (w *Pack) MeasureLabel() (int, int)

func (*Pack) Parent

func (w *Pack) Parent() *Group

func (*Pack) Redraw

func (w *Pack) Redraw()

func (*Pack) Resize

func (w *Pack) Resize(x, y, width, height int)

func (*Pack) SelectionColor

func (w *Pack) SelectionColor() Color

func (*Pack) SetAlign

func (w *Pack) SetAlign(align Align)

func (*Pack) SetBox

func (w *Pack) SetBox(box BoxType)

func (*Pack) SetCallback

func (w *Pack) SetCallback(f func())

func (*Pack) SetCallbackCondition

func (w *Pack) SetCallbackCondition(when CallbackCondition)

func (*Pack) SetColor

func (w *Pack) SetColor(color Color)

func (*Pack) SetDeimage

func (w *Pack) SetDeimage(i Image)

func (*Pack) SetImage

func (w *Pack) SetImage(i Image)

func (*Pack) SetLabel

func (w *Pack) SetLabel(label string)

func (*Pack) SetLabelColor

func (w *Pack) SetLabelColor(col Color)

func (*Pack) SetLabelFont

func (w *Pack) SetLabelFont(font Font)

func (*Pack) SetLabelSize

func (w *Pack) SetLabelSize(size int)

func (*Pack) SetLabelType

func (w *Pack) SetLabelType(ltype LabelType)

func (*Pack) SetPosition

func (w *Pack) SetPosition(x, y int)

func (*Pack) SetSelectionColor

func (w *Pack) SetSelectionColor(color Color)

func (*Pack) SetSpacing

func (p *Pack) SetSpacing(spacing int)

func (*Pack) SetType

func (p *Pack) SetType(packType PackType)

func (*Pack) Show

func (w *Pack) Show()

func (*Pack) Type

func (w *Pack) Type() uint8

func (*Pack) W

func (w *Pack) W() int

func (*Pack) X

func (w *Pack) X() int

func (*Pack) Y

func (w *Pack) Y() int

type PackType

type PackType uint8

type PngImage

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

func NewPngImageFromData

func NewPngImageFromData(data []uint8) (*PngImage, error)

func NewPngImageLoad

func NewPngImageLoad(path string) (*PngImage, error)

func (*PngImage) Count

func (i *PngImage) Count() int

func (*PngImage) D

func (i *PngImage) D() int

func (*PngImage) DataH

func (i *PngImage) DataH() int

func (*PngImage) DataW

func (i *PngImage) DataW() int

func (*PngImage) Destroy

func (i *PngImage) Destroy()

func (*PngImage) H

func (i *PngImage) H() int

func (*PngImage) Inactive

func (i *PngImage) Inactive()

func (*PngImage) Ld

func (i *PngImage) Ld() int

func (*PngImage) Scale

func (i *PngImage) Scale(width int, height int, proportional bool, can_expand bool)

func (*PngImage) W

func (i *PngImage) W() int

type Progress

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

func NewProgress

func NewProgress(x, y, w, h int, text ...string) *Progress

func (*Progress) Activate

func (w *Progress) Activate()

func (*Progress) Align

func (w *Progress) Align() Align

func (*Progress) Box

func (w *Progress) Box() BoxType

func (*Progress) ClearVisibleFocus

func (w *Progress) ClearVisibleFocus()

func (*Progress) Color

func (w *Progress) Color() Color

func (*Progress) Deactivate

func (w *Progress) Deactivate()

func (*Progress) Destroy

func (w *Progress) Destroy()

func (*Progress) H

func (w *Progress) H() int

func (*Progress) Hide

func (w *Progress) Hide()

func (*Progress) Label

func (w *Progress) Label() string

func (*Progress) LabelColor

func (w *Progress) LabelColor() Color

func (*Progress) LabelFont

func (w *Progress) LabelFont() Font

func (*Progress) LabelSize

func (w *Progress) LabelSize() int

func (*Progress) LabelType

func (w *Progress) LabelType() LabelType

func (*Progress) MeasureLabel

func (w *Progress) MeasureLabel() (int, int)

func (*Progress) Parent

func (w *Progress) Parent() *Group

func (*Progress) Redraw

func (w *Progress) Redraw()

func (*Progress) Resize

func (w *Progress) Resize(x, y, width, height int)

func (*Progress) SelectionColor

func (w *Progress) SelectionColor() Color

func (*Progress) SetAlign

func (w *Progress) SetAlign(align Align)

func (*Progress) SetBox

func (w *Progress) SetBox(box BoxType)

func (*Progress) SetCallback

func (w *Progress) SetCallback(f func())

func (*Progress) SetCallbackCondition

func (w *Progress) SetCallbackCondition(when CallbackCondition)

func (*Progress) SetColor

func (w *Progress) SetColor(color Color)

func (*Progress) SetDeimage

func (w *Progress) SetDeimage(i Image)

func (*Progress) SetImage

func (w *Progress) SetImage(i Image)

func (*Progress) SetLabel

func (w *Progress) SetLabel(label string)

func (*Progress) SetLabelColor

func (w *Progress) SetLabelColor(col Color)

func (*Progress) SetLabelFont

func (w *Progress) SetLabelFont(font Font)

func (*Progress) SetLabelSize

func (w *Progress) SetLabelSize(size int)

func (*Progress) SetLabelType

func (w *Progress) SetLabelType(ltype LabelType)

func (*Progress) SetMaximum

func (p *Progress) SetMaximum(max float64)

func (*Progress) SetMinimum

func (p *Progress) SetMinimum(max float64)

func (*Progress) SetPosition

func (w *Progress) SetPosition(x, y int)

func (*Progress) SetSelectionColor

func (w *Progress) SetSelectionColor(color Color)

func (*Progress) SetType

func (w *Progress) SetType(widgetType uint8)

func (*Progress) SetValue

func (p *Progress) SetValue(value float64)

func (*Progress) Show

func (w *Progress) Show()

func (*Progress) Type

func (w *Progress) Type() uint8

func (*Progress) W

func (w *Progress) W() int

func (*Progress) X

func (w *Progress) X() int

func (*Progress) Y

func (w *Progress) Y() int

type RadioButton

type RadioButton struct {
	Button
}

func NewRadioButton

func NewRadioButton(x, y, w, h int, text ...string) *RadioButton

func (*RadioButton) Activate

func (w *RadioButton) Activate()

func (*RadioButton) Align

func (w *RadioButton) Align() Align

func (*RadioButton) Box

func (w *RadioButton) Box() BoxType

func (*RadioButton) ClearVisibleFocus

func (w *RadioButton) ClearVisibleFocus()

func (*RadioButton) Color

func (w *RadioButton) Color() Color

func (*RadioButton) Deactivate

func (w *RadioButton) Deactivate()

func (*RadioButton) Destroy

func (w *RadioButton) Destroy()

func (*RadioButton) H

func (w *RadioButton) H() int

func (*RadioButton) Hide

func (w *RadioButton) Hide()

func (*RadioButton) Label

func (w *RadioButton) Label() string

func (*RadioButton) LabelColor

func (w *RadioButton) LabelColor() Color

func (*RadioButton) LabelFont

func (w *RadioButton) LabelFont() Font

func (*RadioButton) LabelSize

func (w *RadioButton) LabelSize() int

func (*RadioButton) LabelType

func (w *RadioButton) LabelType() LabelType

func (*RadioButton) MeasureLabel

func (w *RadioButton) MeasureLabel() (int, int)

func (*RadioButton) Parent

func (w *RadioButton) Parent() *Group

func (*RadioButton) Redraw

func (w *RadioButton) Redraw()

func (*RadioButton) Resize

func (w *RadioButton) Resize(x, y, width, height int)

func (*RadioButton) SelectionColor

func (w *RadioButton) SelectionColor() Color

func (*RadioButton) SetAlign

func (w *RadioButton) SetAlign(align Align)

func (*RadioButton) SetBox

func (w *RadioButton) SetBox(box BoxType)

func (*RadioButton) SetCallback

func (w *RadioButton) SetCallback(f func())

func (*RadioButton) SetCallbackCondition

func (w *RadioButton) SetCallbackCondition(when CallbackCondition)

func (*RadioButton) SetColor

func (w *RadioButton) SetColor(color Color)

func (*RadioButton) SetDeimage

func (w *RadioButton) SetDeimage(i Image)

func (*RadioButton) SetImage

func (w *RadioButton) SetImage(i Image)

func (*RadioButton) SetLabel

func (w *RadioButton) SetLabel(label string)

func (*RadioButton) SetLabelColor

func (w *RadioButton) SetLabelColor(col Color)

func (*RadioButton) SetLabelFont

func (w *RadioButton) SetLabelFont(font Font)

func (*RadioButton) SetLabelSize

func (w *RadioButton) SetLabelSize(size int)

func (*RadioButton) SetLabelType

func (w *RadioButton) SetLabelType(ltype LabelType)

func (*RadioButton) SetPosition

func (w *RadioButton) SetPosition(x, y int)

func (*RadioButton) SetSelectionColor

func (w *RadioButton) SetSelectionColor(color Color)

func (*RadioButton) SetType

func (w *RadioButton) SetType(widgetType uint8)

func (*RadioButton) Show

func (w *RadioButton) Show()

func (*RadioButton) Type

func (w *RadioButton) Type() uint8

func (*RadioButton) W

func (w *RadioButton) W() int

func (*RadioButton) X

func (w *RadioButton) X() int

func (*RadioButton) Y

func (w *RadioButton) Y() int

type RadioRoundButton

type RadioRoundButton struct {
	Button
}

func NewRadioRoundButton

func NewRadioRoundButton(x, y, w, h int, text ...string) *RadioRoundButton

func (*RadioRoundButton) Activate

func (w *RadioRoundButton) Activate()

func (*RadioRoundButton) Align

func (w *RadioRoundButton) Align() Align

func (*RadioRoundButton) Box

func (w *RadioRoundButton) Box() BoxType

func (*RadioRoundButton) ClearVisibleFocus

func (w *RadioRoundButton) ClearVisibleFocus()

func (*RadioRoundButton) Color

func (w *RadioRoundButton) Color() Color

func (*RadioRoundButton) Deactivate

func (w *RadioRoundButton) Deactivate()

func (*RadioRoundButton) Destroy

func (w *RadioRoundButton) Destroy()

func (*RadioRoundButton) H

func (w *RadioRoundButton) H() int

func (*RadioRoundButton) Hide

func (w *RadioRoundButton) Hide()

func (*RadioRoundButton) Label

func (w *RadioRoundButton) Label() string

func (*RadioRoundButton) LabelColor

func (w *RadioRoundButton) LabelColor() Color

func (*RadioRoundButton) LabelFont

func (w *RadioRoundButton) LabelFont() Font

func (*RadioRoundButton) LabelSize

func (w *RadioRoundButton) LabelSize() int

func (*RadioRoundButton) LabelType

func (w *RadioRoundButton) LabelType() LabelType

func (*RadioRoundButton) MeasureLabel

func (w *RadioRoundButton) MeasureLabel() (int, int)

func (*RadioRoundButton) Parent

func (w *RadioRoundButton) Parent() *Group

func (*RadioRoundButton) Redraw

func (w *RadioRoundButton) Redraw()

func (*RadioRoundButton) Resize

func (w *RadioRoundButton) Resize(x, y, width, height int)

func (*RadioRoundButton) SelectionColor

func (w *RadioRoundButton) SelectionColor() Color

func (*RadioRoundButton) SetAlign

func (w *RadioRoundButton) SetAlign(align Align)

func (*RadioRoundButton) SetBox

func (w *RadioRoundButton) SetBox(box BoxType)

func (*RadioRoundButton) SetCallback

func (w *RadioRoundButton) SetCallback(f func())

func (*RadioRoundButton) SetCallbackCondition

func (w *RadioRoundButton) SetCallbackCondition(when CallbackCondition)

func (*RadioRoundButton) SetColor

func (w *RadioRoundButton) SetColor(color Color)

func (*RadioRoundButton) SetDeimage

func (w *RadioRoundButton) SetDeimage(i Image)

func (*RadioRoundButton) SetImage

func (w *RadioRoundButton) SetImage(i Image)

func (*RadioRoundButton) SetLabel

func (w *RadioRoundButton) SetLabel(label string)

func (*RadioRoundButton) SetLabelColor

func (w *RadioRoundButton) SetLabelColor(col Color)

func (*RadioRoundButton) SetLabelFont

func (w *RadioRoundButton) SetLabelFont(font Font)

func (*RadioRoundButton) SetLabelSize

func (w *RadioRoundButton) SetLabelSize(size int)

func (*RadioRoundButton) SetLabelType

func (w *RadioRoundButton) SetLabelType(ltype LabelType)

func (*RadioRoundButton) SetPosition

func (w *RadioRoundButton) SetPosition(x, y int)

func (*RadioRoundButton) SetSelectionColor

func (w *RadioRoundButton) SetSelectionColor(color Color)

func (*RadioRoundButton) SetType

func (w *RadioRoundButton) SetType(widgetType uint8)

func (*RadioRoundButton) Show

func (w *RadioRoundButton) Show()

func (*RadioRoundButton) Type

func (w *RadioRoundButton) Type() uint8

func (*RadioRoundButton) W

func (w *RadioRoundButton) W() int

func (*RadioRoundButton) X

func (w *RadioRoundButton) X() int

func (*RadioRoundButton) Y

func (w *RadioRoundButton) Y() int

type ReturnButton

type ReturnButton struct {
	Button
}

func NewReturnButton

func NewReturnButton(x, y, w, h int, text ...string) *ReturnButton

func (*ReturnButton) Activate

func (w *ReturnButton) Activate()

func (*ReturnButton) Align

func (w *ReturnButton) Align() Align

func (*ReturnButton) Box

func (w *ReturnButton) Box() BoxType

func (*ReturnButton) ClearVisibleFocus

func (w *ReturnButton) ClearVisibleFocus()

func (*ReturnButton) Color

func (w *ReturnButton) Color() Color

func (*ReturnButton) Deactivate

func (w *ReturnButton) Deactivate()

func (*ReturnButton) Destroy

func (w *ReturnButton) Destroy()

func (*ReturnButton) H

func (w *ReturnButton) H() int

func (*ReturnButton) Hide

func (w *ReturnButton) Hide()

func (*ReturnButton) Label

func (w *ReturnButton) Label() string

func (*ReturnButton) LabelColor

func (w *ReturnButton) LabelColor() Color

func (*ReturnButton) LabelFont

func (w *ReturnButton) LabelFont() Font

func (*ReturnButton) LabelSize

func (w *ReturnButton) LabelSize() int

func (*ReturnButton) LabelType

func (w *ReturnButton) LabelType() LabelType

func (*ReturnButton) MeasureLabel

func (w *ReturnButton) MeasureLabel() (int, int)

func (*ReturnButton) Parent

func (w *ReturnButton) Parent() *Group

func (*ReturnButton) Redraw

func (w *ReturnButton) Redraw()

func (*ReturnButton) Resize

func (w *ReturnButton) Resize(x, y, width, height int)

func (*ReturnButton) SelectionColor

func (w *ReturnButton) SelectionColor() Color

func (*ReturnButton) SetAlign

func (w *ReturnButton) SetAlign(align Align)

func (*ReturnButton) SetBox

func (w *ReturnButton) SetBox(box BoxType)

func (*ReturnButton) SetCallback

func (w *ReturnButton) SetCallback(f func())

func (*ReturnButton) SetCallbackCondition

func (w *ReturnButton) SetCallbackCondition(when CallbackCondition)

func (*ReturnButton) SetColor

func (w *ReturnButton) SetColor(color Color)

func (*ReturnButton) SetDeimage

func (w *ReturnButton) SetDeimage(i Image)

func (*ReturnButton) SetImage

func (w *ReturnButton) SetImage(i Image)

func (*ReturnButton) SetLabel

func (w *ReturnButton) SetLabel(label string)

func (*ReturnButton) SetLabelColor

func (w *ReturnButton) SetLabelColor(col Color)

func (*ReturnButton) SetLabelFont

func (w *ReturnButton) SetLabelFont(font Font)

func (*ReturnButton) SetLabelSize

func (w *ReturnButton) SetLabelSize(size int)

func (*ReturnButton) SetLabelType

func (w *ReturnButton) SetLabelType(ltype LabelType)

func (*ReturnButton) SetPosition

func (w *ReturnButton) SetPosition(x, y int)

func (*ReturnButton) SetSelectionColor

func (w *ReturnButton) SetSelectionColor(color Color)

func (*ReturnButton) SetType

func (w *ReturnButton) SetType(widgetType uint8)

func (*ReturnButton) Show

func (w *ReturnButton) Show()

func (*ReturnButton) Type

func (w *ReturnButton) Type() uint8

func (*ReturnButton) W

func (w *ReturnButton) W() int

func (*ReturnButton) X

func (w *ReturnButton) X() int

func (*ReturnButton) Y

func (w *ReturnButton) Y() int

type RgbImage

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

func NewRgbImage

func NewRgbImage(data []uint8, w, h, depth int) (*RgbImage, error)

func (*RgbImage) Count

func (i *RgbImage) Count() int

func (*RgbImage) D

func (i *RgbImage) D() int

func (*RgbImage) DataH

func (i *RgbImage) DataH() int

func (*RgbImage) DataW

func (i *RgbImage) DataW() int

func (*RgbImage) Destroy

func (i *RgbImage) Destroy()

func (*RgbImage) H

func (i *RgbImage) H() int

func (*RgbImage) Inactive

func (i *RgbImage) Inactive()

func (*RgbImage) Ld

func (i *RgbImage) Ld() int

func (*RgbImage) Scale

func (i *RgbImage) Scale(width int, height int, proportional bool, can_expand bool)

func (*RgbImage) W

func (i *RgbImage) W() int

type RowSelectMode

type RowSelectMode int

type SelectionFlag

type SelectionFlag int

type SharedImage

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

func NewSharedImageLoad

func NewSharedImageLoad(path string) (*SharedImage, error)

func (*SharedImage) Count

func (i *SharedImage) Count() int

func (*SharedImage) D

func (i *SharedImage) D() int

func (*SharedImage) DataH

func (i *SharedImage) DataH() int

func (*SharedImage) DataW

func (i *SharedImage) DataW() int

func (*SharedImage) Destroy

func (i *SharedImage) Destroy()

func (*SharedImage) H

func (i *SharedImage) H() int

func (*SharedImage) Inactive

func (i *SharedImage) Inactive()

func (*SharedImage) Ld

func (i *SharedImage) Ld() int

func (*SharedImage) Scale

func (i *SharedImage) Scale(width int, height int, proportional bool, can_expand bool)

func (*SharedImage) W

func (i *SharedImage) W() int

type Spinner

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

func NewSpinner

func NewSpinner(x, y, w, h int, text ...string) *Spinner

func (*Spinner) Activate

func (w *Spinner) Activate()

func (*Spinner) Align

func (w *Spinner) Align() Align

func (*Spinner) Box

func (w *Spinner) Box() BoxType

func (*Spinner) ClearVisibleFocus

func (w *Spinner) ClearVisibleFocus()

func (*Spinner) Color

func (w *Spinner) Color() Color

func (*Spinner) Deactivate

func (w *Spinner) Deactivate()

func (*Spinner) Destroy

func (w *Spinner) Destroy()

func (*Spinner) H

func (w *Spinner) H() int

func (*Spinner) Hide

func (w *Spinner) Hide()

func (*Spinner) Label

func (w *Spinner) Label() string

func (*Spinner) LabelColor

func (w *Spinner) LabelColor() Color

func (*Spinner) LabelFont

func (w *Spinner) LabelFont() Font

func (*Spinner) LabelSize

func (w *Spinner) LabelSize() int

func (*Spinner) LabelType

func (w *Spinner) LabelType() LabelType

func (*Spinner) MeasureLabel

func (w *Spinner) MeasureLabel() (int, int)

func (*Spinner) Parent

func (w *Spinner) Parent() *Group

func (*Spinner) Redraw

func (w *Spinner) Redraw()

func (*Spinner) Resize

func (w *Spinner) Resize(x, y, width, height int)

func (*Spinner) SelectionColor

func (w *Spinner) SelectionColor() Color

func (*Spinner) SetAlign

func (w *Spinner) SetAlign(align Align)

func (*Spinner) SetBox

func (w *Spinner) SetBox(box BoxType)

func (*Spinner) SetCallback

func (w *Spinner) SetCallback(f func())

func (*Spinner) SetCallbackCondition

func (w *Spinner) SetCallbackCondition(when CallbackCondition)

func (*Spinner) SetColor

func (w *Spinner) SetColor(color Color)

func (*Spinner) SetDeimage

func (w *Spinner) SetDeimage(i Image)

func (*Spinner) SetImage

func (w *Spinner) SetImage(i Image)

func (*Spinner) SetLabel

func (w *Spinner) SetLabel(label string)

func (*Spinner) SetLabelColor

func (w *Spinner) SetLabelColor(col Color)

func (*Spinner) SetLabelFont

func (w *Spinner) SetLabelFont(font Font)

func (*Spinner) SetLabelSize

func (w *Spinner) SetLabelSize(size int)

func (*Spinner) SetLabelType

func (w *Spinner) SetLabelType(ltype LabelType)

func (*Spinner) SetMaximum

func (s *Spinner) SetMaximum(max float64)

func (*Spinner) SetMinimum

func (s *Spinner) SetMinimum(min float64)

func (*Spinner) SetPosition

func (w *Spinner) SetPosition(x, y int)

func (*Spinner) SetSelectionColor

func (w *Spinner) SetSelectionColor(color Color)

func (*Spinner) SetStep

func (s *Spinner) SetStep(step float64)

func (*Spinner) SetType

func (s *Spinner) SetType(inputType SpinnerInputType)

func (*Spinner) SetValue

func (s *Spinner) SetValue(val float64)

func (*Spinner) Show

func (w *Spinner) Show()

func (*Spinner) Type

func (w *Spinner) Type() uint8

func (*Spinner) Value

func (s *Spinner) Value() float64

func (*Spinner) W

func (w *Spinner) W() int

func (*Spinner) X

func (w *Spinner) X() int

func (*Spinner) Y

func (w *Spinner) Y() int

type SpinnerInputType

type SpinnerInputType uint8

type SvgImage

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

func NewSvgImageFromString

func NewSvgImageFromString(str string) (*SvgImage, error)

func NewSvgImageLoad

func NewSvgImageLoad(path string) (*SvgImage, error)

func (*SvgImage) Count

func (i *SvgImage) Count() int

func (*SvgImage) D

func (i *SvgImage) D() int

func (*SvgImage) DataH

func (i *SvgImage) DataH() int

func (*SvgImage) DataW

func (i *SvgImage) DataW() int

func (*SvgImage) Destroy

func (i *SvgImage) Destroy()

func (*SvgImage) H

func (i *SvgImage) H() int

func (*SvgImage) Inactive

func (i *SvgImage) Inactive()

func (*SvgImage) Ld

func (i *SvgImage) Ld() int

func (*SvgImage) Scale

func (i *SvgImage) Scale(width int, height int, proportional bool, can_expand bool)

func (*SvgImage) W

func (i *SvgImage) W() int

type TableContext

type TableContext int

type TableRow

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

func NewTableRow

func NewTableRow(x, y, w, h int) *TableRow

func (*TableRow) AllowColumnResizing

func (t *TableRow) AllowColumnResizing()

func (*TableRow) AllowRowResizing

func (t *TableRow) AllowRowResizing()

func (*TableRow) CallbackContext

func (t *TableRow) CallbackContext() TableContext

func (*TableRow) CallbackRow

func (t *TableRow) CallbackRow() int

func (*TableRow) Destroy

func (t *TableRow) Destroy()

func (*TableRow) DisableColumnHeaders

func (t *TableRow) DisableColumnHeaders()

func (*TableRow) DisableRowHeaders

func (t *TableRow) DisableRowHeaders()

func (*TableRow) DisallowColumnResizing

func (t *TableRow) DisallowColumnResizing()

func (*TableRow) DisallowRowResizing

func (t *TableRow) DisallowRowResizing()

func (*TableRow) EnableColumnHeaders

func (t *TableRow) EnableColumnHeaders()

func (*TableRow) EnableRowHeaders

func (t *TableRow) EnableRowHeaders()

func (*TableRow) FindCell

func (t *TableRow) FindCell(ctx TableContext, row int, col int) (int, int, int, int, error)

func (*TableRow) IsRowSelected

func (t *TableRow) IsRowSelected(row int) bool

func (*TableRow) SelectAllRows

func (t *TableRow) SelectAllRows(flag SelectionFlag)

func (*TableRow) SelectRow

func (t *TableRow) SelectRow(row int, flag SelectionFlag)

func (*TableRow) Selection

func (t *TableRow) Selection() (int, int, int, int)

func (*TableRow) SetColumnCount

func (t *TableRow) SetColumnCount(columnCount int)

func (*TableRow) SetColumnWidth

func (t *TableRow) SetColumnWidth(column, width int)

func (*TableRow) SetColumnWidthAll

func (t *TableRow) SetColumnWidthAll(width int)

func (*TableRow) SetDrawCellCallback

func (t *TableRow) SetDrawCellCallback(callback func(TableContext, int, int, int, int, int, int))

func (*TableRow) SetEventHandler

func (t *TableRow) SetEventHandler(handler func(Event) bool)

func (*TableRow) SetResizeHandler

func (t *TableRow) SetResizeHandler(handler func())

func (*TableRow) SetRowCount

func (t *TableRow) SetRowCount(rowCount int)

func (*TableRow) SetRowHeight

func (t *TableRow) SetRowHeight(row, height int)

func (*TableRow) SetRowHeightAll

func (t *TableRow) SetRowHeightAll(height int)

func (*TableRow) SetTopRow

func (t *TableRow) SetTopRow(row int)

func (*TableRow) SetType

func (t *TableRow) SetType(tableType RowSelectMode)

func (*TableRow) VisibleCells

func (t *TableRow) VisibleCells() (int, int, int, int)

type Tabs

type Tabs struct {
	Group
}

func NewTabs

func NewTabs(x, y, w, h int, text ...string) *Tabs

func (*Tabs) Activate

func (w *Tabs) Activate()

func (*Tabs) Align

func (w *Tabs) Align() Align

func (*Tabs) Box

func (w *Tabs) Box() BoxType

func (*Tabs) ClearVisibleFocus

func (w *Tabs) ClearVisibleFocus()

func (*Tabs) Color

func (w *Tabs) Color() Color

func (*Tabs) Deactivate

func (w *Tabs) Deactivate()

func (*Tabs) Destroy

func (w *Tabs) Destroy()

func (*Tabs) H

func (w *Tabs) H() int

func (*Tabs) Hide

func (w *Tabs) Hide()

func (*Tabs) Label

func (w *Tabs) Label() string

func (*Tabs) LabelColor

func (w *Tabs) LabelColor() Color

func (*Tabs) LabelFont

func (w *Tabs) LabelFont() Font

func (*Tabs) LabelSize

func (w *Tabs) LabelSize() int

func (*Tabs) LabelType

func (w *Tabs) LabelType() LabelType

func (*Tabs) MeasureLabel

func (w *Tabs) MeasureLabel() (int, int)

func (*Tabs) Parent

func (w *Tabs) Parent() *Group

func (*Tabs) Redraw

func (w *Tabs) Redraw()

func (*Tabs) Resize

func (w *Tabs) Resize(x, y, width, height int)

func (*Tabs) SelectionColor

func (w *Tabs) SelectionColor() Color

func (*Tabs) SetAlign

func (w *Tabs) SetAlign(align Align)

func (*Tabs) SetBox

func (w *Tabs) SetBox(box BoxType)

func (*Tabs) SetCallback

func (w *Tabs) SetCallback(f func())

func (*Tabs) SetCallbackCondition

func (w *Tabs) SetCallbackCondition(when CallbackCondition)

func (*Tabs) SetColor

func (w *Tabs) SetColor(color Color)

func (*Tabs) SetDeimage

func (w *Tabs) SetDeimage(i Image)

func (*Tabs) SetImage

func (w *Tabs) SetImage(i Image)

func (*Tabs) SetLabel

func (w *Tabs) SetLabel(label string)

func (*Tabs) SetLabelColor

func (w *Tabs) SetLabelColor(col Color)

func (*Tabs) SetLabelFont

func (w *Tabs) SetLabelFont(font Font)

func (*Tabs) SetLabelSize

func (w *Tabs) SetLabelSize(size int)

func (*Tabs) SetLabelType

func (w *Tabs) SetLabelType(ltype LabelType)

func (*Tabs) SetPosition

func (w *Tabs) SetPosition(x, y int)

func (*Tabs) SetSelectionColor

func (w *Tabs) SetSelectionColor(color Color)

func (*Tabs) SetType

func (w *Tabs) SetType(widgetType uint8)

func (*Tabs) SetValue

func (t *Tabs) SetValue(value int)

func (*Tabs) Show

func (w *Tabs) Show()

func (*Tabs) Type

func (w *Tabs) Type() uint8

func (*Tabs) Value

func (t *Tabs) Value() int

func (*Tabs) W

func (w *Tabs) W() int

func (*Tabs) X

func (w *Tabs) X() int

func (*Tabs) Y

func (w *Tabs) Y() int

type TextBuffer

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

func NewTextBuffer

func NewTextBuffer() *TextBuffer

func (*TextBuffer) Append

func (b *TextBuffer) Append(txt string)

func (*TextBuffer) SetText

func (b *TextBuffer) SetText(txt string)

func (*TextBuffer) Text

func (b *TextBuffer) Text() string

type TextDisplay

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

func NewTextDisplay

func NewTextDisplay(x, y, w, h int, text ...string) *TextDisplay

func (*TextDisplay) Activate

func (w *TextDisplay) Activate()

func (*TextDisplay) Align

func (w *TextDisplay) Align() Align

func (*TextDisplay) Box

func (w *TextDisplay) Box() BoxType

func (*TextDisplay) Buffer

func (t *TextDisplay) Buffer() *TextBuffer

func (*TextDisplay) ClearVisibleFocus

func (w *TextDisplay) ClearVisibleFocus()

func (*TextDisplay) Color

func (w *TextDisplay) Color() Color

func (*TextDisplay) Deactivate

func (w *TextDisplay) Deactivate()

func (*TextDisplay) Destroy

func (w *TextDisplay) Destroy()

func (*TextDisplay) H

func (w *TextDisplay) H() int

func (*TextDisplay) Hide

func (w *TextDisplay) Hide()

func (*TextDisplay) Label

func (w *TextDisplay) Label() string

func (*TextDisplay) LabelColor

func (w *TextDisplay) LabelColor() Color

func (*TextDisplay) LabelFont

func (w *TextDisplay) LabelFont() Font

func (*TextDisplay) LabelSize

func (w *TextDisplay) LabelSize() int

func (*TextDisplay) LabelType

func (w *TextDisplay) LabelType() LabelType

func (*TextDisplay) MeasureLabel

func (w *TextDisplay) MeasureLabel() (int, int)

func (*TextDisplay) Parent

func (w *TextDisplay) Parent() *Group

func (*TextDisplay) Redraw

func (w *TextDisplay) Redraw()

func (*TextDisplay) Resize

func (w *TextDisplay) Resize(x, y, width, height int)

func (*TextDisplay) SelectionColor

func (w *TextDisplay) SelectionColor() Color

func (*TextDisplay) SetAlign

func (w *TextDisplay) SetAlign(align Align)

func (*TextDisplay) SetBox

func (w *TextDisplay) SetBox(box BoxType)

func (*TextDisplay) SetBuffer

func (t *TextDisplay) SetBuffer(buf *TextBuffer)

func (*TextDisplay) SetCallback

func (w *TextDisplay) SetCallback(f func())

func (*TextDisplay) SetCallbackCondition

func (w *TextDisplay) SetCallbackCondition(when CallbackCondition)

func (*TextDisplay) SetColor

func (w *TextDisplay) SetColor(color Color)

func (*TextDisplay) SetDeimage

func (w *TextDisplay) SetDeimage(i Image)

func (*TextDisplay) SetImage

func (w *TextDisplay) SetImage(i Image)

func (*TextDisplay) SetLabel

func (w *TextDisplay) SetLabel(label string)

func (*TextDisplay) SetLabelColor

func (w *TextDisplay) SetLabelColor(col Color)

func (*TextDisplay) SetLabelFont

func (w *TextDisplay) SetLabelFont(font Font)

func (*TextDisplay) SetLabelSize

func (w *TextDisplay) SetLabelSize(size int)

func (*TextDisplay) SetLabelType

func (w *TextDisplay) SetLabelType(ltype LabelType)

func (*TextDisplay) SetPosition

func (w *TextDisplay) SetPosition(x, y int)

func (*TextDisplay) SetSelectionColor

func (w *TextDisplay) SetSelectionColor(color Color)

func (*TextDisplay) SetType

func (w *TextDisplay) SetType(widgetType uint8)

func (*TextDisplay) Show

func (w *TextDisplay) Show()

func (*TextDisplay) Type

func (w *TextDisplay) Type() uint8

func (*TextDisplay) W

func (w *TextDisplay) W() int

func (*TextDisplay) X

func (w *TextDisplay) X() int

func (*TextDisplay) Y

func (w *TextDisplay) Y() int

type TextEditor

type TextEditor struct {
	TextDisplay
}

func NewTextEditor

func NewTextEditor(x, y, w, h int, text ...string) *TextEditor

func (*TextEditor) Activate

func (w *TextEditor) Activate()

func (*TextEditor) Align

func (w *TextEditor) Align() Align

func (*TextEditor) Box

func (w *TextEditor) Box() BoxType

func (*TextEditor) ClearVisibleFocus

func (w *TextEditor) ClearVisibleFocus()

func (*TextEditor) Color

func (w *TextEditor) Color() Color

func (*TextEditor) Deactivate

func (w *TextEditor) Deactivate()

func (*TextEditor) Destroy

func (w *TextEditor) Destroy()

func (*TextEditor) H

func (w *TextEditor) H() int

func (*TextEditor) Hide

func (w *TextEditor) Hide()

func (*TextEditor) Label

func (w *TextEditor) Label() string

func (*TextEditor) LabelColor

func (w *TextEditor) LabelColor() Color

func (*TextEditor) LabelFont

func (w *TextEditor) LabelFont() Font

func (*TextEditor) LabelSize

func (w *TextEditor) LabelSize() int

func (*TextEditor) LabelType

func (w *TextEditor) LabelType() LabelType

func (*TextEditor) MeasureLabel

func (w *TextEditor) MeasureLabel() (int, int)

func (*TextEditor) Parent

func (w *TextEditor) Parent() *Group

func (*TextEditor) Redraw

func (w *TextEditor) Redraw()

func (*TextEditor) Resize

func (w *TextEditor) Resize(x, y, width, height int)

func (*TextEditor) SelectionColor

func (w *TextEditor) SelectionColor() Color

func (*TextEditor) SetAlign

func (w *TextEditor) SetAlign(align Align)

func (*TextEditor) SetBox

func (w *TextEditor) SetBox(box BoxType)

func (*TextEditor) SetCallback

func (w *TextEditor) SetCallback(f func())

func (*TextEditor) SetCallbackCondition

func (w *TextEditor) SetCallbackCondition(when CallbackCondition)

func (*TextEditor) SetColor

func (w *TextEditor) SetColor(color Color)

func (*TextEditor) SetDeimage

func (w *TextEditor) SetDeimage(i Image)

func (*TextEditor) SetImage

func (w *TextEditor) SetImage(i Image)

func (*TextEditor) SetLabel

func (w *TextEditor) SetLabel(label string)

func (*TextEditor) SetLabelColor

func (w *TextEditor) SetLabelColor(col Color)

func (*TextEditor) SetLabelFont

func (w *TextEditor) SetLabelFont(font Font)

func (*TextEditor) SetLabelSize

func (w *TextEditor) SetLabelSize(size int)

func (*TextEditor) SetLabelType

func (w *TextEditor) SetLabelType(ltype LabelType)

func (*TextEditor) SetPosition

func (w *TextEditor) SetPosition(x, y int)

func (*TextEditor) SetSelectionColor

func (w *TextEditor) SetSelectionColor(color Color)

func (*TextEditor) SetType

func (w *TextEditor) SetType(widgetType uint8)

func (*TextEditor) Show

func (w *TextEditor) Show()

func (*TextEditor) Type

func (w *TextEditor) Type() uint8

func (*TextEditor) W

func (w *TextEditor) W() int

func (*TextEditor) X

func (w *TextEditor) X() int

func (*TextEditor) Y

func (w *TextEditor) Y() int

type ToggleButton

type ToggleButton struct {
	Button
}

func NewToggleButton

func NewToggleButton(x, y, w, h int, text ...string) *ToggleButton

func (*ToggleButton) Activate

func (w *ToggleButton) Activate()

func (*ToggleButton) Align

func (w *ToggleButton) Align() Align

func (*ToggleButton) Box

func (w *ToggleButton) Box() BoxType

func (*ToggleButton) ClearVisibleFocus

func (w *ToggleButton) ClearVisibleFocus()

func (*ToggleButton) Color

func (w *ToggleButton) Color() Color

func (*ToggleButton) Deactivate

func (w *ToggleButton) Deactivate()

func (*ToggleButton) Destroy

func (w *ToggleButton) Destroy()

func (*ToggleButton) H

func (w *ToggleButton) H() int

func (*ToggleButton) Hide

func (w *ToggleButton) Hide()

func (*ToggleButton) Label

func (w *ToggleButton) Label() string

func (*ToggleButton) LabelColor

func (w *ToggleButton) LabelColor() Color

func (*ToggleButton) LabelFont

func (w *ToggleButton) LabelFont() Font

func (*ToggleButton) LabelSize

func (w *ToggleButton) LabelSize() int

func (*ToggleButton) LabelType

func (w *ToggleButton) LabelType() LabelType

func (*ToggleButton) MeasureLabel

func (w *ToggleButton) MeasureLabel() (int, int)

func (*ToggleButton) Parent

func (w *ToggleButton) Parent() *Group

func (*ToggleButton) Redraw

func (w *ToggleButton) Redraw()

func (*ToggleButton) Resize

func (w *ToggleButton) Resize(x, y, width, height int)

func (*ToggleButton) SelectionColor

func (w *ToggleButton) SelectionColor() Color

func (*ToggleButton) SetAlign

func (w *ToggleButton) SetAlign(align Align)

func (*ToggleButton) SetBox

func (w *ToggleButton) SetBox(box BoxType)

func (*ToggleButton) SetCallback

func (w *ToggleButton) SetCallback(f func())

func (*ToggleButton) SetCallbackCondition

func (w *ToggleButton) SetCallbackCondition(when CallbackCondition)

func (*ToggleButton) SetColor

func (w *ToggleButton) SetColor(color Color)

func (*ToggleButton) SetDeimage

func (w *ToggleButton) SetDeimage(i Image)

func (*ToggleButton) SetImage

func (w *ToggleButton) SetImage(i Image)

func (*ToggleButton) SetLabel

func (w *ToggleButton) SetLabel(label string)

func (*ToggleButton) SetLabelColor

func (w *ToggleButton) SetLabelColor(col Color)

func (*ToggleButton) SetLabelFont

func (w *ToggleButton) SetLabelFont(font Font)

func (*ToggleButton) SetLabelSize

func (w *ToggleButton) SetLabelSize(size int)

func (*ToggleButton) SetLabelType

func (w *ToggleButton) SetLabelType(ltype LabelType)

func (*ToggleButton) SetPosition

func (w *ToggleButton) SetPosition(x, y int)

func (*ToggleButton) SetSelectionColor

func (w *ToggleButton) SetSelectionColor(color Color)

func (*ToggleButton) SetType

func (w *ToggleButton) SetType(widgetType uint8)

func (*ToggleButton) Show

func (w *ToggleButton) Show()

func (*ToggleButton) Type

func (w *ToggleButton) Type() uint8

func (*ToggleButton) W

func (w *ToggleButton) W() int

func (*ToggleButton) X

func (w *ToggleButton) X() int

func (*ToggleButton) Y

func (w *ToggleButton) Y() int

type Widget

type Widget interface {
	// contains filtered or unexported methods
}

type Window

type Window struct {
	Group
}

func NewWindow

func NewWindow(x, y, w, h int, label string) *Window

func (*Window) Activate

func (w *Window) Activate()

func (*Window) Align

func (w *Window) Align() Align

func (*Window) Box

func (w *Window) Box() BoxType

func (*Window) ClearVisibleFocus

func (w *Window) ClearVisibleFocus()

func (*Window) Color

func (w *Window) Color() Color

func (*Window) Deactivate

func (w *Window) Deactivate()

func (*Window) Destroy

func (w *Window) Destroy()

func (*Window) H

func (w *Window) H() int

func (*Window) Hide

func (w *Window) Hide()

func (*Window) IsShown

func (w *Window) IsShown() bool

func (*Window) Label

func (w *Window) Label() string

func (*Window) LabelColor

func (w *Window) LabelColor() Color

func (*Window) LabelFont

func (w *Window) LabelFont() Font

func (*Window) LabelSize

func (w *Window) LabelSize() int

func (*Window) LabelType

func (w *Window) LabelType() LabelType

func (*Window) MeasureLabel

func (w *Window) MeasureLabel() (int, int)

func (*Window) Parent

func (w *Window) Parent() *Group

func (*Window) Redraw

func (w *Window) Redraw()

func (*Window) Resize

func (w *Window) Resize(x, y, width, height int)

func (*Window) SelectionColor

func (w *Window) SelectionColor() Color

func (*Window) SetAlign

func (w *Window) SetAlign(align Align)

func (*Window) SetBox

func (w *Window) SetBox(box BoxType)

func (*Window) SetCallback

func (w *Window) SetCallback(f func())

func (*Window) SetCallbackCondition

func (w *Window) SetCallbackCondition(when CallbackCondition)

func (*Window) SetColor

func (w *Window) SetColor(color Color)

func (*Window) SetCursor

func (w *Window) SetCursor(cursor Cursor)

func (*Window) SetDeimage

func (w *Window) SetDeimage(i Image)

func (*Window) SetImage

func (w *Window) SetImage(i Image)

func (*Window) SetLabel

func (w *Window) SetLabel(label string)

func (*Window) SetLabelColor

func (w *Window) SetLabelColor(col Color)

func (*Window) SetLabelFont

func (w *Window) SetLabelFont(font Font)

func (*Window) SetLabelSize

func (w *Window) SetLabelSize(size int)

func (*Window) SetLabelType

func (w *Window) SetLabelType(ltype LabelType)

func (*Window) SetPosition

func (w *Window) SetPosition(x, y int)

func (*Window) SetSelectionColor

func (w *Window) SetSelectionColor(color Color)

func (*Window) SetType

func (w *Window) SetType(widgetType uint8)

func (*Window) Show

func (w *Window) Show()

func (*Window) Type

func (w *Window) Type() uint8

func (*Window) W

func (w *Window) W() int

func (*Window) X

func (w *Window) X() int

func (*Window) XRoot

func (w *Window) XRoot() int

func (*Window) Y

func (w *Window) Y() int

func (*Window) YRoot

func (w *Window) YRoot() int

Directories

Path Synopsis
examples
flutter-like command
image command
table command
toggle command
widget_table command

Jump to

Keyboard shortcuts

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