fltk

package module
v0.0.0-...-1cdd9eb Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 6 Imported by: 98

README

go-fltk


GoDoc

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

For building go-fltk, besides Golang compiler, you will also need a C++11 compiler, such as GCC or Clang on Linux, MinGW on Windows and XCode on MacOS.

go-fltk comes with prebuilt FLTK libraries for some architectures (linux/amd64, windows/amd64), but you can easily rebuild them yourself or build them for other architectures. To build FLTK libraries for your platform it should be enough to call go generate from the root of the go-fltk source tree.

If the build procedure doesn't work for you, you can modify fltk-build.sh or fltk-build.bat yourself or ask a question on https://github.com/pwiecz/go-fltk/discussions.

For running programs built using go-fltk you will need some system libs which are normally available on operating systems with a graphical user interfaces:

  • Windows: No external dependencies, besides a (for mingw64)
  • MacOS: No external dependencies
  • Linux (and other Unix systems - not tested): You need:
    • X11
    • Xrender
    • Xcursor
    • Xfixes
    • Xext
    • Xft
    • Xinerama
    • OpenGL

Usage

package main

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

func main() {
    win := fltk.NewWindow(400, 300)
    win.SetLabel("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 LIGHT_GRAY = 0xeeeeee00
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.SetDrawHandler(func() { // Shadow under the bar
		fltk.DrawBox(fltk.FLAT_BOX, 0, 0, WIDTH, 63, LIGHT_GRAY)
	})
	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()
}

Resources

  • Link to the official FLTK 1.4 documentation.
  • Link to go-fltk documentation.

Documentation

Index

Constants

View Source
const (
	BAR_CHART        = iota /* Bar Chart variant */
	HORBAR_CHART     = iota /* Horizontal Bar Chart variant */
	LINE_CHART       = iota /* Line Chart variant */
	FILLED_CHART     = iota /* Fill Line Chart variant */
	SPIKE_CHART      = iota /* Spike Chart variant */
	PIE_CHART        = iota /* Pie Chart variant */
	SPECIALPIE_CHART = iota /* Special Pie Chart variant */
)
View Source
const (
	NO_BOX                 = BoxType(0)
	FLAT_BOX               = BoxType(1)
	UP_BOX                 = BoxType(2)
	DOWN_BOX               = BoxType(3)
	UP_FRAME               = BoxType(4)
	DOWN_FRAME             = BoxType(5)
	THIN_UP_BOX            = BoxType(6)
	THIN_DOWN_BOX          = BoxType(7)
	THIN_UP_FRAME          = BoxType(8)
	THIN_DOWN_FRAME        = BoxType(9)
	ENGRAVED_BOX           = BoxType(10)
	EMBOSSED_BOX           = BoxType(11)
	ENGRAVED_FRAME         = BoxType(12)
	EMBOSSED_FRAME         = BoxType(13)
	BORDER_BOX             = BoxType(14)
	SHADOW_BOX             = BoxType(15)
	BORDER_FRAME           = BoxType(16)
	SHADOW_FRAME           = BoxType(17)
	ROUNDED_BOX            = BoxType(18)
	RSHADOW_BOX            = BoxType(19)
	ROUNDED_FRAME          = BoxType(20)
	RFLAT_BOX              = BoxType(21)
	ROUND_UP_BOX           = BoxType(22)
	ROUND_DOWN_BOX         = BoxType(23)
	DIAMOND_UP_BOX         = BoxType(24)
	DIAMOND_DOWN_BOX       = BoxType(25)
	OVAL_BOX               = BoxType(26)
	OSHADOW_BOX            = BoxType(27)
	OVAL_FRAME             = BoxType(28)
	OFLAT_BOX              = BoxType(29)
	PLASTIC_UP_BOX         = BoxType(30)
	PLASTIC_DOWN_BOX       = BoxType(31)
	PLASTIC_UP_FRAME       = BoxType(32)
	PLASTIC_DOWN_FRAME     = BoxType(33)
	PLASTIC_THIN_UP_BOX    = BoxType(34)
	PLASTIC_THIN_DOWN_BOX  = BoxType(35)
	PLASTIC_ROUND_UP_BOX   = BoxType(36)
	PLASTIC_ROUND_DOWN_BOX = BoxType(37)
	GTK_UP_BOX             = BoxType(38)
	GTK_DOWN_BOX           = BoxType(39)
	GTK_UP_FRAME           = BoxType(40)
	GTK_DOWN_FRAME         = BoxType(41)
	GTK_THIN_UP_BOX        = BoxType(42)
	GTK_THIN_DOWN_BOX      = BoxType(43)
	GTK_THIN_UP_FRAME      = BoxType(44)
	GTK_THIN_DOWN_FRAME    = BoxType(45)
	GTK_ROUND_UP_FRAME     = BoxType(46)
	GTK_ROUND_DOWN_FRAME   = BoxType(47)
	GLEAM_UP_BOX           = BoxType(48)
	GLEAM_DOWN_BOX         = BoxType(49)
	GLEAM_UP_FRAME         = BoxType(50)
	GLEAM_DOWN_FRAME       = BoxType(51)
	GLEAM_THIN_UP_BOX      = BoxType(52)
	GLEAM_THIN_DOWN_BOX    = BoxType(53)
	GLEAM_ROUND_UP_BOX     = BoxType(54)
	GLEAM_ROUND_DOWN_BOX   = BoxType(55)
	FREE_BOXTYPE           = BoxType(56)
)
View Source
const (
	WRAP_NONE      = WrapMode(0)
	WRAP_AT_COLUMN = WrapMode(1)
	WRAP_AT_PIXEL  = WrapMode(2)
	WRAP_AT_BOUNDS = WrapMode(3)
)

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 (
	ARROW_SINGLE = ArrowType(C.go_FL_ARROW_SINGLE)
	ARROW_DOUBLE = ArrowType(C.go_FL_ARROW_DOUBLE)
	ARROW_CHOICE = ArrowType(C.go_FL_ARROW_CHOICE)
	ARROW_RETURN = ArrowType(C.go_FL_ARROW_RETURN)
)
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)
	CLOSE          = Event(C.go_FL_CLOSE)
	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 (
	SOLID        = LineStyle(0)
	DASH         = LineStyle(1)
	Dot          = LineStyle(2)
	DASH_DOT     = LineStyle(3)
	DASH_DOT_DOT = LineStyle(4)
	CAP_FLAT     = LineStyle(100)
	CAP_ROUND    = LineStyle(200)
	CAP_SQUARE   = LineStyle(300)
	JOIN_MITER   = LineStyle(1000)
	JOIN_ROUND   = LineStyle(2000)
	JOIN_BEVEL   = LineStyle(3000)
)
View Source
var (
	ESCAPE    = int(C.go_FL_ESCAPE)
	TAB       = int(C.go_FL_TAB)
	ENTER_KEY = int(C.go_FL_ENTER_KEY)
	HOME      = int(C.go_FL_HOME)
	LEFT      = int(C.go_FL_LEFT)
	UP        = int(C.go_FL_UP)
	RIGHT     = int(C.go_FL_RIGHT)
	DOWN      = int(C.go_FL_DOWN)
	PAGE_UP   = int(C.go_FL_PAGE_UP)
	PAGE_DOWN = int(C.go_FL_PAGE_DOWN)
	END       = int(C.go_FL_END)
	MENU      = int(C.go_FL_MENU)
	HELP      = int(C.go_FL_HELP)
	F1        = int(C.go_FL_F1)
	F2        = int(C.go_FL_F2)
	F3        = int(C.go_FL_F3)
	F4        = int(C.go_FL_F4)
	F5        = int(C.go_FL_F5)
	F6        = int(C.go_FL_F6)
	F7        = int(C.go_FL_F7)
	F8        = int(C.go_FL_F8)
	F9        = int(C.go_FL_F9)
	F10       = int(C.go_FL_F10)
	F11       = int(C.go_FL_F11)
	F12       = int(C.go_FL_F12)
	DELETE    = int(C.go_FL_DELETE)
	BACKSPACE = int(C.go_FL_BACKSPACE)
	INSERT    = int(C.go_FL_INSERT)
)
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 (
	// NativeFileChooser options
	NativeFileChooser_NO_OPTIONS     = int(C.go_FL_NativeFileChooser_NO_OPTIONS)
	NativeFileChooser_SAVEAS_CONFIRM = int(C.go_FL_NativeFileChooser_SAVEAS_CONFIRM)
	NativeFileChooser_NEW_FOLDER     = int(C.go_FL_NativeFileChooser_NEW_FOLDER)
	NativeFileChooser_PREVIEW        = int(C.go_FL_NativeFileChooser_PREVIEW)
	NativeFileChooser_USE_FILTER_EXT = int(C.go_FL_NativeFileChooser_USE_FILTER_EXT)

	NativeFileChooser_BROWSE_FILE            = NativeFileChooserType(C.go_FL_NativeFileChooser_BROWSE_FILE)
	NativeFileChooser_BROWSE_DIRECTORY       = NativeFileChooserType(C.go_FL_NativeFileChooser_BROWSE_DIRECTORY)
	NativeFileChooser_BROWSE_MULTI_FILE      = NativeFileChooserType(C.go_FL_NativeFileChooser_BROWSE_MULTI_FILE)
	NativeFileChooser_BROWSE_MULTI_DIRECTORY = NativeFileChooserType(C.go_FL_NativeFileChooser_BROWSE_MULTI_DIRECTORY)
	NativeFileChooser_BROWSE_SAVE_FILE       = NativeFileChooserType(C.go_FL_NativeFileChooser_BROWSE_SAVE_FILE)
	NativeFileChooser_BROWSE_SAVE_DIRECTORY  = NativeFileChooserType(C.go_FL_NativeFileChooser_BROWSE_SAVE_DIRECTORY)
)
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 (
	SCROLL_HORIZONTAL        = ScrollType(C.go_FL_SCROLL_HORIZONTAL)
	SCROLL_VERTICAL          = ScrollType(C.go_FL_SCROLL_VERTICAL)
	SCROLL_BOTH              = ScrollType(C.go_FL_SCROLL_BOTH)
	SCROLL_HORIZONTAL_ALWAYS = ScrollType(C.go_FL_SCROLL_HORIZONTAL_ALWAYS)
	SCROLL_VERTICAL_ALWAYS   = ScrollType(C.go_FL_SCROLL_VERTICAL_ALWAYS)
	SCROLL_BOTH_ALWAYS       = ScrollType(C.go_FL_SCROLL_BOTH_ALWAYS)
)
View Source
var (
	VERT_SLIDER      = SliderType(C.go_FL_VERT_SLIDER)
	HOR_SLIDER       = SliderType(C.go_FL_HOR_SLIDER)
	VERT_FILL_SLIDER = SliderType(C.go_FL_VERT_FILL_SLIDER)
	HOR_FILL_SLIDER  = SliderType(C.go_FL_HOR_FILL_SLIDER)
	VERT_NICE_SLIDER = SliderType(C.go_FL_VERT_NICE_SLIDER)
	HOR_NICE_SLIDER  = SliderType(C.go_FL_HOR_NICE_SLIDER)
)
View Source
var (
	OverflowCompress = Overflow(C.go_FL_OVERFLOW_COMPRESS)
	OverflowClip     = Overflow(C.go_FL_OVERFLOW_CLIP)
	OverflowPulldown = Overflow(C.go_FL_OVERFLOW_PULLDOWN)
	OverflowDrag     = Overflow(C.go_FL_OVERFLOW_DRAG)
)
View Source
var (
	TreeSelectNone            = TreeSelect(C.go_FL_TREE_SELECT_NONE)
	TreeSelectSingle          = TreeSelect(C.go_FL_TREE_SELECT_SINGLE)
	TreeSelectMulti           = TreeSelect(C.go_FL_TREE_SELECT_MULTI)
	TreeSelectSingleDraggable = TreeSelect(C.go_FL_TREE_SELECT_SINGLE_DRAGGABLE)
)
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 ErrDestroyed = errors.New("widget is destroyed")
View Source
var ErrFileChooserDestroyed = errors.New("file chooser is destroyed")
View Source
var ErrImageDataTooShort = errors.New("image data too short")
View Source
var ErrImageDecodingFailed = errors.New("image decoding failed")
View Source
var ErrImageDestroyed = errors.New("image is destroyed")
View Source
var ErrImageFileAccess = errors.New("image file access error")
View Source
var ErrImageMemoryAccess = errors.New("invalid memory access by image decoder")
View Source
var (
	ErrInvalidLine = errors.New("line doesn't exist")
)
View Source
var ErrNativeFileChooserDestroyed = errors.New("native file chooser is destroyed")
View Source
var ErrNoImage = errors.New("no image was found")
View Source
var ErrNoTextBufferAssociated = errors.New("there is no text buffer associated")
View Source
var ErrTextBufferDestroyed = errors.New("text buffer is destroyed")
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 AddTimeout

func AddTimeout(t float64, fn func())

AddTimeout adds a one-shot timeout callback. The function will be called by

Fl::wait() at t seconds after this function is called.
If you need more accurate, repeated timeouts, use RepeatTimeout() to
reschedule the subsequent timeouts.

func AreTooltipsEnabled

func AreTooltipsEnabled() bool

func Awake

func Awake(fn func()) bool

func AwakeNullMessage

func AwakeNullMessage()

func Check

func Check()

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 CopyToSelectionBuffer

func CopyToSelectionBuffer(text string)

func DisableTooltips

func DisableTooltips()

func DragAndDrop

func DragAndDrop()

func Draw

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

func DrawArc

func DrawArc(x, y, w, h int, a1, a2 float64)

func DrawArc2

func DrawArc2(x, y, r, start, end float64)

func DrawArrow

func DrawArrow(x, y, w, h int, arr ArrowType, orient Orientation, col Color)

func DrawBox

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

func DrawCheck

func DrawCheck(x, y, w, h int, col Color)

func DrawCirlce

func DrawCirlce(x, y, r float64)

func DrawFocusRect

func DrawFocusRect(x, y, w, h int)

func DrawLine

func DrawLine(x, y, x1, y1 int)

func DrawLine2

func DrawLine2(x, y, x1, y1, x2, y2 int)

func DrawLoop

func DrawLoop(x, y, x1, y1, x2, y2 int)

func DrawLoop2

func DrawLoop2(x, y, x1, y1, x2, y2, x3, y3 int)

func DrawPie

func DrawPie(x, y, w, h int, a1, a2 float64)

func DrawPoint

func DrawPoint(x, y int)

func DrawPolygon

func DrawPolygon(x, y, x1, y1, x2, y2 int)

func DrawPolygon2

func DrawPolygon2(x, y, x1, y1, x2, y2, x3, y3 int)

func DrawRect

func DrawRect(x, y, w, h int)

func DrawRectWithColor

func DrawRectWithColor(x, y, w, h int, col Color)

func DrawRectf

func DrawRectf(x, y, w, h int)

func DrawRectfWithColor

func DrawRectfWithColor(x, y, w, h int, col Color)

func DrawRtl

func DrawRtl(text string, x, y int)

func DrawTextAngled

func DrawTextAngled(text string, x, y, angle int)

func DrawXyLine

func DrawXyLine(x, y, x1 int)

func DrawXyLine2

func DrawXyLine2(x, y, x1, y2 int)

func DrawXyLine3

func DrawXyLine3(x, y, x1, y2, x3 int)

func DrawYxLine

func DrawYxLine(x, y, y1 int)

func DrawYxLine2

func DrawYxLine2(x, y, y1, x2 int)

func DrawYxLine3

func DrawYxLine3(x, y, y1, x2, y3 int)

func EnableTooltips

func EnableTooltips()

func EventButton1

func EventButton1() bool

func EventClicks

func EventClicks() int

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 EventText

func EventText() string

func EventX

func EventX() int

func EventXRoot

func EventXRoot() int

func EventY

func EventY() int

func EventYRoot

func EventYRoot() int

func GetFont

func GetFont(font Font) string

func GoVersion

func GoVersion() string

func InitStyles

func InitStyles()

func Lock

func Lock() bool

func MeasureText

func MeasureText(text string, draw_symbols bool) (int, int)
func MenuLinespacing() int

func MessageBox

func MessageBox(title, message string)

func PopClip

func PopClip()

func PushClip

func PushClip(x, y, w, h int)

func PushNoClip

func PushNoClip()

func RepeatTimeout

func RepeatTimeout(t float64, fn func())

RepeatTimeout repeats a timeout callback from the expiration of the

previous timeout, allowing for more accurate timing.
You may only call this method inside a timeout callback of the same timer
or at least a closely related timer, otherwise the timing accuracy can't
be improved and the behavior is undefined.

func Run

func Run() int

func ScreenCount

func ScreenCount() int

