goUIToolKit

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

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

Go to latest
Published: Jan 18, 2017 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//White
	DEFAULT = iota
	//Blue
	PRIMARY
	//Green
	SUCCESS
	//Light-Blue
	INFO
	//Yellow
	WARNING
	//Red
	DANGER
	LINK
)
View Source
const (
	WHITE = iota
	BLUE
	GREEN
	LIGHTBLUE
	YELLOW
	RED
)

Variables

This section is empty.

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type Button

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

func NewButton

func NewButton(id string) *Button

Creates a new Button with the specified id and sets default values. if an empty string is passed, and id will be set by the view the button is added to.

func (*Button) Buffer

func (b *Button) Buffer() io.Reader

func (*Button) Getcolor

func (b *Button) Getcolor() Color

func (*Button) ID

func (b *Button) ID() string

func (*Button) OnClick

func (b *Button) OnClick(c CallBack)

func (*Button) SetColor

func (b *Button) SetColor(c Color)

func (*Button) SetText

func (b *Button) SetText(text string)

type CallBack

type CallBack func(component *Component, event string, args ...map[string]string)

type Color

type Color int

func (Color) String

func (c Color) String() string

type Colored

type Colored interface {
	Color() Color
	SetColor(Color)
}

type Component

type Component interface {
	//A call to Buffer should finalize the component
	Buffer() io.Reader
	ID() string
}

type Container

type Container interface {
	Component
	AddComponent(Component)
}

type Div

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

This is not implemented yet!

func (*Div) AddComponent

func (d *Div) AddComponent(c *Component) (id string)

func (*Div) Buffer

func (d *Div) Buffer() io.Reader

func (*Div) ID

func (d *Div) ID() string

func (*Div) SetID

func (d *Div) SetID(string)

type Message

type Message struct {
	Command  string
	Selector string
	Args     []string
	Payload  []byte
}

type Runtime

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

func GetRuntime

func GetRuntime() *Runtime

func (*Runtime) Send

func (r *Runtime) Send(m *Message)

func (*Runtime) Start

func (r *Runtime) Start(rootView *View)

type Unmarshal

type Unmarshal func(buf []byte) Component

type View

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

func NewRootView

func NewRootView(title string) *View

func (*View) AddComponent

func (v *View) AddComponent(c Component)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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