Documentation
¶
Index ¶
- Constants
- Variables
- func Capture(name string, img image.Image) error
- func GCD(a, b int) int
- func GGContextRGBASub(rgba *image.RGBA, rect image.Rectangle) *gg.Context
- func GUMIParents(e GUMI) string
- func IsColorImage(img image.Image) (ok bool, c color.Color)
- func ParseAlign(a Align) (v uint8, h uint8)
- func Proportion(have, a, b uint16) (pa, pb uint16)
- func Version() (major, minor, patch int)
- type ACanvas
- type AEmpty
- type AImage
- type AText
- type Align
- type AnimFunc
- type AnimFuncsCubic
- type AnimFuncsQuad
- type AnimFuncsQuart
- type AnimFuncsQuint
- type Blank
- type BoundStore
- type Dashgrid
- type Distribute
- type Distributions
- type DrawingFn
- type Event
- type EventCursor
- type EventKeyPress
- type EventKeyRelease
- type EventKind
- type EventRune
- type EventScroll
- type GUMI
- type GUMICacher
- type GUMIEventer
- type GUMIRenderer
- type GUMIStructure
- type Graduation
- type Grid
- type Hint
- type Information
- type Length
- type MTButton
- func (s *MTButton) GetMaterialColor() MaterialColor
- func (s *MTButton) GetText() string
- func (s *MTButton) Occur(event Event)
- func (s *MTButton) OnClick(callback MTButtonClick)
- func (s *MTButton) OnFocus(callback MTButtonClick)
- func (s *MTButton) ReferClick() MTButtonClick
- func (s *MTButton) ReferFocus() MTButtonClick
- func (s *MTButton) SetMaterialColor(mc MaterialColor)
- func (s *MTButton) SetText(txt string)
- func (s *MTButton) String() string
- type MTButtonClick
- type MTButtonFocus
- type MTProgress
- func (s *MTProgress) Get() float64
- func (s *MTProgress) GetFromMaterialColor() MaterialColor
- func (s *MTProgress) GetToMaterialColor() MaterialColor
- func (s *MTProgress) Occur(event Event)
- func (s *MTProgress) Set(percent float64)
- func (s *MTProgress) SetFromMaterialColor(mcl MaterialColor)
- func (s *MTProgress) SetToMaterialColor(mcl MaterialColor)
- func (s *MTProgress) String() string
- type MTRadio
- func (s *MTRadio) GetFromMaterialColor() MaterialColor
- func (s *MTRadio) GetToMaterialColor() MaterialColor
- func (s *MTRadio) Occur(event Event)
- func (s *MTRadio) OnActive(callback MTRadioActive)
- func (s *MTRadio) ReferActive() MTRadioActive
- func (s *MTRadio) SetFromMaterialColor(mc MaterialColor)
- func (s *MTRadio) SetToMaterialColor(mc MaterialColor)
- func (s *MTRadio) String() string
- type MTRadioActive
- type MTToggle
- func (s *MTToggle) GetFromMaterialColor() MaterialColor
- func (s *MTToggle) GetToMaterialColor() MaterialColor
- func (s *MTToggle) Occur(event Event)
- func (s *MTToggle) OnActive(callback MTToggleActive)
- func (s *MTToggle) ReferActive() MTToggleActive
- func (s *MTToggle) SetFromMaterialColor(mc MaterialColor)
- func (s *MTToggle) SetToMaterialColor(mc MaterialColor)
- func (s *MTToggle) String() string
- type MTToggleActive
- type MaterialColor
- type MultipleStructure
- type NBackground
- type NButton
- type NButtonClick
- type NButtonFocus
- type NDo
- type NDrawing
- type NHorizontal
- type NMargin
- type NSize
- type NStyle
- type NToggle
- type NToggleActive
- type NVertical
- type Screen
- type SingleStructure
- type Size
- type Style
- type StyleDefault
- type StyleMaterial
- type StyleStore
- type VoidStructure
Constants ¶
View Source
const ( Align_TOP = 0x00 Align_VCENTER = 0x01 Align_BOTTOM = 0x02 Align_LEFT = 0x00 Align_HCENTER = 0x10 Align_RIGHT = 0x20 Align_CENTER = Align_HCENTER | Align_VCENTER )
View Source
const ( KEY_UNKNOWN = iota // Alphabet KEY_A KEY_B KEY_C KEY_D KEY_E KEY_F KEY_G KEY_H KEY_I KEY_J KEY_K KEY_L KEY_M KEY_N KEY_O KEY_P KEY_Q KEY_R KEY_S KEY_T KEY_U KEY_V KEY_W KEY_X KEY_Y KEY_Z // Number KEY_0 KEY_1 KEY_2 KEY_3 KEY_4 KEY_5 KEY_6 KEY_7 KEY_8 KEY_9 // Special KEY_BACKQUOTE // ` KEY_QUOTE // ' KEY_LEFTBRACKET // [ KEY_RIGHTBRACKET // ] KEY_SEMICOLON // ; KEY_MINUS // - KEY_EQUAL // = KEY_BACKSLASH // \ KEY_SLASH // / KEY_COMMA // , KEY_PERIOD // . // Function KEY_F1 KEY_F2 KEY_F3 KEY_F4 KEY_F5 KEY_F6 KEY_F7 KEY_F8 KEY_F9 KEY_F10 KEY_F11 KEY_F12 // Control KEY_ESC KEY_BACKSPACE KEY_SPACE KEY_ENTER KEY_SHIFT // mac : Shift KEY_CONTROL // mac : Command, Control KEY_ALT // mac : Option KEY_TAB // Arrow KEY_UP KEY_DOWN KEY_LEFT KEY_RIGHT // Mouse KEY_MOUSE1 KEY_MOUSE2 KEY_MOUSE3 )
View Source
const ( VERSION_MAJOR = 0 VERSION_MINOR = 1 VERSION_PATCH = 0 )
View Source
const RulerDash1 = 2.
View Source
const RulerDash2 = 4.
View Source
const RulerWidth = 10
Variables ¶
View Source
var ( AUTOLENGTH = Length{ Min: 0, Max: math.MaxUint16, } MAXLENGTH = Length{ Min: math.MaxUint16, Max: math.MaxUint16, } )
View Source
var Animation _Animation
View Source
var Drawing _Drawing
View Source
var Material _MaterialAnimation
Functions ¶
func GUMIParents ¶
func ParseAlign ¶
func Proportion ¶
Types ¶
type ACanvas ¶
type ACanvas struct {
VoidStructure
BoundStore
StyleStore
// contains filtered or unexported fields
}
type AEmpty ¶
type AEmpty struct {
VoidStructure
}
type AImage ¶
type AImage struct {
VoidStructure
BoundStore
// contains filtered or unexported fields
}
type AText ¶
type AText struct {
VoidStructure
BoundStore
StyleStore
// contains filtered or unexported fields
}
type AnimFuncsCubic ¶
type AnimFuncsCubic struct {
}
func (AnimFuncsCubic) Easing ¶
func (AnimFuncsCubic) Easing(t float64) float64
func (AnimFuncsCubic) EasingIn ¶
func (AnimFuncsCubic) EasingIn(t float64) float64
func (AnimFuncsCubic) EasingOut ¶
func (AnimFuncsCubic) EasingOut(t float64) float64
type AnimFuncsQuad ¶
type AnimFuncsQuad struct {
}
func (AnimFuncsQuad) Easing ¶
func (AnimFuncsQuad) Easing(t float64) float64
func (AnimFuncsQuad) EasingIn ¶
func (AnimFuncsQuad) EasingIn(t float64) float64
func (AnimFuncsQuad) EasingOut ¶
func (AnimFuncsQuad) EasingOut(t float64) float64
type AnimFuncsQuart ¶
type AnimFuncsQuart struct {
}
func (AnimFuncsQuart) Easing ¶
func (AnimFuncsQuart) Easing(t float64) float64
func (AnimFuncsQuart) EasingIn ¶
func (AnimFuncsQuart) EasingIn(t float64) float64
func (AnimFuncsQuart) EasingOut ¶
func (AnimFuncsQuart) EasingOut(t float64) float64
type AnimFuncsQuint ¶
type AnimFuncsQuint struct {
}
func (AnimFuncsQuint) Easing ¶
func (AnimFuncsQuint) Easing(t float64) float64
func (AnimFuncsQuint) EasingIn ¶
func (AnimFuncsQuint) EasingIn(t float64) float64
func (AnimFuncsQuint) EasingOut ¶
func (AnimFuncsQuint) EasingOut(t float64) float64
type BoundStore ¶
type BoundStore struct {
// contains filtered or unexported fields
}
type Distribute ¶
type Distributions ¶
type Distributions struct {
}
var Distribution Distributions
func (Distributions) Minimalize ¶
func (Distributions) Minimalize(have int, lns []Length) []int
type EventCursor ¶
type EventCursor struct {
X, Y uint16
}
func (EventCursor) Kind ¶
func (EventCursor) Kind() EventKind
type EventKeyPress ¶
type EventKeyPress struct {
Key uint8
}
func (EventKeyPress) Kind ¶
func (EventKeyPress) Kind() EventKind
type EventKeyRelease ¶
type EventKeyRelease struct {
Key uint8
}
func (EventKeyRelease) Kind ¶
func (EventKeyRelease) Kind() EventKind
type EventScroll ¶
type EventScroll struct {
X, Y uint16
}
func (EventScroll) Kind ¶
func (EventScroll) Kind() EventKind
type GUMI ¶
type GUMI interface {
GUMIRenderer
GUMIStructure
GUMICacher
GUMIEventer
fmt.Stringer
}
func LinkingFrom ¶
type GUMICacher ¶
type GUMICacher interface {
}
type GUMIEventer ¶
type GUMIEventer interface {
Occur(event Event)
}
type GUMIRenderer ¶
type GUMIRenderer interface {
// contains filtered or unexported methods
}
type GUMIStructure ¶
type Graduation ¶
type Graduation struct{}
func (Graduation) Horizontal ¶
func (Graduation) Horizontal(pivot float64) DrawingFn
func (Graduation) Vertical ¶
func (Graduation) Vertical(pivot float64) DrawingFn
type Information ¶
type Information struct {
Dt int64
}
func DefaultInformation ¶
func DefaultInformation() *Information
type MTButton ¶
type MTButton struct {
//
VoidStructure
BoundStore
StyleStore
// contains filtered or unexported fields
}
func MTButton0 ¶
func MTButton0(mcl MaterialColor, text string, onclick MTButtonClick) *MTButton
func MTButton1 ¶
func MTButton1(text string, onclick MTButtonClick) *MTButton
func (*MTButton) GetMaterialColor ¶
func (s *MTButton) GetMaterialColor() MaterialColor
func (*MTButton) OnClick ¶
func (s *MTButton) OnClick(callback MTButtonClick)
func (*MTButton) OnFocus ¶
func (s *MTButton) OnFocus(callback MTButtonClick)
func (*MTButton) ReferClick ¶
func (s *MTButton) ReferClick() MTButtonClick
func (*MTButton) ReferFocus ¶
func (s *MTButton) ReferFocus() MTButtonClick
func (*MTButton) SetMaterialColor ¶
func (s *MTButton) SetMaterialColor(mc MaterialColor)
type MTButtonClick ¶
type MTButtonClick func()
type MTButtonFocus ¶
type MTButtonFocus func(focus bool)
type MTProgress ¶
type MTProgress struct {
VoidStructure
BoundStore
StyleStore
// contains filtered or unexported fields
}
func MTProgress0 ¶
func MTProgress0(from, to MaterialColor, percent float64) *MTProgress
func MTProgress1 ¶
func MTProgress1(mcl MaterialColor, percent float64) *MTProgress
func (*MTProgress) Get ¶
func (s *MTProgress) Get() float64
func (*MTProgress) GetFromMaterialColor ¶
func (s *MTProgress) GetFromMaterialColor() MaterialColor
func (*MTProgress) GetToMaterialColor ¶
func (s *MTProgress) GetToMaterialColor() MaterialColor
func (*MTProgress) Occur ¶
func (s *MTProgress) Occur(event Event)
func (*MTProgress) Set ¶
func (s *MTProgress) Set(percent float64)
func (*MTProgress) SetFromMaterialColor ¶
func (s *MTProgress) SetFromMaterialColor(mcl MaterialColor)
func (*MTProgress) SetToMaterialColor ¶
func (s *MTProgress) SetToMaterialColor(mcl MaterialColor)
func (*MTProgress) String ¶
func (s *MTProgress) String() string
type MTRadio ¶
type MTRadio struct {
//
VoidStructure
BoundStore
StyleStore
// contains filtered or unexported fields
}
func MTRadio0 ¶
func MTRadio0(from, to MaterialColor, active MTRadioActive) *MTRadio
func MTRadio1 ¶
func MTRadio1(active MTRadioActive) *MTRadio
func (*MTRadio) GetFromMaterialColor ¶
func (s *MTRadio) GetFromMaterialColor() MaterialColor
func (*MTRadio) GetToMaterialColor ¶
func (s *MTRadio) GetToMaterialColor() MaterialColor
func (*MTRadio) OnActive ¶
func (s *MTRadio) OnActive(callback MTRadioActive)
func (*MTRadio) ReferActive ¶
func (s *MTRadio) ReferActive() MTRadioActive
func (*MTRadio) SetFromMaterialColor ¶
func (s *MTRadio) SetFromMaterialColor(mc MaterialColor)
func (*MTRadio) SetToMaterialColor ¶
func (s *MTRadio) SetToMaterialColor(mc MaterialColor)
type MTRadioActive ¶
type MTRadioActive func(active bool)
type MTToggle ¶
type MTToggle struct {
//
VoidStructure
BoundStore
StyleStore
// contains filtered or unexported fields
}
func MTToggle0 ¶
func MTToggle0(from, to MaterialColor, active MTToggleActive) *MTToggle
func MTToggle1 ¶
func MTToggle1(active MTToggleActive) *MTToggle
func (*MTToggle) GetFromMaterialColor ¶
func (s *MTToggle) GetFromMaterialColor() MaterialColor
func (*MTToggle) GetToMaterialColor ¶
func (s *MTToggle) GetToMaterialColor() MaterialColor
func (*MTToggle) OnActive ¶
func (s *MTToggle) OnActive(callback MTToggleActive)
func (*MTToggle) ReferActive ¶
func (s *MTToggle) ReferActive() MTToggleActive
func (*MTToggle) SetFromMaterialColor ¶
func (s *MTToggle) SetFromMaterialColor(mc MaterialColor)
func (*MTToggle) SetToMaterialColor ¶
func (s *MTToggle) SetToMaterialColor(mc MaterialColor)
type MTToggleActive ¶
type MTToggleActive func(active bool)
type MaterialColor ¶
type MaterialColor uint8
const ( White MaterialColor = iota Red MaterialColor = iota Green MaterialColor = iota Blue MaterialColor = iota Yellow MaterialColor = iota )
type MultipleStructure ¶
type MultipleStructure struct {
// contains filtered or unexported fields
}
func (*MultipleStructure) Born ¶
func (s *MultipleStructure) Born(gumi GUMI)
func (*MultipleStructure) Breed ¶
func (s *MultipleStructure) Breed(gumi []GUMI)
func (*MultipleStructure) Childrun ¶
func (s *MultipleStructure) Childrun() []GUMI
func (*MultipleStructure) Parent ¶
func (s *MultipleStructure) Parent() GUMI
type NBackground ¶
type NBackground struct {
SingleStructure
BoundStore
StyleStore
}
func NBackground0 ¶
func NBackground0() *NBackground
func (*NBackground) Occur ¶
func (s *NBackground) Occur(event Event)
func (*NBackground) String ¶
func (s *NBackground) String() string
type NButton ¶
type NButton struct {
SingleStructure
BoundStore
StyleStore
// contains filtered or unexported fields
}
func (*NButton) OnClick ¶
func (s *NButton) OnClick(callback NButtonClick)
func (*NButton) OnEnter ¶
func (s *NButton) OnEnter(callback NButtonFocus)
func (*NButton) ReferClick ¶
func (s *NButton) ReferClick() NButtonClick
func (*NButton) ReferEnter ¶
func (s *NButton) ReferEnter() NButtonFocus
type NButtonClick ¶
type NButtonClick func()
type NButtonFocus ¶
type NButtonFocus func(focus bool)
type NDo ¶
type NDo struct {
SingleStructure
// contains filtered or unexported fields
}
type NDrawing ¶
type NDrawing struct {
SingleStructure
BoundStore
StyleStore
// contains filtered or unexported fields
}
func (*NDrawing) IsAfterDraw ¶
type NHorizontal ¶
type NHorizontal struct {
MultipleStructure
// contains filtered or unexported fields
}
func NHorizontal0 ¶
func NHorizontal0(rule Distribute, childrun ...GUMI) *NHorizontal
func NHorizontal1 ¶
func NHorizontal1(childrun ...GUMI) *NHorizontal
func (*NHorizontal) Occur ¶
func (s *NHorizontal) Occur(event Event)
func (*NHorizontal) String ¶
func (s *NHorizontal) String() string
type NMargin ¶
type NMargin struct {
SingleStructure
// contains filtered or unexported fields
}
type NSize ¶
type NSize struct {
SingleStructure
// contains filtered or unexported fields
}
type NStyle ¶
type NStyle struct {
SingleStructure
// contains filtered or unexported fields
}
type NToggle ¶
type NToggle struct {
SingleStructure
BoundStore
StyleStore
// contains filtered or unexported fields
}
func NToggle0 ¶
func NToggle0(active NToggleActive) *NToggle
func (*NToggle) OnActive ¶
func (s *NToggle) OnActive(callback NToggleActive)
func (*NToggle) ReferActive ¶
func (s *NToggle) ReferActive() NToggleActive
type NToggleActive ¶
type NToggleActive func(active bool)
type NVertical ¶
type NVertical struct {
MultipleStructure
// contains filtered or unexported fields
}
func NVertical0 ¶
func NVertical0(rule Distribute, childrun ...GUMI) *NVertical
func NVertical1 ¶
type Screen ¶
type Screen struct {
// contains filtered or unexported fields
}
func (*Screen) Update ¶
func (s *Screen) Update(info *Information, style *Style)
type SingleStructure ¶
type SingleStructure struct {
// contains filtered or unexported fields
}
func (*SingleStructure) Born ¶
func (s *SingleStructure) Born(gumi GUMI)
func (*SingleStructure) Breed ¶
func (s *SingleStructure) Breed(gumi []GUMI)
func (*SingleStructure) Childrun ¶
func (s *SingleStructure) Childrun() []GUMI
func (*SingleStructure) Parent ¶
func (s *SingleStructure) Parent() GUMI
type Style ¶
type Style struct {
Default StyleDefault
Material StyleMaterial
}
func DefaultStyle ¶
func DefaultStyle() *Style
type StyleDefault ¶
type StyleMaterial ¶
type StyleMaterial struct {
White [2]image.Image
Red [2]image.Image
Green [2]image.Image
Blue [2]image.Image
Yellow [2]image.Image
}
func (*StyleMaterial) PalletteColor ¶
func (s *StyleMaterial) PalletteColor(c MaterialColor) [2]color.Color
func (*StyleMaterial) PalletteImage ¶
func (s *StyleMaterial) PalletteImage(c MaterialColor) [2]image.Image
type StyleStore ¶
type StyleStore struct {
// contains filtered or unexported fields
}
type VoidStructure ¶
type VoidStructure struct {
// contains filtered or unexported fields
}
func (*VoidStructure) Born ¶
func (s *VoidStructure) Born(gumi GUMI)
func (*VoidStructure) Breed ¶
func (s *VoidStructure) Breed(gumi []GUMI)
func (*VoidStructure) Childrun ¶
func (s *VoidStructure) Childrun() []GUMI
func (*VoidStructure) Parent ¶
func (s *VoidStructure) Parent() GUMI
Source Files
¶
- actor_Empty.go
- actor_Image.go
- actor_Text.go
- actor_canvas.go
- animation_function.go
- distribution_function.go
- drawing_Ruler.go
- drawing_common.go
- gumi.go
- gumi_Align.go
- gumi_base.go
- gumi_event.go
- gumi_event_key.go
- gumi_inform.go
- gumi_length.go
- gumi_screen.go
- gumi_style.go
- image.go
- material_Progress.go
- material_Radio.go
- material_animation.go
- material_button.go
- material_common.go
- material_toggle.go
- meta_Version.go
- node_Button.go
- node_Do.go
- node_Drawing.go
- node_Horizontal.go
- node_Margin.go
- node_Size.go
- node_Style.go
- node_Vertical.go
- node_background.go
- node_toggle.go
- tool_capture.go
- util_Connector.go
- util_math.go
Click to show internal directories.
Click to hide internal directories.