ScreenCount gets the total count of available screens.

func ScreenDPI

func ScreenDPI(screenNum int) (float32, float32)

ScreenDPI gets the screen resolution in dots-per-inch for the given screen.

func ScreenNum

func ScreenNum(x, y int) int

ScreenNum gets the screen number of a screen that contains the specified screen position x, y.

func ScreenScale

func ScreenScale(screenNum int) float32

ScreenScale gets current value of the GUI scaling factor for the given screen.

func ScreenWorkArea

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

ScreenWorkArea gets the bounding box of the work area of the given screen.

func ScrollbarSize

func ScrollbarSize() int

func SetBackground2Color

func SetBackground2Color(r, g, b uint8)

func SetBackgroundColor

func SetBackgroundColor(r, g, b uint8)

func SetBoxType

func SetBoxType(b BoxType, d func(int, int, int, int, Color), o ...int)

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 SetEventClicks

func SetEventClicks(i int)

func SetFont

func SetFont(fontNumber Font, fontName string)

SetFont assigns font specified by the name to the font number

func SetFont2

func SetFont2(font Font, font2 Font)

func SetFonts

func SetFonts(xstarname ...string) int

func SetForegroundColor

func SetForegroundColor(r, g, b uint8)

func SetKeyboardScreenScaling

func SetKeyboardScreenScaling(value bool)

SetKeyboardScreenScaling controls the possibility to scale all windows by ctrl/+/-/0/ or cmd/+/-/0/

func SetLineStyle

func SetLineStyle(style LineStyle, width int)

func SetMenuLinespacing

func SetMenuLinespacing(size int)

func SetScheme

func SetScheme(scheme string) int

func SetScreenScale

func SetScreenScale(screenNum int, scale float32)

SetScreenScale sets the value of the GUI scaling factor for the given screen.

func SetScrollbarSize

func SetScrollbarSize(size int)

func SetTooltipDelay

func SetTooltipDelay(delay float32)

SetTooltipDelay sets the tooltip delay in seconds

func TestShortcut

func TestShortcut(shortcut int) bool

func TextExtents

func TextExtents(text string) (int, int, int, int)

returns the dx, dy, w, h of the string

func TooltipDelay

func TooltipDelay() float32

func TooltipEnterArea

func TooltipEnterArea(wi Widget, x, y, w, h int, tip string)

func Unlock

func Unlock()

func Version

func Version() string

func Wait

func Wait(duration ...float64)

Types

type Align

type Align uint

type ArrowType

type ArrowType int

type BmpImage

type BmpImage struct {
	RgbImage
}

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) Draw

func (i *BmpImage) Draw(x, y, w, h int)

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) Changed

func (w *Box) Changed() uint

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) HasFocus

func (w *Box) HasFocus() bool

func (*Box) Hide

func (w *Box) Hide()

func (*Box) IsActive

func (w *Box) IsActive() bool

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) SetDrawHandler

func (w *Box) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Box) SetEventHandler

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

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) SetResizeHandler

func (w *Box) SetResizeHandler(handler func())

func (*Box) SetSelectionColor

func (w *Box) SetSelectionColor(color Color)

func (*Box) SetTooltip

func (w *Box) SetTooltip(text string)

func (*Box) SetType

func (w *Box) SetType(widgetType uint8)

func (*Box) Show

func (w *Box) Show()

func (*Box) TakeFocus

func (w *Box) TakeFocus() int

func (*Box) Type

func (w *Box) Type() uint8

func (*Box) Visible

func (w *Box) Visible() bool

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 Browser

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

func NewBrowser

func NewBrowser(x, y, w, h int, text ...string) *Browser

func (*Browser) Activate

func (w *Browser) Activate()

func (*Browser) Add

func (b *Browser) Add(str string)

func (*Browser) AddWithData

func (b *Browser) AddWithData(str string, data interface{})

func (*Browser) Align

func (w *Browser) Align() Align

func (*Browser) Box

func (w *Browser) Box() BoxType

func (*Browser) Changed

func (w *Browser) Changed() uint

func (*Browser) Clear

func (b *Browser) Clear()

func (*Browser) ClearVisibleFocus

func (w *Browser) ClearVisibleFocus()

func (*Browser) Color

func (w *Browser) Color() Color

func (*Browser) ColumnChar

func (b *Browser) ColumnChar() rune

func (*Browser) ColumnWidths

func (b *Browser) ColumnWidths() []int

Store column widths in Go instead of calling from C++ as it's complex and expensive to convert between them

func (*Browser) Data

func (b *Browser) Data(line int) interface{}

func (*Browser) Deactivate

func (w *Browser) Deactivate()

func (*Browser) Destroy

func (w *Browser) Destroy()

func (*Browser) Displayed

func (b *Browser) Displayed(line int) bool

func (*Browser) FormatChar

func (b *Browser) FormatChar() rune

func (*Browser) H

func (w *Browser) H() int

func (*Browser) HasFocus

func (w *Browser) HasFocus() bool

func (*Browser) Hide

func (w *Browser) Hide()

func (*Browser) HideLine

func (b *Browser) HideLine(line int) error

func (*Browser) Icon

func (b *Browser) Icon(line int) Image

func (*Browser) IsActive

func (w *Browser) IsActive() bool

func (*Browser) IsSelected

func (b *Browser) IsSelected(line int) bool

func (*Browser) Label

func (w *Browser) Label() string

func (*Browser) LabelColor

func (w *Browser) LabelColor() Color

func (*Browser) LabelFont

func (w *Browser) LabelFont() Font

func (*Browser) LabelSize

func (w *Browser) LabelSize() int

func (*Browser) LabelType

func (w *Browser) LabelType() LabelType

func (*Browser) MeasureLabel

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

func (*Browser) Parent

func (w *Browser) Parent() *Group

func (*Browser) Redraw

func (w *Browser) Redraw()

func (*Browser) Remove

func (b *Browser) Remove(line int) error

func (*Browser) Resize

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

func (*Browser) SelectionColor

func (w *Browser) SelectionColor() Color

func (*Browser) SetAlign

func (w *Browser) SetAlign(align Align)

func (*Browser) SetBottomLine

func (b *Browser) SetBottomLine(line int) error

func (*Browser) SetBox

func (w *Browser) SetBox(box BoxType)

func (*Browser) SetCallback

func (w *Browser) SetCallback(f func())

func (*Browser) SetCallbackCondition

func (w *Browser) SetCallbackCondition(when CallbackCondition)

func (*Browser) SetColor

func (w *Browser) SetColor(color Color)

func (*Browser) SetColumnChar

func (b *Browser) SetColumnChar(r rune)

func (*Browser) SetColumnWidths

func (b *Browser) SetColumnWidths(widths ...int)

func (*Browser) SetDeimage

func (w *Browser) SetDeimage(i Image)

func (*Browser) SetDrawHandler

func (w *Browser) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Browser) SetEventHandler

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

func (*Browser) SetFormatChar

func (b *Browser) SetFormatChar(r rune)

func (*Browser) SetIcon

func (b *Browser) SetIcon(line int, i Image)

func (*Browser) SetImage

func (w *Browser) SetImage(i Image)

func (*Browser) SetLabel

func (w *Browser) SetLabel(label string)

func (*Browser) SetLabelColor

func (w *Browser) SetLabelColor(col Color)

func (*Browser) SetLabelFont

func (w *Browser) SetLabelFont(font Font)

func (*Browser) SetLabelSize

func (w *Browser) SetLabelSize(size int)

func (*Browser) SetLabelType

func (w *Browser) SetLabelType(ltype LabelType)

func (*Browser) SetMiddleLine

func (b *Browser) SetMiddleLine(line int) error

func (*Browser) SetPosition

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

func (*Browser) SetResizeHandler

func (w *Browser) SetResizeHandler(handler func())

func (*Browser) SetSelected

func (b *Browser) SetSelected(line int, val bool) bool

func (*Browser) SetSelectionColor

func (w *Browser) SetSelectionColor(color Color)

func (*Browser) SetTooltip

func (w *Browser) SetTooltip(text string)

func (*Browser) SetTopLine

func (b *Browser) SetTopLine(line int) error

func (*Browser) SetType

func (w *Browser) SetType(widgetType uint8)

func (*Browser) SetValue

func (b *Browser) SetValue(line int)

func (*Browser) Show

func (w *Browser) Show()

func (*Browser) Size

func (b *Browser) Size() int

func (*Browser) TakeFocus

func (w *Browser) TakeFocus() int

func (*Browser) Text

func (b *Browser) Text(line int) string

func (*Browser) TopLine

func (b *Browser) TopLine() int

func (*Browser) Type

func (w *Browser) Type() uint8

func (*Browser) Value

func (b *Browser) Value() int

func (*Browser) Visible

func (w *Browser) Visible() bool

func (*Browser) W

func (w *Browser) W() int

func (*Browser) X

func (w *Browser) X() int

func (*Browser) Y

func (w *Browser) Y() 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) Changed

func (w *Button) Changed() uint

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) HasFocus

func (w *Button) HasFocus() bool

func (*Button) Hide

func (w *Button) Hide()

func (*Button) IsActive

func (w *Button) IsActive() bool

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) SetDrawHandler

func (w *Button) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Button) SetEventHandler

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

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) SetResizeHandler

func (w *Button) SetResizeHandler(handler func())

func (*Button) SetSelectionColor

func (w *Button) SetSelectionColor(color Color)

func (*Button) SetShortcut

func (b *Button) SetShortcut(shortcut int)

func (*Button) SetTooltip

func (w *Button) SetTooltip(text string)

func (*Button) SetType

func (w *Button) SetType(widgetType uint8)

func (*Button) SetValue

func (b *Button) SetValue(val bool)

func (*Button) Shortcut

func (b *Button) Shortcut() int

func (*Button) Show

func (w *Button) Show()

func (*Button) TakeFocus

func (w *Button) TakeFocus() int

func (*Button) Type

func (w *Button) Type() uint8

func (*Button) Value

func (b *Button) Value() bool

func (*Button) Visible

func (w *Button) Visible() 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 Chart

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

func NewChart

func NewChart(x, y, w, h int, text ...string) *Chart

func (*Chart) Activate

func (w *Chart) Activate()

func (*Chart) Add

func (c *Chart) Add(val float64, col Color, text ...string)

Add the data value val with optional label text and color col to the chart. When color not needed just pass zero

func (*Chart) Align

func (w *Chart) Align() Align

func (*Chart) Autosize

func (c *Chart) Autosize() bool

Autosize gets whether the chart will automatically adjust the bounds of the chart.

func (*Chart) Bounds

func (c *Chart) Bounds() (float64, float64)

Bounds gets the lower and upper bounds of the chart values.

func (*Chart) Box

func (w *Chart) Box() BoxType

func (*Chart) Changed

func (w *Chart) Changed() uint

func (*Chart) Clear

func (c *Chart) Clear()

func (*Chart) ClearVisibleFocus

func (w *Chart) ClearVisibleFocus()

func (*Chart) Color

func (w *Chart) Color() Color

func (*Chart) Deactivate

func (w *Chart) Deactivate()

func (*Chart) Destroy

func (w *Chart) Destroy()

func (*Chart) H

func (w *Chart) H() int

func (*Chart) HasFocus

func (w *Chart) HasFocus() bool

func (*Chart) Hide

func (w *Chart) Hide()

func (*Chart) Insert

func (c *Chart) Insert(index int, val float64, col Color, text ...string)

Insert inserts a data value val at the given position ind.

Position 1 is the first data value.

func (*Chart) IsActive

func (w *Chart) IsActive() bool

func (*Chart) Label

func (w *Chart) Label() string

func (*Chart) LabelColor

func (w *Chart) LabelColor() Color

func (*Chart) LabelFont

func (w *Chart) LabelFont() Font

func (*Chart) LabelSize

func (w *Chart) LabelSize() int

func (*Chart) LabelType

func (w *Chart) LabelType() LabelType

func (*Chart) MaxSize

func (c *Chart) MaxSize() int

MaxSize gets the maximum number of data values for a chart.

func (*Chart) MeasureLabel

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

func (*Chart) Parent

func (w *Chart) Parent() *Group

func (*Chart) Redraw

func (w *Chart) Redraw()

func (*Chart) Replace

func (c *Chart) Replace(index int, val float64, col Color, text ...string)

Replace replace a data value val at the given position index.

Position 1 is the first data value.

func (*Chart) Resize

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

func (*Chart) SelectionColor

func (w *Chart) SelectionColor() Color

func (*Chart) SetAlign

func (w *Chart) SetAlign(align Align)

func (*Chart) SetAutosize

func (c *Chart) SetAutosize(flag bool)

SetAutosize sets whether the chart will automatically adjust the bounds of the chart.

func (*Chart) SetBounds

func (c *Chart) SetBounds(a, b float64)

SetBounds sets the lower and upper bounds of the chart values.

func (*Chart) SetBox

func (w *Chart) SetBox(box BoxType)

func (*Chart) SetCallback

func (w *Chart) SetCallback(f func())

func (*Chart) SetCallbackCondition

func (w *Chart) SetCallbackCondition(when CallbackCondition)

func (*Chart) SetColor

func (w *Chart) SetColor(color Color)

func (*Chart) SetDeimage

func (w *Chart) SetDeimage(i Image)

func (*Chart) SetDrawHandler

func (w *Chart) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Chart) SetEventHandler

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

func (*Chart) SetImage

func (w *Chart) SetImage(i Image)

func (*Chart) SetLabel

func (w *Chart) SetLabel(label string)

func (*Chart) SetLabelColor

func (w *Chart) SetLabelColor(col Color)

func (*Chart) SetLabelFont

func (w *Chart) SetLabelFont(font Font)

func (*Chart) SetLabelSize

func (w *Chart) SetLabelSize(size int)

func (*Chart) SetLabelType

func (w *Chart) SetLabelType(ltype LabelType)

func (*Chart) SetMaxSize

func (c *Chart) SetMaxSize(m int)

SetMaxSize sets the maximum number of data values for a chart.

If you do not call this method then the chart will be allowed to grow to any size depending on available memory.

func (*Chart) SetPosition

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

func (*Chart) SetResizeHandler

func (w *Chart) SetResizeHandler(handler func())

func (*Chart) SetSelectionColor

func (w *Chart) SetSelectionColor(color Color)

func (*Chart) SetSize

func (c *Chart) SetSize(W, H int)

func (*Chart) SetTextColor

func (c *Chart) SetTextColor(color Color)

SetTextColor sets the chart's text color to color

func (*Chart) SetTextFont

func (c *Chart) SetTextFont(font Font)

SetTextFont sets the chart's text font to font.

func (*Chart) SetTextSize

func (c *Chart) SetTextSize(size int)

SetTextSize sets the chart's text font to size.

func (*Chart) SetTooltip

func (w *Chart) SetTooltip(text string)

func (*Chart) SetType

func (w *Chart) SetType(widgetType uint8)

func (*Chart) Show

func (w *Chart) Show()

func (*Chart) Size

func (c *Chart) Size() int

Size returns the number of data values in the chart.

func (*Chart) TakeFocus

func (w *Chart) TakeFocus() int

func (*Chart) TextColor

func (c *Chart) TextColor() Color

TextColor gets the chart's text color.

func (*Chart) TextFont

func (c *Chart) TextFont() Font

TextFont gets the chart's text font.

func (*Chart) TextSize

func (c *Chart) TextSize() int

TextSize gets the chart's text size.

func (*Chart) Type

func (w *Chart) Type() uint8

func (*Chart) Visible

func (w *Chart) Visible() bool

func (*Chart) W

func (w *Chart) W() int

func (*Chart) X

func (w *Chart) X() int

func (*Chart) Y

func (w *Chart) Y() int

type CheckBrowser

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

func NewCheckBrowser

func NewCheckBrowser(x, y, w, h int, text ...string) *CheckBrowser

func (*CheckBrowser) Activate

func (w *CheckBrowser) Activate()

func (*CheckBrowser) Add

func (b *CheckBrowser) Add(s string, checked bool)

func (*CheckBrowser) Align

func (w *CheckBrowser) Align() Align

func (*CheckBrowser) Box

func (w *CheckBrowser) Box() BoxType

func (*CheckBrowser) Changed

func (w *CheckBrowser) Changed() uint

func (*CheckBrowser) CheckedCount

func (b *CheckBrowser) CheckedCount() int

func (*CheckBrowser) Clear

func (b *CheckBrowser) Clear()

func (*CheckBrowser) ClearVisibleFocus

func (w *CheckBrowser) ClearVisibleFocus()

func (*CheckBrowser) Color

func (w *CheckBrowser) Color() Color

func (*CheckBrowser) Deactivate

func (w *CheckBrowser) Deactivate()

func (*CheckBrowser) Destroy

func (w *CheckBrowser) Destroy()

func (*CheckBrowser) H

func (w *CheckBrowser) H() int

func (*CheckBrowser) HasFocus

func (w *CheckBrowser) HasFocus() bool

func (*CheckBrowser) Hide

func (w *CheckBrowser) Hide()

func (*CheckBrowser) IsActive

func (w *CheckBrowser) IsActive() bool

func (*CheckBrowser) IsChecked

func (b *CheckBrowser) IsChecked(item int) bool

func (*CheckBrowser) ItemCount

func (b *CheckBrowser) ItemCount() int

func (*CheckBrowser) Label

func (w *CheckBrowser) Label() string

func (*CheckBrowser) LabelColor

func (w *CheckBrowser) LabelColor() Color

func (*CheckBrowser) LabelFont

func (w *CheckBrowser) LabelFont() Font

func (*CheckBrowser) LabelSize

func (w *CheckBrowser) LabelSize() int

func (*CheckBrowser) LabelType

func (w *CheckBrowser) LabelType() LabelType

func (*CheckBrowser) MeasureLabel

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

func (*CheckBrowser) Parent

func (w *CheckBrowser) Parent() *Group

func (*CheckBrowser) Redraw

func (w *CheckBrowser) Redraw()

func (*CheckBrowser) Remove

func (b *CheckBrowser) Remove(item int)

func (*CheckBrowser) Resize

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

func (*CheckBrowser) SelectionColor

func (w *CheckBrowser) SelectionColor() Color

func (*CheckBrowser) SetAlign

func (w *CheckBrowser) SetAlign(align Align)

func (*CheckBrowser) SetBox

func (w *CheckBrowser) SetBox(box BoxType)

func (*CheckBrowser) SetCallback

func (w *CheckBrowser) SetCallback(f func())

func (*CheckBrowser) SetCallbackCondition

func (w *CheckBrowser) SetCallbackCondition(when CallbackCondition)

func (*CheckBrowser) SetChecked

func (b *CheckBrowser) SetChecked(item int, checked bool)

func (*CheckBrowser) SetColor

func (w *CheckBrowser) SetColor(color Color)

func (*CheckBrowser) SetDeimage

func (w *CheckBrowser) SetDeimage(i Image)

func (*CheckBrowser) SetDrawHandler

func (w *CheckBrowser) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*CheckBrowser) SetEventHandler

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

func (*CheckBrowser) SetImage

func (w *CheckBrowser) SetImage(i Image)

func (*CheckBrowser) SetLabel

func (w *CheckBrowser) SetLabel(label string)

func (*CheckBrowser) SetLabelColor

func (w *CheckBrowser) SetLabelColor(col Color)

func (*CheckBrowser) SetLabelFont

func (w *CheckBrowser) SetLabelFont(font Font)

func (*CheckBrowser) SetLabelSize

func (w *CheckBrowser) SetLabelSize(size int)

func (*CheckBrowser) SetLabelType

func (w *CheckBrowser) SetLabelType(ltype LabelType)

func (*CheckBrowser) SetPosition

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

func (*CheckBrowser) SetResizeHandler

func (w *CheckBrowser) SetResizeHandler(handler func())

func (*CheckBrowser) SetSelectionColor

func (w *CheckBrowser) SetSelectionColor(color Color)

func (*CheckBrowser) SetTooltip

func (w *CheckBrowser) SetTooltip(text string)

func (*CheckBrowser) SetType

func (w *CheckBrowser) SetType(widgetType uint8)

func (*CheckBrowser) Show

func (w *CheckBrowser) Show()

func (*CheckBrowser) TakeFocus

func (w *CheckBrowser) TakeFocus() int

func (*CheckBrowser) Text

func (b *CheckBrowser) Text(item int) string

func (*CheckBrowser) Type

func (w *CheckBrowser) Type() uint8

func (*CheckBrowser) Visible

func (w *CheckBrowser) Visible() bool

func (*CheckBrowser) W

func (w *CheckBrowser) W() int

func (*CheckBrowser) X

func (w *CheckBrowser) X() int

func (*CheckBrowser) Y

func (w *CheckBrowser) Y() 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) Changed

func (w *CheckButton) Changed() uint

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) HasFocus

func (w *CheckButton) HasFocus() bool

func (*CheckButton) Hide

func (w *CheckButton) Hide()

func (*CheckButton) IsActive

func (w *CheckButton) IsActive() bool

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) SetDrawHandler

func (w *CheckButton) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*CheckButton) SetEventHandler

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

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) SetResizeHandler

func (w *CheckButton) SetResizeHandler(handler func())

func (*CheckButton) SetSelectionColor

func (w *CheckButton) SetSelectionColor(color Color)

func (*CheckButton) SetTooltip

func (w *CheckButton) SetTooltip(text string)

func (*CheckButton) SetType

func (w *CheckButton) SetType(widgetType uint8)

func (*CheckButton) Show

func (w *CheckButton) Show()

func (*CheckButton) TakeFocus

func (w *CheckButton) TakeFocus() int

func (*CheckButton) Type

func (w *CheckButton) Type() uint8

func (*CheckButton) Visible

func (w *CheckButton) Visible() bool

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

Add adds a new menu item with the given label that when chosen will execute the given callback. Returns the new item's index.

func (*Choice) AddEx

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

Add adds a new menu item with the given label and shortcut that when chosen (or when the shortcut is pressed) will execute the given callback. Set flags to fltk.MENU_DIVIDER to create a separator after this menu item. Returns the new item's index.

func (*Choice) AddExWithIcon

func (m *Choice) AddExWithIcon(label string, shortcut int, callback func(), flags int, img Image) int

func (*Choice) Clear

func (m *Choice) Clear()

Clear removes all the menu's items.

func (*Choice) Destroy

func (m *Choice) Destroy()

func (*Choice) FindIndex

func (m *Choice) FindIndex(label string) int

func (*Choice) Insert

func (m *Choice) Insert(index int, label string, callback func()) int

func (*Choice) InsertEx

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

func (*Choice) Remove

func (m *Choice) Remove(index int)

Removes removes the menu item at the given index position.

func (*Choice) Replace

func (m *Choice) Replace(index int, label string)

func (*Choice) SelectedText

func (m *Choice) SelectedText() string

SelectedText returns the title of the last item chosen by the user.

func (*Choice) SetValue

func (m *Choice) SetValue(value int)

func (*Choice) Size

func (m *Choice) Size() int

func (*Choice) Text

func (m *Choice) Text(index int) string

Text returns the title of the last item at index.

func (*Choice) Value

func (m *Choice) Value() int

Value returns index of the last item chosen by the user.

type Color

type Color uint

func ColorFromRgb

func ColorFromRgb(r, g, b uint8) Color

func (Color) Index

func (col Color) Index() uint

func (Color) RGB

func (col Color) RGB() (int, int, int)

func (Color) RGBI

func (col Color) RGBI() 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 Flex

type Flex struct {
	Group
}

func NewFlex

func NewFlex(x, y, w, h int, text ...string) *Flex

func (*Flex) Activate

func (w *Flex) Activate()

func (*Flex) Align

func (w *Flex) Align() Align

func (*Flex) Box

func (w *Flex) Box() BoxType

func (*Flex) Changed

func (w *Flex) Changed() uint

func (*Flex) ClearVisibleFocus

func (w *Flex) ClearVisibleFocus()

func (*Flex) Color

func (w *Flex) Color() Color

func (*Flex) Deactivate

func (w *Flex) Deactivate()

func (*Flex) Destroy

func (w *Flex) Destroy()

func (*Flex) End

func (f *Flex) End()

func (*Flex) Fixed

func (f *Flex) Fixed(w Widget, size int)

func (*Flex) H

func (w *Flex) H() int

func (*Flex) HasFocus

func (w *Flex) HasFocus() bool

func (*Flex) Hide

func (w *Flex) Hide()

func (*Flex) IsActive

func (w *Flex) IsActive() bool

func (*Flex) Label

func (w *Flex) Label() string

func (*Flex) LabelColor

func (w *Flex) LabelColor() Color

func (*Flex) LabelFont

func (w *Flex) LabelFont() Font

func (*Flex) LabelSize

func (w *Flex) LabelSize() int

func (*Flex) LabelType

func (w *Flex) LabelType() LabelType

func (*Flex) Layout

func (f *Flex) Layout()

Layout calculates the layout of the widget and redraws it.

func (*Flex) Margin

func (f *Flex) Margin() int

func (*Flex) MeasureLabel

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

func (*Flex) Parent

func (w *Flex) Parent() *Group

func (*Flex) Redraw

func (w *Flex) Redraw()

func (*Flex) Resize

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

func (*Flex) SelectionColor

func (w *Flex) SelectionColor() Color

func (*Flex) SetAlign

func (w *Flex) SetAlign(align Align)

func (*Flex) SetBox

func (w *Flex) SetBox(box BoxType)

func (*Flex) SetCallback

func (w *Flex) SetCallback(f func())

func (*Flex) SetCallbackCondition

func (w *Flex) SetCallbackCondition(when CallbackCondition)

func (*Flex) SetColor

func (w *Flex) SetColor(color Color)

func (*Flex) SetDeimage

func (w *Flex) SetDeimage(i Image)

func (*Flex) SetDrawHandler

func (w *Flex) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Flex) SetEventHandler

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

func (*Flex) SetGap

func (f *Flex) SetGap(spacing int)

func (*Flex) SetImage

func (w *Flex) SetImage(i Image)

func (*Flex) SetLabel

func (w *Flex) SetLabel(label string)

func (*Flex) SetLabelColor

func (w *Flex) SetLabelColor(col Color)

func (*Flex) SetLabelFont

func (w *Flex) SetLabelFont(font Font)

func (*Flex) SetLabelSize

func (w *Flex) SetLabelSize(size int)

func (*Flex) SetLabelType

func (w *Flex) SetLabelType(ltype LabelType)

func (*Flex) SetMargin

func (f *Flex) SetMargin(margin int, gap ...int)

func (*Flex) SetPosition

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

func (*Flex) SetResizeHandler

func (w *Flex) SetResizeHandler(handler func())

func (*Flex) SetSelectionColor

func (w *Flex) SetSelectionColor(color Color)

func (*Flex) SetSpacing

func (f *Flex) SetSpacing(spacing int)

func (*Flex) SetTooltip

func (w *Flex) SetTooltip(text string)

func (*Flex) SetType

func (f *Flex) SetType(flexType FlexType)

func (*Flex) Show

func (w *Flex) Show()

func (*Flex) Spacing

func (f *Flex) Spacing() int

func (*Flex) TakeFocus

func (w *Flex) TakeFocus() int

func (*Flex) Type

func (w *Flex) Type() uint8

func (*Flex) Visible

func (w *Flex) Visible() bool

func (*Flex) W

func (w *Flex) W() int

func (*Flex) X

func (w *Flex) X() int

func (*Flex) Y

func (w *Flex) Y() int

type FlexType

type FlexType uint8

type FloatInput

type FloatInput struct {
	Input
}

func NewFloatInput

func NewFloatInput(x, y, w, h int, text ...string) *FloatInput

func NewIntInput

func NewIntInput(x, y, w, h int, text ...string) *FloatInput

func (*FloatInput) Activate

func (w *FloatInput) Activate()

func (*FloatInput) Align

func (w *FloatInput) Align() Align

func (*FloatInput) Box

func (w *FloatInput) Box() BoxType

func (*FloatInput) Changed

func (w *FloatInput) Changed() uint

func (*FloatInput) ClearVisibleFocus

func (w *FloatInput) ClearVisibleFocus()

func (*FloatInput) Color

func (w *FloatInput) Color() Color

func (*FloatInput) Deactivate

func (w *FloatInput) Deactivate()

func (*FloatInput) Destroy

func (w *FloatInput) Destroy()

func (*FloatInput) H

func (w *FloatInput) H() int

func (*FloatInput) HasFocus

func (w *FloatInput) HasFocus() bool

func (*FloatInput) Hide

func (w *FloatInput) Hide()

func (*FloatInput) IsActive

func (w *FloatInput) IsActive() bool

func (*FloatInput) Label

func (w *FloatInput) Label() string

func (*FloatInput) LabelColor

func (w *FloatInput) LabelColor() Color

func (*FloatInput) LabelFont

func (w *FloatInput) LabelFont() Font

func (*FloatInput) LabelSize

func (w *FloatInput) LabelSize() int

func (*FloatInput) LabelType

func (w *FloatInput) LabelType() LabelType

func (*FloatInput) MeasureLabel

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

func (*FloatInput) Parent

func (w *FloatInput) Parent() *Group

func (*FloatInput) Redraw

func (w *FloatInput) Redraw()

func (*FloatInput) SelectionColor

func (w *FloatInput) SelectionColor() Color

func (*FloatInput) SetAlign

func (w *FloatInput) SetAlign(align Align)

func (*FloatInput) SetBox

func (w *FloatInput) SetBox(box BoxType)

func (*FloatInput) SetCallback

func (w *FloatInput) SetCallback(f func())

func (*FloatInput) SetCallbackCondition

func (w *FloatInput) SetCallbackCondition(when CallbackCondition)

func (*FloatInput) SetColor

func (w *FloatInput) SetColor(color Color)

func (*FloatInput) SetDeimage

func (w *FloatInput) SetDeimage(i Image)

func (*FloatInput) SetDrawHandler

func (w *FloatInput) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*FloatInput) SetEventHandler

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

func (*FloatInput) SetImage

func (w *FloatInput) SetImage(i Image)

func (*FloatInput) SetLabel

func (w *FloatInput) SetLabel(label string)

func (*FloatInput) SetLabelColor

func (w *FloatInput) SetLabelColor(col Color)

func (*FloatInput) SetLabelFont

func (w *FloatInput) SetLabelFont(font Font)

func (*FloatInput) SetLabelSize

func (w *FloatInput) SetLabelSize(size int)

func (*FloatInput) SetLabelType

func (w *FloatInput) SetLabelType(ltype LabelType)

func (*FloatInput) SetPosition

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

func (*FloatInput) SetResizeHandler

func (w *FloatInput) SetResizeHandler(handler func())

func (*FloatInput) SetSelectionColor

func (w *FloatInput) SetSelectionColor(color Color)

func (*FloatInput) SetTooltip

func (w *FloatInput) SetTooltip(text string)

func (*FloatInput) SetType

func (w *FloatInput) SetType(widgetType uint8)

func (*FloatInput) Show

func (w *FloatInput) Show()

func (*FloatInput) TakeFocus

func (w *FloatInput) TakeFocus() int

func (*FloatInput) Type

func (w *FloatInput) Type() uint8

func (*FloatInput) Visible

func (w *FloatInput) Visible() bool

func (*FloatInput) W

func (w *FloatInput) W() int

func (*FloatInput) X

func (w *FloatInput) X() int

func (*FloatInput) Y

func (w *FloatInput) Y() int

type Font

type Font int

func DrawFont

func DrawFont() (Font, int)

func GetFontName

func GetFontName(font Font) (string, Font)

GetFontName Returs human readable font name and a font attribute (BOLD, ITALIC or BOLD_ITALIC).

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) Changed

func (w *GlWindow) Changed() uint

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) HasFocus

func (w *GlWindow) HasFocus() bool

func (*GlWindow) Hide

func (w *GlWindow) Hide()

func (*GlWindow) IsActive

func (w *GlWindow) IsActive() bool

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) SetDrawHandler

func (w *GlWindow) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

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) SetTooltip

func (w *GlWindow) SetTooltip(text string)

func (*GlWindow) SetType

func (w *GlWindow) SetType(widgetType uint8)

func (*GlWindow) TakeFocus

func (w *GlWindow) TakeFocus() int

func (*GlWindow) Type

func (w *GlWindow) Type() uint8

func (*GlWindow) Valid

func (w *GlWindow) Valid() bool

func (*GlWindow) Visible

func (w *GlWindow) Visible() 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 Grid

type Grid struct {
	Group
}

func NewGrid

func NewGrid(x, y, w, h int, text ...string) *Grid

func (*Grid) Activate

func (w *Grid) Activate()

func (*Grid) Align

func (w *Grid) Align() Align

func (*Grid) Box

func (w *Grid) Box() BoxType

func (*Grid) Changed

func (w *Grid) Changed() uint

func (*Grid) ClearVisibleFocus

func (w *Grid) ClearVisibleFocus()

func (*Grid) Color

func (w *Grid) Color() Color

func (*Grid) ColumnGap

func (g *Grid) ColumnGap(column int) int

func (*Grid) ColumnWeight

func (g *Grid) ColumnWeight(column int) int

func (*Grid) Deactivate

func (w *Grid) Deactivate()

func (*Grid) Destroy

func (w *Grid) Destroy()

func (*Grid) H

func (w *Grid) H() int

func (*Grid) HasFocus

func (w *Grid) HasFocus() bool

func (*Grid) Hide

func (w *Grid) Hide()

func (*Grid) IsActive

func (w *Grid) IsActive() bool

func (*Grid) Label

func (w *Grid) Label() string

func (*Grid) LabelColor

func (w *Grid) LabelColor() Color

func (*Grid) LabelFont

func (w *Grid) LabelFont() Font

func (*Grid) LabelSize

func (w *Grid) LabelSize() int

func (*Grid) LabelType

func (w *Grid) LabelType() LabelType

func (*Grid) MeasureLabel

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

func (*Grid) Parent

func (w *Grid) Parent() *Group

func (*Grid) Redraw

func (w *Grid) Redraw()

func (*Grid) Resize

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

func (*Grid) RowGap

func (g *Grid) RowGap(row int) int

func (*Grid) RowWeight

func (g *Grid) RowWeight(row int) int

func (*Grid) SelectionColor

func (w *Grid) SelectionColor() Color

func (*Grid) SetAlign

func (w *Grid) SetAlign(align Align)

func (*Grid) SetBox

func (w *Grid) SetBox(box BoxType)

func (*Grid) SetCallback

func (w *Grid) SetCallback(f func())

func (*Grid) SetCallbackCondition

func (w *Grid) SetCallbackCondition(when CallbackCondition)

func (*Grid) SetColor

func (w *Grid) SetColor(color Color)

func (*Grid) SetColumnGap

func (g *Grid) SetColumnGap(column, gap int)

func (*Grid) SetColumnWeight

func (g *Grid) SetColumnWeight(column, weight int)

func (*Grid) SetDeimage

func (w *Grid) SetDeimage(i Image)

func (*Grid) SetDrawHandler

func (w *Grid) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Grid) SetEventHandler

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

func (*Grid) SetImage

func (w *Grid) SetImage(i Image)

func (*Grid) SetLabel

func (w *Grid) SetLabel(label string)

func (*Grid) SetLabelColor

func (w *Grid) SetLabelColor(col Color)

func (*Grid) SetLabelFont

func (w *Grid) SetLabelFont(font Font)

func (*Grid) SetLabelSize

func (w *Grid) SetLabelSize(size int)

func (*Grid) SetLabelType

func (w *Grid) SetLabelType(ltype LabelType)

func (*Grid) SetLayout

func (g *Grid) SetLayout(rows, columns, margin, gap int)

func (*Grid) SetPosition

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

func (*Grid) SetResizeHandler

func (w *Grid) SetResizeHandler(handler func())

func (*Grid) SetRowGap

func (g *Grid) SetRowGap(row, gap int)

func (*Grid) SetRowWeight

func (g *Grid) SetRowWeight(row, weight int)

func (*Grid) SetSelectionColor

func (w *Grid) SetSelectionColor(color Color)

func (*Grid) SetShowGrid

func (g *Grid) SetShowGrid(show bool)

func (*Grid) SetShowGridAndColor

func (g *Grid) SetShowGridAndColor(show bool, color Color)

func (*Grid) SetTooltip

func (w *Grid) SetTooltip(text string)

func (*Grid) SetType

func (w *Grid) SetType(widgetType uint8)

func (*Grid) SetWidget

func (g *Grid) SetWidget(w Widget, row, column int, align GridAlign)

func (*Grid) SetWidgetWithSpan

func (g *Grid) SetWidgetWithSpan(w Widget, row, column, rowSpan, columnSpan int, align GridAlign)

func (*Grid) Show

func (w *Grid) Show()

func (*Grid) TakeFocus

func (w *Grid) TakeFocus() int

func (*Grid) Type

func (w *Grid) Type() uint8

func (*Grid) Visible

func (w *Grid) Visible() bool

func (*Grid) W

func (w *Grid) W() int

func (*Grid) X

func (w *Grid) X() int

func (*Grid) Y

func (w *Grid) Y() int

type GridAlign

type GridAlign 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) Changed

func (w *Group) Changed() uint

func (*Group) Child

func (g *Group) Child(index int) *widget

func (*Group) ChildCount

func (g *Group) ChildCount() int

func (*Group) Children

func (g *Group) Children() []*widget

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) DrawChildren

func (g *Group) DrawChildren()

func (*Group) End

func (g *Group) End()

func (*Group) H

func (w *Group) H() int

func (*Group) HasFocus

func (w *Group) HasFocus() bool

func (*Group) Hide

func (w *Group) Hide()

func (*Group) IsActive

func (w *Group) IsActive() bool

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) Remove

func (g *Group) Remove(w Widget)

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) SetDrawHandler

func (w *Group) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Group) SetEventHandler

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

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) SetResizeHandler

func (w *Group) SetResizeHandler(handler func())

func (*Group) SetSelectionColor

func (w *Group) SetSelectionColor(color Color)

func (*Group) SetTooltip

func (w *Group) SetTooltip(text string)

func (*Group) SetType

func (w *Group) SetType(widgetType uint8)

func (*Group) Show

func (w *Group) Show()

func (*Group) TakeFocus

func (w *Group) TakeFocus() int

func (*Group) Type

func (w *Group) Type() uint8

func (*Group) Visible

func (w *Group) Visible() bool

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 HelpView

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

func NewHelpView

func NewHelpView(x, y, w, h int, text ...string) *HelpView

func (*HelpView) Activate

func (w *HelpView) Activate()

func (*HelpView) Align

func (w *HelpView) Align() Align

func (*HelpView) Box

func (w *HelpView) Box() BoxType

func (*HelpView) Changed

func (w *HelpView) Changed() uint

func (*HelpView) ClearVisibleFocus

func (w *HelpView) ClearVisibleFocus()

func (*HelpView) Color

func (w *HelpView) Color() Color

func (*HelpView) Deactivate

func (w *HelpView) Deactivate()

func (*HelpView) Destroy

func (w *HelpView) Destroy()

func (*HelpView) Directory

func (h *HelpView) Directory() string

func (*HelpView) Filename

func (h *HelpView) Filename() string

func (*HelpView) Find

func (h *HelpView) Find(str string, i ...int) int

func (*HelpView) H

func (w *HelpView) H() int

func (*HelpView) HasFocus

func (w *HelpView) HasFocus() bool

func (*HelpView) Hide

func (w *HelpView) Hide()

func (*HelpView) IsActive

func (w *HelpView) IsActive() bool

func (*HelpView) Label

func (w *HelpView) Label() string

func (*HelpView) LabelColor

func (w *HelpView) LabelColor() Color

func (*HelpView) LabelFont

func (w *HelpView) LabelFont() Font

func (*HelpView) LabelSize

func (w *HelpView) LabelSize() int

func (*HelpView) LabelType

func (w *HelpView) LabelType() LabelType

func (*HelpView) LeftLine

func (h *HelpView) LeftLine() int

func (*HelpView) Load

func (h *HelpView) Load(f string)

func (*HelpView) MeasureLabel

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

func (*HelpView) Parent

func (w *HelpView) Parent() *Group

func (*HelpView) Redraw

func (w *HelpView) Redraw()

func (*HelpView) Resize

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

func (*HelpView) SelectionColor

func (w *HelpView) SelectionColor() Color

func (*HelpView) SetAlign

func (w *HelpView) SetAlign(align Align)

func (*HelpView) SetBox

func (w *HelpView) SetBox(box BoxType)

func (*HelpView) SetCallback

func (w *HelpView) SetCallback(f func())

func (*HelpView) SetCallbackCondition

func (w *HelpView) SetCallbackCondition(when CallbackCondition)

func (*HelpView) SetColor

func (w *HelpView) SetColor(color Color)

func (*HelpView) SetDeimage

func (w *HelpView) SetDeimage(i Image)

func (*HelpView) SetDrawHandler

func (w *HelpView) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*HelpView) SetEventHandler

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

func (*HelpView) SetImage

func (w *HelpView) SetImage(i Image)

func (*HelpView) SetLabel

func (w *HelpView) SetLabel(label string)

func (*HelpView) SetLabelColor

func (w *HelpView) SetLabelColor(col Color)

func (*HelpView) SetLabelFont

func (w *HelpView) SetLabelFont(font Font)

func (*HelpView) SetLabelSize

func (w *HelpView) SetLabelSize(size int)

func (*HelpView) SetLabelType

func (w *HelpView) SetLabelType(ltype LabelType)

func (*HelpView) SetLeftLine

func (h *HelpView) SetLeftLine(i int)

func (*HelpView) SetPosition

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

func (*HelpView) SetResizeHandler

func (w *HelpView) SetResizeHandler(handler func())

func (*HelpView) SetSelectionColor

func (w *HelpView) SetSelectionColor(color Color)

func (*HelpView) SetTooltip

func (w *HelpView) SetTooltip(text string)

func (*HelpView) SetTopLine

func (h *HelpView) SetTopLine(i int)

func (*HelpView) SetTopLineString

func (h *HelpView) SetTopLineString(str string)

func (*HelpView) SetType

func (w *HelpView) SetType(widgetType uint8)

func (*HelpView) SetValue

func (h *HelpView) SetValue(str string)

func (*HelpView) Show

func (w *HelpView) Show()

func (*HelpView) TakeFocus

func (w *HelpView) TakeFocus() int

func (*HelpView) TextColor

func (h *HelpView) TextColor(col Color)

func (*HelpView) TextFont

func (h *HelpView) TextFont(font Font)

func (*HelpView) TextSize

func (h *HelpView) TextSize(size int)

func (*HelpView) TopLine

func (h *HelpView) TopLine() int

func (*HelpView) Type

func (w *HelpView) Type() uint8

func (*HelpView) Value

func (h *HelpView) Value() string

func (*HelpView) Visible

func (w *HelpView) Visible() bool

func (*HelpView) W

func (w *HelpView) W() int

func (*HelpView) X

func (w *HelpView) X() int

func (*HelpView) Y

func (w *HelpView) Y() int

type HoldBrowser

type HoldBrowser struct {
	Browser
}

func NewHoldBrowser

func NewHoldBrowser(x, y, w, h int, text ...string) *HoldBrowser

func (*HoldBrowser) Activate

func (w *HoldBrowser) Activate()

func (*HoldBrowser) Align

func (w *HoldBrowser) Align() Align

func (*HoldBrowser) Box

func (w *HoldBrowser) Box() BoxType

func (*HoldBrowser) Changed

func (w *HoldBrowser) Changed() uint

func (*HoldBrowser) ClearVisibleFocus

func (w *HoldBrowser) ClearVisibleFocus()

func (*HoldBrowser) Color

func (w *HoldBrowser) Color() Color

func (*HoldBrowser) Deactivate

func (w *HoldBrowser) Deactivate()

func (*HoldBrowser) Destroy

func (w *HoldBrowser) Destroy()

func (*HoldBrowser) H

func (w *HoldBrowser) H() int

func (*HoldBrowser) HasFocus

func (w *HoldBrowser) HasFocus() bool

func (*HoldBrowser) Hide

func (w *HoldBrowser) Hide()

func (*HoldBrowser) IsActive

func (w *HoldBrowser) IsActive() bool

func (*HoldBrowser) Label

func (w *HoldBrowser) Label() string

func (*HoldBrowser) LabelColor

func (w *HoldBrowser) LabelColor() Color

func (*HoldBrowser) LabelFont

func (w *HoldBrowser) LabelFont() Font

func (*HoldBrowser) LabelSize

func (w *HoldBrowser) LabelSize() int

func (*HoldBrowser) LabelType

func (w *HoldBrowser) LabelType() LabelType

func (*HoldBrowser) MeasureLabel

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

func (*HoldBrowser) Parent

func (w *HoldBrowser) Parent() *Group

func (*HoldBrowser) Redraw

func (w *HoldBrowser) Redraw()

func (*HoldBrowser) Resize

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

func (*HoldBrowser) SelectionColor

func (w *HoldBrowser) SelectionColor() Color

func (*HoldBrowser) SetAlign

func (w *HoldBrowser) SetAlign(align Align)

func (*HoldBrowser) SetBox

func (w *HoldBrowser) SetBox(box BoxType)

func (*HoldBrowser) SetCallback

func (w *HoldBrowser) SetCallback(f func())

func (*HoldBrowser) SetCallbackCondition

func (w *HoldBrowser) SetCallbackCondition(when CallbackCondition)

func (*HoldBrowser) SetColor

func (w *HoldBrowser) SetColor(color Color)

func (*HoldBrowser) SetDeimage

func (w *HoldBrowser) SetDeimage(i Image)

func (*HoldBrowser) SetDrawHandler

func (w *HoldBrowser) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*HoldBrowser) SetEventHandler

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

func (*HoldBrowser) SetImage

func (w *HoldBrowser) SetImage(i Image)

func (*HoldBrowser) SetLabel

func (w *HoldBrowser) SetLabel(label string)

func (*HoldBrowser) SetLabelColor

func (w *HoldBrowser) SetLabelColor(col Color)

func (*HoldBrowser) SetLabelFont

func (w *HoldBrowser) SetLabelFont(font Font)

func (*HoldBrowser) SetLabelSize

func (w *HoldBrowser) SetLabelSize(size int)

func (*HoldBrowser) SetLabelType

func (w *HoldBrowser) SetLabelType(ltype LabelType)

func (*HoldBrowser) SetPosition

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

func (*HoldBrowser) SetResizeHandler

func (w *HoldBrowser) SetResizeHandler(handler func())

func (*HoldBrowser) SetSelectionColor

func (w *HoldBrowser) SetSelectionColor(color Color)

func (*HoldBrowser) SetTooltip

func (w *HoldBrowser) SetTooltip(text string)

func (*HoldBrowser) SetType

func (w *HoldBrowser) SetType(widgetType uint8)

func (*HoldBrowser) Show

func (w *HoldBrowser) Show()

func (*HoldBrowser) TakeFocus

func (w *HoldBrowser) TakeFocus() int

func (*HoldBrowser) Type

func (w *HoldBrowser) Type() uint8

func (*HoldBrowser) Visible

func (w *HoldBrowser) Visible() bool

func (*HoldBrowser) W

func (w *HoldBrowser) W() int

func (*HoldBrowser) X

func (w *HoldBrowser) X() int

func (*HoldBrowser) Y

func (w *HoldBrowser) 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) Changed

func (w *Input) Changed() uint

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) HasFocus

func (w *Input) HasFocus() bool

func (*Input) Hide

func (w *Input) Hide()

func (*Input) InsertPosition

func (i *Input) InsertPosition() int

func (*Input) IsActive

func (w *Input) IsActive() bool

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) Mark

func (i *Input) Mark() int

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) SetDrawHandler

func (w *Input) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Input) SetEventHandler

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

func (*Input) SetImage

func (w *Input) SetImage(i Image)

func (*Input) SetInsertPosition

func (i *Input) SetInsertPosition(pos, mark int)

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) SetResizeHandler

func (w *Input) SetResizeHandler(handler func())

func (*Input) SetSelectionColor

func (w *Input) SetSelectionColor(color Color)

func (*Input) SetTooltip

func (w *Input) SetTooltip(text string)

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) TakeFocus

func (w *Input) TakeFocus() int

func (*Input) Type

func (w *Input) Type() uint8

func (*Input) Value

func (i *Input) Value() string

func (*Input) Visible

func (w *Input) Visible() bool

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 InputChoice

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

func NewInputChoice

func NewInputChoice(x, y, w, h int, text ...string) *InputChoice

func (*InputChoice) Activate

func (w *InputChoice) Activate()

func (*InputChoice) Align

func (w *InputChoice) Align() Align

func (*InputChoice) Box

func (w *InputChoice) Box() BoxType

func (*InputChoice) Changed

func (w *InputChoice) Changed() uint

func (*InputChoice) Clear

func (c *InputChoice) Clear()

func (*InputChoice) ClearVisibleFocus

func (w *InputChoice) ClearVisibleFocus()

func (*InputChoice) Color

func (w *InputChoice) Color() Color

func (*InputChoice) Deactivate

func (w *InputChoice) Deactivate()

func (*InputChoice) Destroy

func (w *InputChoice) Destroy()

func (*InputChoice) H

func (w *InputChoice) H() int

func (*InputChoice) HasFocus

func (w *InputChoice) HasFocus() bool

func (*InputChoice) Hide

func (w *InputChoice) Hide()

func (*InputChoice) Input

func (c *InputChoice) Input() *Input

func (*InputChoice) IsActive

func (w *InputChoice) IsActive() bool

func (*InputChoice) Label

func (w *InputChoice) Label() string

func (*InputChoice) LabelColor

func (w *InputChoice) LabelColor() Color

func (*InputChoice) LabelFont

func (w *InputChoice) LabelFont() Font

func (*InputChoice) LabelSize

func (w *InputChoice) LabelSize() int

func (*InputChoice) LabelType

func (w *InputChoice) LabelType() LabelType

func (*InputChoice) MeasureLabel

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

func (*InputChoice) MenuButton

func (c *InputChoice) MenuButton() *MenuButton

func (*InputChoice) Parent

func (w *InputChoice) Parent() *Group

func (*InputChoice) Redraw

func (w *InputChoice) Redraw()

func (*InputChoice) Resize

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

func (*InputChoice) SelectionColor

func (w *InputChoice) SelectionColor() Color

func (*InputChoice) SetAlign

func (w *InputChoice) SetAlign(align Align)

func (*InputChoice) SetBox

func (w *InputChoice) SetBox(box BoxType)

func (*InputChoice) SetCallback

func (w *InputChoice) SetCallback(f func())

func (*InputChoice) SetCallbackCondition

func (w *InputChoice) SetCallbackCondition(when CallbackCondition)

func (*InputChoice) SetColor

func (w *InputChoice) SetColor(color Color)

func (*InputChoice) SetDeimage

func (w *InputChoice) SetDeimage(i Image)

func (*InputChoice) SetDrawHandler

func (w *InputChoice) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*InputChoice) SetEventHandler

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

func (*InputChoice) SetImage

func (w *InputChoice) SetImage(i Image)

func (*InputChoice) SetLabel

func (w *InputChoice) SetLabel(label string)

func (*InputChoice) SetLabelColor

func (w *InputChoice) SetLabelColor(col Color)

func (*InputChoice) SetLabelFont

func (w *InputChoice) SetLabelFont(font Font)

func (*InputChoice) SetLabelSize

func (w *InputChoice) SetLabelSize(size int)

func (*InputChoice) SetLabelType

func (w *InputChoice) SetLabelType(ltype LabelType)

func (*InputChoice) SetPosition

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

func (*InputChoice) SetResizeHandler

func (w *InputChoice) SetResizeHandler(handler func())

func (*InputChoice) SetSelectionColor

func (w *InputChoice) SetSelectionColor(color Color)

func (*InputChoice) SetTooltip

func (w *InputChoice) SetTooltip(text string)

func (*InputChoice) SetType

func (w *InputChoice) SetType(widgetType uint8)

func (*InputChoice) SetValue

func (c *InputChoice) SetValue(label string)

func (*InputChoice) SetValueIndex

func (c *InputChoice) SetValueIndex(index int)

func (*InputChoice) Show

func (w *InputChoice) Show()

func (*InputChoice) TakeFocus

func (w *InputChoice) TakeFocus() int

func (*InputChoice) Type

func (w *InputChoice) Type() uint8

func (*InputChoice) UpdateMenuButton

func (c *InputChoice) UpdateMenuButton() bool

func (*InputChoice) Value

func (c *InputChoice) Value() string

func (*InputChoice) Visible

func (w *InputChoice) Visible() bool

func (*InputChoice) W

func (w *InputChoice) W() int

func (*InputChoice) X

func (w *InputChoice) X() int

func (*InputChoice) Y

func (w *InputChoice) Y() int

type JpegImage

type JpegImage struct {
	RgbImage
}

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) Draw

func (i *JpegImage) Draw(x, y, w, h int)

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 LightButton

type LightButton struct {
	Button
}

func NewLightButton

func NewLightButton(x, y, w, h int, text ...string) *LightButton

func (*LightButton) Activate

func (w *LightButton) Activate()

func (*LightButton) Align

func (w *LightButton) Align() Align

func (*LightButton) Box

func (w *LightButton) Box() BoxType

func (*LightButton) Changed

func (w *LightButton) Changed() uint

func (*LightButton) ClearVisibleFocus

func (w *LightButton) ClearVisibleFocus()

func (*LightButton) Color

func (w *LightButton) Color() Color

func (*LightButton) Deactivate

func (w *LightButton) Deactivate()

func (*LightButton) Destroy

func (w *LightButton) Destroy()

func (*LightButton) H

func (w *LightButton) H() int

func (*LightButton) HasFocus

func (w *LightButton) HasFocus() bool

func (*LightButton) Hide

func (w *LightButton) Hide()

func (*LightButton) IsActive

func (w *LightButton) IsActive() bool

func (*LightButton) Label

func (w *LightButton) Label() string

func (*LightButton) LabelColor

func (w *LightButton) LabelColor() Color

func (*LightButton) LabelFont

func (w *LightButton) LabelFont() Font

func (*LightButton) LabelSize

func (w *LightButton) LabelSize() int

func (*LightButton) LabelType

func (w *LightButton) LabelType() LabelType

func (*LightButton) MeasureLabel

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

func (*LightButton) Parent

func (w *LightButton) Parent() *Group

func (*LightButton) Redraw

func (w *LightButton) Redraw()

func (*LightButton) Resize

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

func (*LightButton) SelectionColor

func (w *LightButton) SelectionColor() Color

func (*LightButton) SetAlign

func (w *LightButton) SetAlign(align Align)

func (*LightButton) SetBox

func (w *LightButton) SetBox(box BoxType)

func (*LightButton) SetCallback

func (w *LightButton) SetCallback(f func())

func (*LightButton) SetCallbackCondition

func (w *LightButton) SetCallbackCondition(when CallbackCondition)

func (*LightButton) SetColor

func (w *LightButton) SetColor(color Color)

func (*LightButton) SetDeimage

func (w *LightButton) SetDeimage(i Image)

func (*LightButton) SetDrawHandler

func (w *LightButton) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*LightButton) SetEventHandler

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

func (*LightButton) SetImage

func (w *LightButton) SetImage(i Image)

func (*LightButton) SetLabel

func (w *LightButton) SetLabel(label string)

func (*LightButton) SetLabelColor

func (w *LightButton) SetLabelColor(col Color)

func (*LightButton) SetLabelFont

func (w *LightButton) SetLabelFont(font Font)

func (*LightButton) SetLabelSize

func (w *LightButton) SetLabelSize(size int)

func (*LightButton) SetLabelType

func (w *LightButton) SetLabelType(ltype LabelType)

func (*LightButton) SetPosition

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

func (*LightButton) SetResizeHandler

func (w *LightButton) SetResizeHandler(handler func())

func (*LightButton) SetSelectionColor

func (w *LightButton) SetSelectionColor(color Color)

func (*LightButton) SetTooltip

func (w *LightButton) SetTooltip(text string)

func (*LightButton) SetType

func (w *LightButton) SetType(widgetType uint8)

func (*LightButton) Show

func (w *LightButton) Show()

func (*LightButton) TakeFocus

func (w *LightButton) TakeFocus() int

func (*LightButton) Type

func (w *LightButton) Type() uint8

func (*LightButton) Visible

func (w *LightButton) Visible() bool

func (*LightButton) W

func (w *LightButton) W() int

func (*LightButton) X

func (w *LightButton) X() int

func (*LightButton) Y

func (w *LightButton) Y() int

type LineStyle

type LineStyle 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

Add adds a new menu item with the given label that when chosen will execute the given callback. Returns the new item's index.

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

Add adds a new menu item with the given label and shortcut that when chosen (or when the shortcut is pressed) will execute the given callback. Set flags to fltk.MENU_DIVIDER to create a separator after this menu item. Returns the new item's index.

func (m *MenuBar) AddExWithIcon(label string, shortcut int, callback func(), flags int, img Image) int
func (m *MenuBar) Clear()

Clear removes all the menu's items.

func (m *MenuBar) Destroy()
func (m *MenuBar) FindIndex(label string) int
func (m *MenuBar) Insert(index int, label string, callback func()) int
func (m *MenuBar) InsertEx(index int, label string, shortcut int, callback func(), flags int) int
func (m *MenuBar) Remove(index int)

Removes removes the menu item at the given index position.

func (m *MenuBar) Replace(index int, label string)
func (m *MenuBar) SelectedText() string

SelectedText returns the title of the last item chosen by the user.

func (m *MenuBar) SetValue(value int)
func (m *MenuBar) Size() int
func (m *MenuBar) Text(index int) string

Text returns the title of the last item at index.

func (m *MenuBar) Value() int

Value returns index of the last item chosen by the user.

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

Add adds a new menu item with the given label that when chosen will execute the given callback. Returns the new item's index.

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

Add adds a new menu item with the given label and shortcut that when chosen (or when the shortcut is pressed) will execute the given callback. Set flags to fltk.MENU_DIVIDER to create a separator after this menu item. Returns the new item's index.

func (m *MenuButton) AddExWithIcon(label string, shortcut int, callback func(), flags int, img Image) int
func (m *MenuButton) Clear()

Clear removes all the menu's items.

func (m *MenuButton) Destroy()
func (m *MenuButton) FindIndex(label string) int
func (m *MenuButton) Insert(index int, label string, callback func()) int
func (m *MenuButton) InsertEx(index int, label string, shortcut int, callback func(), flags int) int
func (m *MenuButton) Popup()
func (m *MenuButton) Remove(index int)

Removes removes the menu item at the given index position.

func (m *MenuButton) Replace(index int, label string)
func (m *MenuButton) SelectedText() string

SelectedText returns the title of the last item chosen by the user.

func (m *MenuButton) SetType(menuType MenuType)
func (m *MenuButton) SetValue(value int)
func (m *MenuButton) Size() int
func (m *MenuButton) Text(index int) string

Text returns the title of the last item at index.

func (m *MenuButton) Value() int

Value returns index of the last item chosen by the user.

type MenuType int

type MouseButton

type MouseButton int

func EventButton

func EventButton() MouseButton

type MultiBrowser

type MultiBrowser struct {
	Browser
}

func NewMultiBrowser

func NewMultiBrowser(x, y, w, h int, text ...string) *MultiBrowser

func (*MultiBrowser) Activate

func (w *MultiBrowser) Activate()

func (*MultiBrowser) Align

func (w *MultiBrowser) Align() Align

func (*MultiBrowser) Box

func (w *MultiBrowser) Box() BoxType

func (*MultiBrowser) Changed

func (w *MultiBrowser) Changed() uint

func (*MultiBrowser) ClearVisibleFocus

func (w *MultiBrowser) ClearVisibleFocus()

func (*MultiBrowser) Color

func (w *MultiBrowser) Color() Color

func (*MultiBrowser) Deactivate

func (w *MultiBrowser) Deactivate()

func (*MultiBrowser) Destroy

func (w *MultiBrowser) Destroy()

func (*MultiBrowser) H

func (w *MultiBrowser) H() int

func (*MultiBrowser) HasFocus

func (w *MultiBrowser) HasFocus() bool

func (*MultiBrowser) Hide

func (w *MultiBrowser) Hide()

func (*MultiBrowser) IsActive

func (w *MultiBrowser) IsActive() bool

func (*MultiBrowser) Label

func (w *MultiBrowser) Label() string

func (*MultiBrowser) LabelColor

func (w *MultiBrowser) LabelColor() Color

func (*MultiBrowser) LabelFont

func (w *MultiBrowser) LabelFont() Font

func (*MultiBrowser) LabelSize

func (w *MultiBrowser) LabelSize() int

func (*MultiBrowser) LabelType

func (w *MultiBrowser) LabelType() LabelType

func (*MultiBrowser) MeasureLabel

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

func (*MultiBrowser) Parent

func (w *MultiBrowser) Parent() *Group

func (*MultiBrowser) Redraw

func (w *MultiBrowser) Redraw()

func (*MultiBrowser) Resize

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

func (*MultiBrowser) SelectionColor

func (w *MultiBrowser) SelectionColor() Color

func (*MultiBrowser) SetAlign

func (w *MultiBrowser) SetAlign(align Align)

func (*MultiBrowser) SetBox

func (w *MultiBrowser) SetBox(box BoxType)

func (*MultiBrowser) SetCallback

func (w *MultiBrowser) SetCallback(f func())

func (*MultiBrowser) SetCallbackCondition

func (w *MultiBrowser) SetCallbackCondition(when CallbackCondition)

func (*MultiBrowser) SetColor

func (w *MultiBrowser) SetColor(color Color)

func (*MultiBrowser) SetDeimage

func (w *MultiBrowser) SetDeimage(i Image)

func (*MultiBrowser) SetDrawHandler

func (w *MultiBrowser) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*MultiBrowser) SetEventHandler

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

func (*MultiBrowser) SetImage

func (w *MultiBrowser) SetImage(i Image)

func (*MultiBrowser) SetLabel

func (w *MultiBrowser) SetLabel(label string)

func (*MultiBrowser) SetLabelColor

func (w *MultiBrowser) SetLabelColor(col Color)

func (*MultiBrowser) SetLabelFont

func (w *MultiBrowser) SetLabelFont(font Font)

func (*MultiBrowser) SetLabelSize

func (w *MultiBrowser) SetLabelSize(size int)

func (*MultiBrowser) SetLabelType

func (w *MultiBrowser) SetLabelType(ltype LabelType)

func (*MultiBrowser) SetPosition

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

func (*MultiBrowser) SetResizeHandler

func (w *MultiBrowser) SetResizeHandler(handler func())

func (*MultiBrowser) SetSelectionColor

func (w *MultiBrowser) SetSelectionColor(color Color)

func (*MultiBrowser) SetTooltip

func (w *MultiBrowser) SetTooltip(text string)

func (*MultiBrowser) SetType

func (w *MultiBrowser) SetType(widgetType uint8)

func (*MultiBrowser) Show

func (w *MultiBrowser) Show()

func (*MultiBrowser) TakeFocus

func (w *MultiBrowser) TakeFocus() int

func (*MultiBrowser) Type

func (w *MultiBrowser) Type() uint8

func (*MultiBrowser) Visible

func (w *MultiBrowser) Visible() bool

func (*MultiBrowser) W

func (w *MultiBrowser) W() int

func (*MultiBrowser) X

func (w *MultiBrowser) X() int

func (*MultiBrowser) Y

func (w *MultiBrowser) Y() int

type NativeFileChooser

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

func NewNativeFileChooser

func NewNativeFileChooser() *NativeFileChooser

func (*NativeFileChooser) Count

func (c *NativeFileChooser) Count() int

func (*NativeFileChooser) Destroy

func (c *NativeFileChooser) Destroy()

func (*NativeFileChooser) Directory

func (c *NativeFileChooser) Directory() string

func (*NativeFileChooser) Filenames

func (c *NativeFileChooser) Filenames() []string

func (*NativeFileChooser) Filter

func (c *NativeFileChooser) Filter() string

func (*NativeFileChooser) FilterCount

func (c *NativeFileChooser) FilterCount() int

func (*NativeFileChooser) FilterValue

func (c *NativeFileChooser) FilterValue() int

func (*NativeFileChooser) Options

func (c *NativeFileChooser) Options() int

func (*NativeFileChooser) PresetFile

func (c *NativeFileChooser) PresetFile() string

func (*NativeFileChooser) SetDirectory

func (c *NativeFileChooser) SetDirectory(directory string)

func (*NativeFileChooser) SetFilter

func (c *NativeFileChooser) SetFilter(filter string)

func (*NativeFileChooser) SetFilterValue

func (c *NativeFileChooser) SetFilterValue(v int)

func (*NativeFileChooser) SetOptions

func (c *NativeFileChooser) SetOptions(options int)

func (*NativeFileChooser) SetPresetFile

func (c *NativeFileChooser) SetPresetFile(presetFile string)

func (*NativeFileChooser) SetTitle

func (c *NativeFileChooser) SetTitle(title string)

func (*NativeFileChooser) SetType

func (c *NativeFileChooser) SetType(typ NativeFileChooserType)

func (*NativeFileChooser) Show

func (c *NativeFileChooser) Show() int

func (*NativeFileChooser) Title

func (c *NativeFileChooser) Title() string

func (*NativeFileChooser) Type

type NativeFileChooserType

type NativeFileChooserType int

type Offscreen

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

func NewOffscreen

func NewOffscreen(w, h int) *Offscreen

func (*Offscreen) Begin

func (offs *Offscreen) Begin()

func (*Offscreen) Copy

func (offs *Offscreen) Copy(x, y, w, h, srcx, srcy int)

func (*Offscreen) Delete

func (offs *Offscreen) Delete()

func (*Offscreen) End

func (offs *Offscreen) End()

func (*Offscreen) IsValid

func (offs *Offscreen) IsValid() bool

func (*Offscreen) Rescale

func (offs *Offscreen) Rescale()

type Orientation

type Orientation int

type Output

type Output struct {
	Input
}

func NewOutput

func NewOutput(x, y, w, h int, text ...string) *Output

func (*Output) Activate

func (w *Output) Activate()

func (*Output) Align

func (w *Output) Align() Align

func (*Output) Box

func (w *Output) Box() BoxType

func (*Output) Changed

func (w *Output) Changed() uint

func (*Output) ClearVisibleFocus

func (w *Output) ClearVisibleFocus()

func (*Output) Color

func (w *Output) Color() Color

func (*Output) Deactivate

func (w *Output) Deactivate()

func (*Output) Destroy

func (w *Output) Destroy()

func (*Output) H

func (w *Output) H() int

func (*Output) HasFocus

func (w *Output) HasFocus() bool

func (*Output) Hide

func (w *Output) Hide()

func (*Output) IsActive

func (w *Output) IsActive() bool

func (*Output) Label

func (w *Output) Label() string

func (*Output) LabelColor

func (w *Output) LabelColor() Color

func (*Output) LabelFont

func (w *Output) LabelFont() Font

func (*Output) LabelSize

func (w *Output) LabelSize() int

func (*Output) LabelType

func (w *Output) LabelType() LabelType

func (*Output) MeasureLabel

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

func (*Output) Parent

func (w *Output) Parent() *Group

func (*Output) Redraw

func (w *Output) Redraw()

func (*Output) SelectionColor

func (w *Output) SelectionColor() Color

func (*Output) SetAlign

func (w *Output) SetAlign(align Align)

func (*Output) SetBox

func (w *Output) SetBox(box BoxType)

func (*Output) SetCallback

func (w *Output) SetCallback(f func())

func (*Output) SetCallbackCondition

func (w *Output) SetCallbackCondition(when CallbackCondition)

func (*Output) SetColor

func (w *Output) SetColor(color Color)

func (*Output) SetDeimage

func (w *Output) SetDeimage(i Image)

func (*Output) SetDrawHandler

func (w *Output) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Output) SetEventHandler

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

func (*Output) SetImage

func (w *Output) SetImage(i Image)

func (*Output) SetLabel

func (w *Output) SetLabel(label string)

func (*Output) SetLabelColor

func (w *Output) SetLabelColor(col Color)

func (*Output) SetLabelFont

func (w *Output) SetLabelFont(font Font)

func (*Output) SetLabelSize

func (w *Output) SetLabelSize(size int)

func (*Output) SetLabelType

func (w *Output) SetLabelType(ltype LabelType)

func (*Output) SetPosition

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

func (*Output) SetResizeHandler

func (w *Output) SetResizeHandler(handler func())

func (*Output) SetSelectionColor

func (w *Output) SetSelectionColor(color Color)

func (*Output) SetTooltip

func (w *Output) SetTooltip(text string)

func (*Output) SetType

func (w *Output) SetType(widgetType uint8)

func (*Output) Show

func (w *Output) Show()

func (*Output) TakeFocus

func (w *Output) TakeFocus() int

func (*Output) Type

func (w *Output) Type() uint8

func (*Output) Visible

func (w *Output) Visible() bool

func (*Output) W

func (w *Output) W() int

func (*Output) X

func (w *Output) X() int

func (*Output) Y

func (w *Output) Y() int

type Overflow

type Overflow int

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) Changed

func (w *Pack) Changed() uint

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) HasFocus

func (w *Pack) HasFocus() bool

func (*Pack) Hide

func (w *Pack) Hide()

func (*Pack) IsActive

func (w *Pack) IsActive() bool

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) SetDrawHandler

func (w *Pack) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Pack) SetEventHandler

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

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) SetResizeHandler

func (w *Pack) SetResizeHandler(handler func())

func (*Pack) SetSelectionColor

func (w *Pack) SetSelectionColor(color Color)

func (*Pack) SetSpacing

func (p *Pack) SetSpacing(spacing int)

func (*Pack) SetTooltip

func (w *Pack) SetTooltip(text string)

func (*Pack) SetType

func (p *Pack) SetType(packType PackType)

func (*Pack) Show

func (w *Pack) Show()

func (*Pack) Spacing

func (p *Pack) Spacing() int

func (*Pack) TakeFocus

func (w *Pack) TakeFocus() int

func (*Pack) Type

func (w *Pack) Type() uint8

func (*Pack) Visible

func (w *Pack) Visible() bool

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 {
	RgbImage
}

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) Draw

func (i *PngImage) Draw(x, y, w, h int)

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) Changed

func (w *Progress) Changed() uint

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) HasFocus

func (w *Progress) HasFocus() bool

func (*Progress) Hide

func (w *Progress) Hide()

func (*Progress) IsActive

func (w *Progress) IsActive() bool

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) Maximum

func (p *Progress) Maximum() float64

func (*Progress) MeasureLabel

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

func (*Progress) Minimum

func (p *Progress) Minimum() float64

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) SetDrawHandler

func (w *Progress) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Progress) SetEventHandler

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

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) SetResizeHandler

func (w *Progress) SetResizeHandler(handler func())

func (*Progress) SetSelectionColor

func (w *Progress) SetSelectionColor(color Color)

func (*Progress) SetTooltip

func (w *Progress) SetTooltip(text string)

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) TakeFocus

func (w *Progress) TakeFocus() int

func (*Progress) Type

func (w *Progress) Type() uint8

func (*Progress) Value

func (p *Progress) Value() float64

func (*Progress) Visible

func (w *Progress) Visible() bool

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) Changed

func (w *RadioButton) Changed() uint

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) HasFocus

func (w *RadioButton) HasFocus() bool

func (*RadioButton) Hide

func (w *RadioButton) Hide()

func (*RadioButton) IsActive

func (w *RadioButton) IsActive() bool

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) SetDrawHandler

func (w *RadioButton) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*RadioButton) SetEventHandler

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

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) SetResizeHandler

func (w *RadioButton) SetResizeHandler(handler func())

func (*RadioButton) SetSelectionColor

func (w *RadioButton) SetSelectionColor(color Color)

func (*RadioButton) SetTooltip

func (w *RadioButton) SetTooltip(text string)

func (*RadioButton) SetType

func (w *RadioButton) SetType(widgetType uint8)

func (*RadioButton) Show

func (w *RadioButton) Show()

func (*RadioButton) TakeFocus

func (w *RadioButton) TakeFocus() int

func (*RadioButton) Type

func (w *RadioButton) Type() uint8

func (*RadioButton) Visible

func (w *RadioButton) Visible() bool

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) Changed

func (w *RadioRoundButton) Changed() uint

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) HasFocus

func (w *RadioRoundButton) HasFocus() bool

func (*RadioRoundButton) Hide

func (w *RadioRoundButton) Hide()

func (*RadioRoundButton) IsActive

func (w *RadioRoundButton) IsActive() bool

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) SetDrawHandler

func (w *RadioRoundButton) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*RadioRoundButton) SetEventHandler

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

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) SetResizeHandler

func (w *RadioRoundButton) SetResizeHandler(handler func())

func (*RadioRoundButton) SetSelectionColor

func (w *RadioRoundButton) SetSelectionColor(color Color)

func (*RadioRoundButton) SetTooltip

func (w *RadioRoundButton) SetTooltip(text string)

func (*RadioRoundButton) SetType

func (w *RadioRoundButton) SetType(widgetType uint8)

func (*RadioRoundButton) Show

func (w *RadioRoundButton) Show()

func (*RadioRoundButton) TakeFocus

func (w *RadioRoundButton) TakeFocus() int

func (*RadioRoundButton) Type

func (w *RadioRoundButton) Type() uint8

func (*RadioRoundButton) Visible

func (w *RadioRoundButton) Visible() bool

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) Changed

func (w *ReturnButton) Changed() uint

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) HasFocus

func (w *ReturnButton) HasFocus() bool

func (*ReturnButton) Hide

func (w *ReturnButton) Hide()

func (*ReturnButton) IsActive

func (w *ReturnButton) IsActive() bool

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) SetDrawHandler

func (w *ReturnButton) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*ReturnButton) SetEventHandler

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

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) SetResizeHandler

func (w *ReturnButton) SetResizeHandler(handler func())

func (*ReturnButton) SetSelectionColor

func (w *ReturnButton) SetSelectionColor(color Color)

func (*ReturnButton) SetTooltip

func (w *ReturnButton) SetTooltip(text string)

func (*ReturnButton) SetType

func (w *ReturnButton) SetType(widgetType uint8)

func (*ReturnButton) Show

func (w *ReturnButton) Show()

func (*ReturnButton) TakeFocus

func (w *ReturnButton) TakeFocus() int

func (*ReturnButton) Type

func (w *ReturnButton) Type() uint8

func (*ReturnButton) Visible

func (w *ReturnButton) Visible() bool

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 NewRgbImageFromImage

func NewRgbImageFromImage(image goimage.Image) (*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) Draw

func (i *RgbImage) Draw(x, y, w, h int)

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 Roller

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

func NewRoller

func NewRoller(x, y, w, h int, text ...string) *Roller

func (*Roller) SetMaximum

func (v *Roller) SetMaximum(value float64)

func (*Roller) SetMinimum

func (v *Roller) SetMinimum(value float64)

func (*Roller) SetStep

func (v *Roller) SetStep(value float64)

func (*Roller) SetValue

func (v *Roller) SetValue(value float64)

func (*Roller) Value

func (v *Roller) Value() float64

type RowSelectMode

type RowSelectMode int

type Scroll

type Scroll struct {
	Group
}

func NewScroll

func NewScroll(x, y, w, h int, text ...string) *Scroll

func (*Scroll) Activate

func (w *Scroll) Activate()

func (*Scroll) Align

func (w *Scroll) Align() Align

func (*Scroll) Box

func (w *Scroll) Box() BoxType

func (*Scroll) Changed

func (w *Scroll) Changed() uint

func (*Scroll) ClearVisibleFocus

func (w *Scroll) ClearVisibleFocus()

func (*Scroll) Color

func (w *Scroll) Color() Color

func (*Scroll) Deactivate

func (w *Scroll) Deactivate()

func (*Scroll) Destroy

func (w *Scroll) Destroy()

func (*Scroll) H

func (w *Scroll) H() int

func (*Scroll) HasFocus

func (w *Scroll) HasFocus() bool

func (*Scroll) Hide

func (w *Scroll) Hide()

func (*Scroll) IsActive

func (w *Scroll) IsActive() bool

func (*Scroll) Label

func (w *Scroll) Label() string

func (*Scroll) LabelColor

func (w *Scroll) LabelColor() Color

func (*Scroll) LabelFont

func (w *Scroll) LabelFont() Font

func (*Scroll) LabelSize

func (w *Scroll) LabelSize() int

func (*Scroll) LabelType

func (w *Scroll) LabelType() LabelType

func (*Scroll) MeasureLabel

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

func (*Scroll) Parent

func (w *Scroll) Parent() *Group

func (*Scroll) Redraw

func (w *Scroll) Redraw()

func (*Scroll) Resize

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

func (*Scroll) ScrollTo

func (s *Scroll) ScrollTo(x, y int)

func (*Scroll) SelectionColor

func (w *Scroll) SelectionColor() Color

func (*Scroll) SetAlign

func (w *Scroll) SetAlign(align Align)

func (*Scroll) SetBox

func (w *Scroll) SetBox(box BoxType)

func (*Scroll) SetCallback

func (w *Scroll) SetCallback(f func())

func (*Scroll) SetCallbackCondition

func (w *Scroll) SetCallbackCondition(when CallbackCondition)

func (*Scroll) SetColor

func (w *Scroll) SetColor(color Color)

func (*Scroll) SetDeimage

func (w *Scroll) SetDeimage(i Image)

func (*Scroll) SetDrawHandler

func (w *Scroll) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Scroll) SetEventHandler

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

func (*Scroll) SetImage

func (w *Scroll) SetImage(i Image)

func (*Scroll) SetLabel

func (w *Scroll) SetLabel(label string)

func (*Scroll) SetLabelColor

func (w *Scroll) SetLabelColor(col Color)

func (*Scroll) SetLabelFont

func (w *Scroll) SetLabelFont(font Font)

func (*Scroll) SetLabelSize

func (w *Scroll) SetLabelSize(size int)

func (*Scroll) SetLabelType

func (w *Scroll) SetLabelType(ltype LabelType)

func (*Scroll) SetPosition

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

func (*Scroll) SetResizeHandler

func (w *Scroll) SetResizeHandler(handler func())

func (*Scroll) SetSelectionColor

func (w *Scroll) SetSelectionColor(color Color)

func (*Scroll) SetTooltip

func (w *Scroll) SetTooltip(text string)

func (*Scroll) SetType

func (s *Scroll) SetType(scrollType ScrollType)

func (*Scroll) Show

func (w *Scroll) Show()

func (*Scroll) TakeFocus

func (w *Scroll) TakeFocus() int

func (*Scroll) Type

func (w *Scroll) Type() uint8

func (*Scroll) Visible

func (w *Scroll) Visible() bool

func (*Scroll) W

func (w *Scroll) W() int

func (*Scroll) X

func (w *Scroll) X() int

func (*Scroll) XPosition

func (s *Scroll) XPosition() int

func (*Scroll) Y

func (w *Scroll) Y() int

func (*Scroll) YPosition

func (s *Scroll) YPosition() int

type ScrollType

type ScrollType uint8

type SelectBrowser

type SelectBrowser struct {
	Browser
}

func NewSelectBrowser

func NewSelectBrowser(x, y, w, h int, text ...string) *SelectBrowser

func (*SelectBrowser) Activate

func (w *SelectBrowser) Activate()

func (*SelectBrowser) Align

func (w *SelectBrowser) Align() Align

func (*SelectBrowser) Box

func (w *SelectBrowser) Box() BoxType

func (*SelectBrowser) Changed

func (w *SelectBrowser) Changed() uint

func (*SelectBrowser) ClearVisibleFocus

func (w *SelectBrowser) ClearVisibleFocus()

func (*SelectBrowser) Color

func (w *SelectBrowser) Color() Color

func (*SelectBrowser) Deactivate

func (w *SelectBrowser) Deactivate()

func (*SelectBrowser) Destroy

func (w *SelectBrowser) Destroy()

func (*SelectBrowser) H

func (w *SelectBrowser) H() int

func (*SelectBrowser) HasFocus

func (w *SelectBrowser) HasFocus() bool

func (*SelectBrowser) Hide

func (w *SelectBrowser) Hide()

func (*SelectBrowser) IsActive

func (w *SelectBrowser) IsActive() bool

func (*SelectBrowser) Label

func (w *SelectBrowser) Label() string

func (*SelectBrowser) LabelColor

func (w *SelectBrowser) LabelColor() Color

func (*SelectBrowser) LabelFont

func (w *SelectBrowser) LabelFont() Font

func (*SelectBrowser) LabelSize

func (w *SelectBrowser) LabelSize() int

func (*SelectBrowser) LabelType

func (w *SelectBrowser) LabelType() LabelType

func (*SelectBrowser) MeasureLabel

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

func (*SelectBrowser) Parent

func (w *SelectBrowser) Parent() *Group

func (*SelectBrowser) Redraw

func (w *SelectBrowser) Redraw()

func (*SelectBrowser) Resize

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

func (*SelectBrowser) SelectionColor

func (w *SelectBrowser) SelectionColor() Color

func (*SelectBrowser) SetAlign

func (w *SelectBrowser) SetAlign(align Align)

func (*SelectBrowser) SetBox

func (w *SelectBrowser) SetBox(box BoxType)

func (*SelectBrowser) SetCallback

func (w *SelectBrowser) SetCallback(f func())

func (*SelectBrowser) SetCallbackCondition

func (w *SelectBrowser) SetCallbackCondition(when CallbackCondition)

func (*SelectBrowser) SetColor

func (w *SelectBrowser) SetColor(color Color)

func (*SelectBrowser) SetDeimage

func (w *SelectBrowser) SetDeimage(i Image)

func (*SelectBrowser) SetDrawHandler

func (w *SelectBrowser) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*SelectBrowser) SetEventHandler

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

func (*SelectBrowser) SetImage

func (w *SelectBrowser) SetImage(i Image)

func (*SelectBrowser) SetLabel

func (w *SelectBrowser) SetLabel(label string)

func (*SelectBrowser) SetLabelColor

func (w *SelectBrowser) SetLabelColor(col Color)

func (*SelectBrowser) SetLabelFont

func (w *SelectBrowser) SetLabelFont(font Font)

func (*SelectBrowser) SetLabelSize

func (w *SelectBrowser) SetLabelSize(size int)

func (*SelectBrowser) SetLabelType

func (w *SelectBrowser) SetLabelType(ltype LabelType)

func (*SelectBrowser) SetPosition

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

func (*SelectBrowser) SetResizeHandler

func (w *SelectBrowser) SetResizeHandler(handler func())

func (*SelectBrowser) SetSelectionColor

func (w *SelectBrowser) SetSelectionColor(color Color)

func (*SelectBrowser) SetTooltip

func (w *SelectBrowser) SetTooltip(text string)

func (*SelectBrowser) SetType

func (w *SelectBrowser) SetType(widgetType uint8)

func (*SelectBrowser) Show

func (w *SelectBrowser) Show()

func (*SelectBrowser) TakeFocus

func (w *SelectBrowser) TakeFocus() int

func (*SelectBrowser) Type

func (w *SelectBrowser) Type() uint8

func (*SelectBrowser) Visible

func (w *SelectBrowser) Visible() bool

func (*SelectBrowser) W

func (w *SelectBrowser) W() int

func (*SelectBrowser) X

func (w *SelectBrowser) X() int

func (*SelectBrowser) Y

func (w *SelectBrowser) Y() 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) Draw

func (i *SharedImage) Draw(x, y, w, h int)

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 Slider

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

func NewSlider

func NewSlider(x, y, w, h int, text ...string) *Slider

func (*Slider) SetMaximum

func (v *Slider) SetMaximum(value float64)

func (*Slider) SetMinimum

func (v *Slider) SetMinimum(value float64)

func (*Slider) SetStep

func (v *Slider) SetStep(value float64)

func (*Slider) SetType

func (s *Slider) SetType(sliderType SliderType)

func (*Slider) SetValue

func (v *Slider) SetValue(value float64)

func (*Slider) Value

func (v *Slider) Value() float64

type SliderType

type SliderType uint8

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) Changed

func (w *Spinner) Changed() uint

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) HasFocus

func (w *Spinner) HasFocus() bool

func (*Spinner) Hide

func (w *Spinner) Hide()

func (*Spinner) IsActive

func (w *Spinner) IsActive() bool

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) SetDrawHandler

func (w *Spinner) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Spinner) SetEventHandler

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

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) SetResizeHandler

func (w *Spinner) SetResizeHandler(handler func())

func (*Spinner) SetSelectionColor

func (w *Spinner) SetSelectionColor(color Color)

func (*Spinner) SetStep

func (s *Spinner) SetStep(step float64)

func (*Spinner) SetTooltip

func (w *Spinner) SetTooltip(text string)

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) TakeFocus

func (w *Spinner) TakeFocus() int

func (*Spinner) Type

func (w *Spinner) Type() uint8

func (*Spinner) Value

func (s *Spinner) Value() float64

func (*Spinner) Visible

func (w *Spinner) Visible() bool

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 StyleTableEntry

type StyleTableEntry struct {
	Color Color
	Font  Font
	Size  int
}

type SvgImage

type SvgImage struct {
	RgbImage
}

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) Draw

func (i *SvgImage) Draw(x, y, w, h int)

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) CallbackColumn

func (t *TableRow) CallbackColumn() int

func (*TableRow) CallbackContext

func (t *TableRow) CallbackContext() TableContext

func (*TableRow) CallbackRow

func (t *TableRow) CallbackRow() int

func (*TableRow) ColumnHeaderHeight

func (t *TableRow) ColumnHeaderHeight() 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) RowAndColumnFromCursor

func (t *TableRow) RowAndColumnFromCursor() (row, col int)

func (*TableRow) RowCount

func (t *TableRow) RowCount() int

func (*TableRow) RowHeaderWidth

func (t *TableRow) RowHeaderWidth() int

func (*TableRow) ScrollbarSize

func (t *TableRow) ScrollbarSize() int

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) SetColumnHeaderHeight

func (t *TableRow) SetColumnHeaderHeight(size 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) SetRowCount

func (t *TableRow) SetRowCount(rowCount int)

func (*TableRow) SetRowHeaderWidth

func (t *TableRow) SetRowHeaderWidth(size int)

func (*TableRow) SetRowHeight

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

func (*TableRow) SetRowHeightAll

func (t *TableRow) SetRowHeightAll(height int)

func (*TableRow) SetScrollbarSize

func (t *TableRow) SetScrollbarSize(size int)

func (*TableRow) SetTopRow

func (t *TableRow) SetTopRow(row int)

func (*TableRow) SetType

func (t *TableRow) SetType(tableType RowSelectMode)

func (*TableRow) TopRow

func (t *TableRow) TopRow() int

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) Changed

func (w *Tabs) Changed() uint

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) HasFocus

func (w *Tabs) HasFocus() bool

func (*Tabs) Hide

func (w *Tabs) Hide()

func (*Tabs) IsActive

func (w *Tabs) IsActive() bool

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) SetDrawHandler

func (w *Tabs) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Tabs) SetEventHandler

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

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) SetOverflow

func (t *Tabs) SetOverflow(overflow Overflow)

func (*Tabs) SetPosition

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

func (*Tabs) SetResizeHandler

func (w *Tabs) SetResizeHandler(handler func())

func (*Tabs) SetSelectionColor

func (w *Tabs) SetSelectionColor(color Color)

func (*Tabs) SetTooltip

func (w *Tabs) SetTooltip(text string)

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) TakeFocus

func (w *Tabs) TakeFocus() int

func (*Tabs) Type

func (w *Tabs) Type() uint8

func (*Tabs) Value

func (t *Tabs) Value() int

func (*Tabs) Visible

func (w *Tabs) Visible() bool

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) AddModifyCallback

func (b *TextBuffer) AddModifyCallback(cb func(int, int, int, int, string))

func (*TextBuffer) Append

func (b *TextBuffer) Append(txt string)

func (*TextBuffer) CharAt

func (b *TextBuffer) CharAt(pos int) rune

func (*TextBuffer) CountLines

func (b *TextBuffer) CountLines(start, end int) int

func (*TextBuffer) Destroy

func (b *TextBuffer) Destroy()

func (*TextBuffer) GetSelectionPosition

func (b *TextBuffer) GetSelectionPosition() (int, int)

GetSelectionPosition gets position (start, end) of the currently selected text

func (*TextBuffer) GetSelectionText

func (b *TextBuffer) GetSelectionText() string

GetSelectionText returns the text within the current selection

func (*TextBuffer) GetTabWidth

func (b *TextBuffer) GetTabWidth() int

func (*TextBuffer) GetTextRange

func (b *TextBuffer) GetTextRange(start, end int) string

GetTextRange - get text from start and end position

func (*TextBuffer) Highlight

func (b *TextBuffer) Highlight(start, end int)

Highlight - highlight text from start and end position

func (*TextBuffer) Insert

func (b *TextBuffer) Insert(pos int, txt string)

func (*TextBuffer) IsSelected

func (b *TextBuffer) IsSelected() bool

IsSelected checks if any text is selected

func (*TextBuffer) Length

func (b *TextBuffer) Length() int

func (*TextBuffer) LineEnd

func (b *TextBuffer) LineEnd(pos int) int

func (*TextBuffer) LineStart

func (b *TextBuffer) LineStart(pos int) int

func (*TextBuffer) LineText

func (b *TextBuffer) LineText(pos int) string

func (*TextBuffer) NextChar

func (b *TextBuffer) NextChar(pos int) int

func (*TextBuffer) PrevChar

func (b *TextBuffer) PrevChar(pos int) int

func (*TextBuffer) Remove

func (b *TextBuffer) Remove(start, end int)

func (*TextBuffer) ReplaceRange

func (b *TextBuffer) ReplaceRange(start, end int, txt string)

ReplaceRange - replace text within the start, end range with text

func (*TextBuffer) ReplaceSelection

func (b *TextBuffer) ReplaceSelection(txt string)

ReplaceSelection - replace text within current selection with text

func (*TextBuffer) RewindLines

func (b *TextBuffer) RewindLines(start, nLines int) int

func (*TextBuffer) Search

func (b *TextBuffer) Search(start int, searchStr string, searchBackward, matchCase bool) (foundPos int)

Search - search text in the buffer for string searchStr. Return the position found or -1

func (*TextBuffer) SearchBackward

func (b *TextBuffer) SearchBackward(start int, searchStr string, matchCase bool) (foundPos int)

SearchBackward - search backward for searchStr from position start. return the position if found otherwise -1

func (*TextBuffer) SearchForward

func (b *TextBuffer) SearchForward(start int, searchStr string, matchCase bool) (foundPos int)

SearchForward - search forward for searchStr from position start. return the position if found otherwise -1

func (*TextBuffer) Select

func (b *TextBuffer) Select(start, end int)

Select text between start and end

func (*TextBuffer) SetTabWidth

func (b *TextBuffer) SetTabWidth(tabWidth int)

SetTabWidth sets the TAB distance (width)

func (*TextBuffer) SetText

func (b *TextBuffer) SetText(txt string)

func (*TextBuffer) SkipLines

func (b *TextBuffer) SkipLines(start, nLines int) int

func (*TextBuffer) Text

func (b *TextBuffer) Text() string

func (*TextBuffer) UnHighlight

func (b *TextBuffer) UnHighlight()

UnHighlight all highlighted text

func (*TextBuffer) UnSelect

func (b *TextBuffer) UnSelect()

UnSelect unselects any selections in the buffer

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) Changed

func (w *TextDisplay) Changed() uint

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) GetInsertPosition

func (t *TextDisplay) GetInsertPosition() int

GetInsertPosition - return the current insert position.

func (*TextDisplay) H

func (w *TextDisplay) H() int

func (*TextDisplay) HasFocus

func (w *TextDisplay) HasFocus() bool

func (*TextDisplay) Hide

func (w *TextDisplay) Hide()

func (*TextDisplay) HideCursor

func (t *TextDisplay) HideCursor()

HideCursor hides the text cursor.

func (*TextDisplay) InsertText

func (t *TextDisplay) InsertText(txt string)

InsertText - Insert text at the cursor position.

func (*TextDisplay) IsActive

func (w *TextDisplay) IsActive() bool

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) MoveDown

func (t *TextDisplay) MoveDown() bool

MoveDown moves the current insert position down one line.

func (*TextDisplay) MoveLeft

func (t *TextDisplay) MoveLeft() bool

MoveLeft moves the current insert position left one character.

func (*TextDisplay) MoveRight

func (t *TextDisplay) MoveRight() bool

MoveRight moves the current insert position right one character. Returns true if the cursor moved, false if the end of the text was reached

func (*TextDisplay) MoveUp

func (t *TextDisplay) MoveUp() bool

MoveUp moves the current insert position up one line.

func (*TextDisplay) Overstrike

func (t *TextDisplay) Overstrike(txt string)

Overstrike - Not sure what it does, the fltk doc does not match with the name meaning

func (*TextDisplay) Parent

func (w *TextDisplay) Parent() *Group

func (*TextDisplay) PositionToXY

func (t *TextDisplay) PositionToXY(pos int) (int, int)

Convert a character index into a pixel position.

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) SetDrawHandler

func (w *TextDisplay) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*TextDisplay) SetEventHandler

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

func (*TextDisplay) SetHighlightData

func (t *TextDisplay) SetHighlightData(buf *TextBuffer, entries []StyleTableEntry)

func (*TextDisplay) SetImage

func (w *TextDisplay) SetImage(i Image)

func (*TextDisplay) SetInsertPosition

func (t *TextDisplay) SetInsertPosition(newPos int)

SetInsertPosition set the insert position to a new position.

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) SetLinenumberAlign

func (t *TextDisplay) SetLinenumberAlign(align Align)

SetLinenumberAlign sets the alignment used for line numbers (if enabled; see SetLinenumberWidth).

func (*TextDisplay) SetLinenumberBgcolor

func (t *TextDisplay) SetLinenumberBgcolor(color Color)

SetLinenumberBgcolor sets the background color used for line numbers (if enabled; see SetLinenumberWidth).

func (*TextDisplay) SetLinenumberFgcolor

func (t *TextDisplay) SetLinenumberFgcolor(color Color)

SetLinenumberFgcolor sets the foreground color used for line numbers (if enabled; see SetLinenumberWidth).

func (*TextDisplay) SetLinenumberFont

func (t *TextDisplay) SetLinenumberFont(font Font)

SetLinenumberFont sets the font used for line numbers (if enabled; see SetLinenumberWidth).

func (*TextDisplay) SetLinenumberSize

func (t *TextDisplay) SetLinenumberSize(s int)

SetLinenumberSize sets the font size used for line numbers (if enabled; see SetLinenumberWidth).

func (*TextDisplay) SetLinenumberWidth

func (t *TextDisplay) SetLinenumberWidth(w int)

SetLinenumberWidth enabled/disables and sets the width used by line numbers.

A width of 0 pixels disables line numbers. A width > 0 enables line numbers and sets that as the width to be used.

func (*TextDisplay) SetPosition

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

func (*TextDisplay) SetResizeHandler

func (w *TextDisplay) SetResizeHandler(handler func())

func (*TextDisplay) SetSelectionColor

func (w *TextDisplay) SetSelectionColor(color Color)

func (*TextDisplay) SetTextColor

func (t *TextDisplay) SetTextColor(color Color)

SetTextColor sets the default color of text in the widget.

func (*TextDisplay) SetTextFont

func (t *TextDisplay) SetTextFont(font Font)

SetTextFont sets the default font used when drawing text in the widget.

func (*TextDisplay) SetTextSize

func (t *TextDisplay) SetTextSize(size int)

SetTextSize sets the default size of text in the widget.

func (*TextDisplay) SetTooltip

func (w *TextDisplay) SetTooltip(text string)

func (*TextDisplay) SetType

func (w *TextDisplay) SetType(widgetType uint8)

func (*TextDisplay) SetWrapMode

func (t *TextDisplay) SetWrapMode(wrap WrapMode, wrapMargin ...int)

wrapMargin is not needed if WrapMode is WRAP_NONE or WRAP_AT_BOUNDS

func (*TextDisplay) Show

func (w *TextDisplay) Show()

func (*TextDisplay) ShowInsertPosition

func (t *TextDisplay) ShowInsertPosition()

ShowInsertPosition scrolls the text buffer to show the current insert position.

func (*TextDisplay) TakeFocus

func (w *TextDisplay) TakeFocus() int

func (*TextDisplay) TextColor

func (t *TextDisplay) TextColor() Color

TextColor gets the default color of text in the widget.

func (*TextDisplay) TextFont

func (t *TextDisplay) TextFont() Font

TextFont gets the default font used when drawing text in the widget.

func (*TextDisplay) TextSize

func (t *TextDisplay) TextSize() int

TextSize gets the default size of text in the widget.

func (*TextDisplay) Type

func (w *TextDisplay) Type() uint8

func (*TextDisplay) Visible

func (w *TextDisplay) Visible() bool

func (*TextDisplay) W

func (w *TextDisplay) W() int

func (*TextDisplay) X

func (w *TextDisplay) X() int

func (*TextDisplay) XYToPosition

func (t *TextDisplay) XYToPosition(x, y int) int

Translate a pixel position into a character index.

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

NewTextEditor returns a TextEditor.

Example:

textBuffer := fltk.NewTextBuffer()
textEditor := fltk.NewTextEditor(x, y, width, height)
textEditor.SetBuffer(textBuffer)
textBuffer.SetText("Initial Text")
fmt.Println(textBuffer.Text()) // Prints: Initial Text

Note that the text buffer pointer must be kept around for as long as the text editor is in use.

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) Changed

func (w *TextEditor) Changed() uint

func (*TextEditor) ClearVisibleFocus

func (w *TextEditor) ClearVisibleFocus()

func (*TextEditor) Color

func (w *TextEditor) Color() Color

func (*TextEditor) Copy

func (t *TextEditor) Copy()

Copy copy of selected text or the current character in the current buffer of the editor (kf_copy)

func (*TextEditor) Cut

func (t *TextEditor) Cut()

Cut cuts the selected text from the editor's buffer into the clipboard.

func (*TextEditor) Deactivate

func (w *TextEditor) Deactivate()

func (*TextEditor) Delete

func (t *TextEditor) Delete()

Delete deletes the selected text from the editor's buffer.

func (*TextEditor) Destroy

func (w *TextEditor) Destroy()

func (*TextEditor) H

func (w *TextEditor) H() int

func (*TextEditor) HasFocus

func (w *TextEditor) HasFocus() bool

func (*TextEditor) Hide

func (w *TextEditor) Hide()

func (*TextEditor) Insert

func (t *TextEditor) Insert()

Insert toggles the insert mode (kf_insert)

func (*TextEditor) IsActive

func (w *TextEditor) IsActive() bool

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) Paste

func (t *TextEditor) Paste()

Paste pastes the clipboard's text into the editor's buffer at the insertion point.

func (*TextEditor) Redo

func (t *TextEditor) Redo() bool

Redo redoes the last undone edit. Returns true iff any change was made.

func (*TextEditor) Redraw

func (w *TextEditor) Redraw()

func (*TextEditor) Resize

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

func (*TextEditor) SelectAll

func (t *TextEditor) SelectAll()

SelectAll selects all the editor's text.

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) SetDrawHandler

func (w *TextEditor) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*TextEditor) SetEventHandler

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

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) SetResizeHandler

func (w *TextEditor) SetResizeHandler(handler func())

func (*TextEditor) SetSelectionColor

func (w *TextEditor) SetSelectionColor(color Color)

func (*TextEditor) SetTooltip

func (w *TextEditor) SetTooltip(text string)

func (*TextEditor) SetType

func (w *TextEditor) SetType(widgetType uint8)

func (*TextEditor) Show

func (w *TextEditor) Show()

func (*TextEditor) TakeFocus

func (w *TextEditor) TakeFocus() int

func (*TextEditor) Type

func (w *TextEditor) Type() uint8

func (*TextEditor) Undo

func (t *TextEditor) Undo() bool

Undo undoes the last edit. Returns true iff any change was made.

func (*TextEditor) Visible

func (w *TextEditor) Visible() bool

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 Tile

type Tile struct {
	Group
}

func NewTile

func NewTile(x, y, w, h int, text ...string) *Tile

func (*Tile) Activate

func (w *Tile) Activate()

func (*Tile) Align

func (w *Tile) Align() Align

func (*Tile) Box

func (w *Tile) Box() BoxType

func (*Tile) Changed

func (w *Tile) Changed() uint

func (*Tile) ClearVisibleFocus

func (w *Tile) ClearVisibleFocus()

func (*Tile) Color

func (w *Tile) Color() Color

func (*Tile) Deactivate

func (w *Tile) Deactivate()

func (*Tile) Destroy

func (w *Tile) Destroy()

func (*Tile) H

func (w *Tile) H() int

func (*Tile) HasFocus

func (w *Tile) HasFocus() bool

func (*Tile) Hide

func (w *Tile) Hide()

func (*Tile) IsActive

func (w *Tile) IsActive() bool

func (*Tile) Label

func (w *Tile) Label() string

func (*Tile) LabelColor

func (w *Tile) LabelColor() Color

func (*Tile) LabelFont

func (w *Tile) LabelFont() Font

func (*Tile) LabelSize

func (w *Tile) LabelSize() int

func (*Tile) LabelType

func (w *Tile) LabelType() LabelType

func (*Tile) MeasureLabel

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

func (*Tile) Parent

func (w *Tile) Parent() *Group

func (*Tile) Redraw

func (w *Tile) Redraw()

func (*Tile) Resize

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

func (*Tile) SelectionColor

func (w *Tile) SelectionColor() Color

func (*Tile) SetAlign

func (w *Tile) SetAlign(align Align)

func (*Tile) SetBox

func (w *Tile) SetBox(box BoxType)

func (*Tile) SetCallback

func (w *Tile) SetCallback(f func())

func (*Tile) SetCallbackCondition

func (w *Tile) SetCallbackCondition(when CallbackCondition)

func (*Tile) SetColor

func (w *Tile) SetColor(color Color)

func (*Tile) SetDeimage

func (w *Tile) SetDeimage(i Image)

func (*Tile) SetDrawHandler

func (w *Tile) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Tile) SetEventHandler

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

func (*Tile) SetImage

func (w *Tile) SetImage(i Image)

func (*Tile) SetLabel

func (w *Tile) SetLabel(label string)

func (*Tile) SetLabelColor

func (w *Tile) SetLabelColor(col Color)

func (*Tile) SetLabelFont

func (w *Tile) SetLabelFont(font Font)

func (*Tile) SetLabelSize

func (w *Tile) SetLabelSize(size int)

func (*Tile) SetLabelType

func (w *Tile) SetLabelType(ltype LabelType)

func (*Tile) SetPosition

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

func (*Tile) SetResizeHandler

func (w *Tile) SetResizeHandler(handler func())

func (*Tile) SetSelectionColor

func (w *Tile) SetSelectionColor(color Color)

func (*Tile) SetTooltip

func (w *Tile) SetTooltip(text string)

func (*Tile) SetType

func (w *Tile) SetType(widgetType uint8)

func (*Tile) Show

func (w *Tile) Show()

func (*Tile) TakeFocus

func (w *Tile) TakeFocus() int

func (*Tile) Type

func (w *Tile) Type() uint8

func (*Tile) Visible

func (w *Tile) Visible() bool

func (*Tile) W

func (w *Tile) W() int

func (*Tile) X

func (w *Tile) X() int

func (*Tile) Y

func (w *Tile) 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) Changed

func (w *ToggleButton) Changed() uint

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) HasFocus

func (w *ToggleButton) HasFocus() bool

func (*ToggleButton) Hide

func (w *ToggleButton) Hide()

func (*ToggleButton) IsActive

func (w *ToggleButton) IsActive() bool

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) SetDrawHandler

func (w *ToggleButton) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*ToggleButton) SetEventHandler

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

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) SetResizeHandler

func (w *ToggleButton) SetResizeHandler(handler func())

func (*ToggleButton) SetSelectionColor

func (w *ToggleButton) SetSelectionColor(color Color)

func (*ToggleButton) SetTooltip

func (w *ToggleButton) SetTooltip(text string)

func (*ToggleButton) SetType

func (w *ToggleButton) SetType(widgetType uint8)

func (*ToggleButton) Show

func (w *ToggleButton) Show()

func (*ToggleButton) TakeFocus

func (w *ToggleButton) TakeFocus() int

func (*ToggleButton) Type

func (w *ToggleButton) Type() uint8

func (*ToggleButton) Visible

func (w *ToggleButton) Visible() bool

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 Tree

type Tree struct {
	Group
}

func NewTree

func NewTree(x, y, w, h int, text ...string) *Tree

func (*Tree) Activate

func (w *Tree) Activate()

func (*Tree) Add

func (t *Tree) Add(path string) TreeItem

func (*Tree) Align

func (w *Tree) Align() Align

func (*Tree) Box

func (w *Tree) Box() BoxType

func (*Tree) Changed

func (w *Tree) Changed() uint

func (*Tree) Clear

func (t *Tree) Clear()

func (*Tree) ClearChildren

func (t *Tree) ClearChildren(item TreeItem)

func (*Tree) ClearVisibleFocus

func (w *Tree) ClearVisibleFocus()

func (*Tree) Color

func (w *Tree) Color() Color

func (*Tree) Deactivate

func (w *Tree) Deactivate()

func (*Tree) Destroy

func (w *Tree) Destroy()

func (*Tree) H

func (w *Tree) H() int

func (*Tree) HasFocus

func (w *Tree) HasFocus() bool

func (*Tree) Hide

func (w *Tree) Hide()

func (*Tree) IsActive

func (w *Tree) IsActive() bool

func (*Tree) Label

func (w *Tree) Label() string

func (*Tree) LabelColor

func (w *Tree) LabelColor() Color

func (*Tree) LabelFont

func (w *Tree) LabelFont() Font

func (*Tree) LabelSize

func (w *Tree) LabelSize() int

func (*Tree) LabelType

func (w *Tree) LabelType() LabelType

func (*Tree) MeasureLabel

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

func (*Tree) Parent

func (w *Tree) Parent() *Group

func (*Tree) Redraw

func (w *Tree) Redraw()

func (*Tree) Remove

func (t *Tree) Remove(item TreeItem) bool

func (*Tree) Resize

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

func (*Tree) SelectionColor

func (w *Tree) SelectionColor() Color

func (*Tree) SetAlign

func (w *Tree) SetAlign(align Align)

func (*Tree) SetBox

func (w *Tree) SetBox(box BoxType)

func (*Tree) SetCallback

func (w *Tree) SetCallback(f func())

func (*Tree) SetCallbackCondition

func (w *Tree) SetCallbackCondition(when CallbackCondition)

func (*Tree) SetColor

func (w *Tree) SetColor(color Color)

func (*Tree) SetConnectorStyle

func (t *Tree) SetConnectorStyle(style TreeConnector)

func (*Tree) SetDeimage

func (w *Tree) SetDeimage(i Image)

func (*Tree) SetDrawHandler

func (w *Tree) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Tree) SetEventHandler

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

func (*Tree) SetImage

func (w *Tree) SetImage(i Image)

func (*Tree) SetItemDrawMode

func (t *Tree) SetItemDrawMode(drawMode TreeItemDrawMode)

func (*Tree) SetLabel

func (w *Tree) SetLabel(label string)

func (*Tree) SetLabelColor

func (w *Tree) SetLabelColor(col Color)

func (*Tree) SetLabelFont

func (w *Tree) SetLabelFont(font Font)

func (*Tree) SetLabelSize

func (w *Tree) SetLabelSize(size int)

func (*Tree) SetLabelType

func (w *Tree) SetLabelType(ltype LabelType)

func (*Tree) SetPosition

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

func (*Tree) SetResizeHandler

func (w *Tree) SetResizeHandler(handler func())

func (*Tree) SetSelectMode

func (t *Tree) SetSelectMode(selectMode TreeSelect)

func (*Tree) SetSelectionColor

func (w *Tree) SetSelectionColor(color Color)

func (*Tree) SetShowRoot

func (t *Tree) SetShowRoot(show bool)

func (*Tree) SetTooltip

func (w *Tree) SetTooltip(text string)

func (*Tree) SetType

func (w *Tree) SetType(widgetType uint8)

func (*Tree) Show

func (w *Tree) Show()

func (*Tree) TakeFocus

func (w *Tree) TakeFocus() int

func (*Tree) Type

func (w *Tree) Type() uint8

func (*Tree) Visible

func (w *Tree) Visible() bool

func (*Tree) W

func (w *Tree) W() int

func (*Tree) X

func (w *Tree) X() int

func (*Tree) Y

func (w *Tree) Y() int

type TreeConnector

type TreeConnector int

type TreeItem

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

func (TreeItem) SetWidget

func (t TreeItem) SetWidget(w Widget)

type TreeItemDrawMode

type TreeItemDrawMode uint

type TreeSelect

type TreeSelect int

type ValueSlider

type ValueSlider struct {
	Slider
}

func NewValueSlider

func NewValueSlider(x, y, w, h int, text ...string) *ValueSlider

func (*ValueSlider) SetMaximum

func (v *ValueSlider) SetMaximum(value float64)

func (*ValueSlider) SetMinimum

func (v *ValueSlider) SetMinimum(value float64)

func (*ValueSlider) SetStep

func (v *ValueSlider) SetStep(value float64)

func (*ValueSlider) SetTextFont

func (s *ValueSlider) SetTextFont(font Font)

func (*ValueSlider) SetTextSize

func (s *ValueSlider) SetTextSize(size int)

func (*ValueSlider) SetValue

func (v *ValueSlider) SetValue(value float64)

func (*ValueSlider) Value

func (v *ValueSlider) Value() float64

type Widget

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

type Window

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

func NewWindow

func NewWindow(w, h int, title ...string) *Window

func NewWindowWithPosition

func NewWindowWithPosition(x, y, w, h int, title ...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) Changed

func (w *Window) Changed() uint

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) FullscreenActive

func (w *Window) FullscreenActive() bool

func (*Window) H

func (w *Window) H() int

func (*Window) HasFocus

func (w *Window) HasFocus() bool

func (*Window) Hide

func (w *Window) Hide()

func (*Window) IsActive

func (w *Window) IsActive() bool

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) SetDrawHandler

func (w *Window) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Window) SetEventHandler

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

func (*Window) SetFullscreen

func (w *Window) SetFullscreen(flag bool)

func (*Window) SetIcons

func (w *Window) SetIcons(icons []*RgbImage)

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) SetModal

func (w *Window) SetModal()

func (*Window) SetNonModal

func (w *Window) SetNonModal()

func (*Window) SetPosition

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

func (*Window) SetResizeHandler

func (w *Window) SetResizeHandler(handler func())

func (*Window) SetSelectionColor

func (w *Window) SetSelectionColor(color Color)

func (*Window) SetSizeRange

func (w *Window) SetSizeRange(minW, minH, maxW, maxH, deltaX, deltaY int, aspectRatio bool)

func (*Window) SetTooltip

func (w *Window) SetTooltip(text string)

func (*Window) SetType

func (w *Window) SetType(widgetType uint8)

func (*Window) SetXClass

func (w *Window) SetXClass(wmclass string)

func (*Window) Show

func (w *Window) Show()

func (*Window) TakeFocus

func (w *Window) TakeFocus() int

func (*Window) Type

func (w *Window) Type() uint8

func (*Window) Visible

func (w *Window) Visible() bool

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

type Wizard

type Wizard struct {
	Group
}

func NewWizard

func NewWizard(x, y, w, h int, text ...string) *Wizard

func (*Wizard) Activate

func (w *Wizard) Activate()

func (*Wizard) Align

func (w *Wizard) Align() Align

func (*Wizard) Box

func (w *Wizard) Box() BoxType

func (*Wizard) Changed

func (w *Wizard) Changed() uint

func (*Wizard) ClearVisibleFocus

func (w *Wizard) ClearVisibleFocus()

func (*Wizard) Color

func (w *Wizard) Color() Color

func (*Wizard) Deactivate

func (w *Wizard) Deactivate()

func (*Wizard) Destroy

func (w *Wizard) Destroy()

func (*Wizard) H

func (w *Wizard) H() int

func (*Wizard) HasFocus

func (w *Wizard) HasFocus() bool

func (*Wizard) Hide

func (w *Wizard) Hide()

func (*Wizard) IsActive

func (w *Wizard) IsActive() bool

func (*Wizard) Label

func (w *Wizard) Label() string

func (*Wizard) LabelColor

func (w *Wizard) LabelColor() Color

func (*Wizard) LabelFont

func (w *Wizard) LabelFont() Font

func (*Wizard) LabelSize

func (w *Wizard) LabelSize() int

func (*Wizard) LabelType

func (w *Wizard) LabelType() LabelType

func (*Wizard) MeasureLabel

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

func (*Wizard) Next

func (w *Wizard) Next()

func (*Wizard) Parent

func (w *Wizard) Parent() *Group

func (*Wizard) Prev

func (w *Wizard) Prev()

func (*Wizard) Redraw

func (w *Wizard) Redraw()

func (*Wizard) Resize

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

func (*Wizard) SelectionColor

func (w *Wizard) SelectionColor() Color

func (*Wizard) SetAlign

func (w *Wizard) SetAlign(align Align)

func (*Wizard) SetBox

func (w *Wizard) SetBox(box BoxType)

func (*Wizard) SetCallback

func (w *Wizard) SetCallback(f func())

func (*Wizard) SetCallbackCondition

func (w *Wizard) SetCallbackCondition(when CallbackCondition)

func (*Wizard) SetColor

func (w *Wizard) SetColor(color Color)

func (*Wizard) SetDeimage

func (w *Wizard) SetDeimage(i Image)

func (*Wizard) SetDrawHandler

func (w *Wizard) SetDrawHandler(handler func(func()))

SetDrawHandler specifies the function that will be used to draw the widget. The parameter to this function is another function which, when called draws this widget as if not draw handler was specified.

func (*Wizard) SetEventHandler

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

func (*Wizard) SetImage

func (w *Wizard) SetImage(i Image)

func (*Wizard) SetLabel

func (w *Wizard) SetLabel(label string)

func (*Wizard) SetLabelColor

func (w *Wizard) SetLabelColor(col Color)

func (*Wizard) SetLabelFont

func (w *Wizard) SetLabelFont(font Font)

func (*Wizard) SetLabelSize

func (w *Wizard) SetLabelSize(size int)

func (*Wizard) SetLabelType

func (w *Wizard) SetLabelType(ltype LabelType)

func (*Wizard) SetPosition

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

func (*Wizard) SetResizeHandler

func (w *Wizard) SetResizeHandler(handler func())

func (*Wizard) SetSelectionColor

func (w *Wizard) SetSelectionColor(color Color)

func (*Wizard) SetTooltip

func (w *Wizard) SetTooltip(text string)

func (*Wizard) SetType

func (w *Wizard) SetType(widgetType uint8)

func (*Wizard) SetValue

func (w *Wizard) SetValue(widget Widget)

func (*Wizard) Show

func (w *Wizard) Show()

func (*Wizard) TakeFocus

func (w *Wizard) TakeFocus() int

func (*Wizard) Type

func (w *Wizard) Type() uint8

func (*Wizard) Value

func (w *Wizard) Value() *widget

func (*Wizard) Visible

func (w *Wizard) Visible() bool

func (*Wizard) W

func (w *Wizard) W() int

func (*Wizard) X

func (w *Wizard) X() int

func (*Wizard) Y

func (w *Wizard) Y() int

type WrapMode

type WrapMode int

Jump to

Keyboard shortcuts

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