controls

package
v0.0.0-...-7a3d1ee Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Run

func Run(form MainForm)

Types

type BaseContainer

type BaseContainer struct {
	Childs map[uintptr]Child
	// contains filtered or unexported fields
}

func (*BaseContainer) AddChild

func (_this *BaseContainer) AddChild(child Child)

func (*BaseContainer) Init

func (_this *BaseContainer) Init(container Container) *BaseContainer

func (*BaseContainer) RemoveChild

func (_this *BaseContainer) RemoveChild(child Child)

type BaseUI

type BaseUI struct {
	EvLoad map[string]func(s GUI)
	OnLoad func()

	EvDestroy map[string]func(s GUI)
	OnDestroy func()

	EvKeyDown map[string]func(s GUI, e *fm.KeyEvArgs)
	OnKeyDown func(e *fm.KeyEvArgs)

	EvKeyUp map[string]func(s GUI, e *fm.KeyEvArgs)
	OnKeyUp func(e *fm.KeyEvArgs)

	EvKeyPress map[string]func(s GUI, e *fm.KeyPressEvArgs)
	OnKeyPress func(e *fm.KeyPressEvArgs)

	EvShow map[string]func(s GUI)
	OnShow func()

	EvResize map[string]func(s GUI, e fm.Rect)
	OnResize func(e fm.Rect)

	EvMove map[string]func(s GUI, e fm.Point)
	OnMove func(e fm.Point)

	EvMouseMove map[string]func(s GUI, e *fm.MouseEvArgs)
	OnMouseMove func(e *fm.MouseEvArgs)

	EvMouseDown map[string]func(s GUI, e *fm.MouseEvArgs)
	OnMouseDown func(e *fm.MouseEvArgs)

	EvMouseUp map[string]func(s GUI, e *fm.MouseEvArgs)
	OnMouseUp func(e *fm.MouseEvArgs)

	EvMouseWheel map[string]func(s GUI, e *fm.MouseEvArgs)
	OnMouseWheel func(e *fm.MouseEvArgs)

	EvMouseClick map[string]func(s GUI, e *fm.MouseEvArgs)
	OnMouseClick func(e *fm.MouseEvArgs)

	EvPaint map[string]func(s GUI, e fm.PaintEvArgs)
	OnPaint func(e fm.PaintEvArgs)

	EvFocus map[string]func(s GUI)
	OnFocus func()

	EvLostFocus map[string]func(s GUI)
	OnLostFocus func()

	OnSetCursor           func() bool
	OnImeStartComposition func() bool
	// contains filtered or unexported fields
}

func (*BaseUI) CreateGraphics

func (_this *BaseUI) CreateGraphics() fm.Graphics

func (*BaseUI) Enable

func (_this *BaseUI) Enable(enable bool)

func (*BaseUI) GetBound

func (_this *BaseUI) GetBound() fm.Bound

func (*BaseUI) GetCursor

func (_this *BaseUI) GetCursor() fm.CursorType

func (*BaseUI) GetHandle

func (_this *BaseUI) GetHandle() uintptr

func (*BaseUI) GetOwner

func (_this *BaseUI) GetOwner() GUI

func (*BaseUI) GetParent

func (_this *BaseUI) GetParent() GUI

func (*BaseUI) Hide

func (_this *BaseUI) Hide()

func (*BaseUI) Init

func (_this *BaseUI) Init(instance GUI, impl br.Window) *BaseUI

func (*BaseUI) Invoke

func (_this *BaseUI) Invoke(fn func())

func (*BaseUI) InvokeEx

func (_this *BaseUI) InvokeEx(fn func(state interface{}), state interface{})

func (*BaseUI) IsEnable

func (_this *BaseUI) IsEnable() bool

func (*BaseUI) SetBgColor

func (_this *BaseUI) SetBgColor(color int32)

func (*BaseUI) SetCursor

func (_this *BaseUI) SetCursor(cursor fm.CursorType)

func (*BaseUI) SetLocation

func (_this *BaseUI) SetLocation(x, y int)

func (*BaseUI) SetSize

func (_this *BaseUI) SetSize(width, height int)

func (*BaseUI) Show

func (_this *BaseUI) Show()

type Child

type Child interface {
	GUI

	GetAnchor() fm.AnchorStyle
	SetAnchor(style fm.AnchorStyle)
	// contains filtered or unexported methods
}

type Container

type Container interface {
	GUI
	// contains filtered or unexported methods
}

type Control

type Control struct {
	BaseUI
	// contains filtered or unexported fields
}

func (*Control) GetAnchor

func (_this *Control) GetAnchor() fm.AnchorStyle

func (*Control) Init

func (_this *Control) Init() *Control

func (*Control) SetAnchor

func (_this *Control) SetAnchor(style fm.AnchorStyle)

type Form

type Form struct {
	BaseUI
	BaseContainer

	EvState map[string]func(s GUI, state fm.FormState)
	OnState func(state fm.FormState)
	// contains filtered or unexported fields
}

func (*Form) Close

func (_this *Form) Close()

func (*Form) GetBorderStyle

func (_this *Form) GetBorderStyle() fm.FormBorder

func (*Form) GetState

func (_this *Form) GetState() fm.FormState

func (*Form) Init

func (_this *Form) Init() *Form

func (*Form) InitEx

func (_this *Form) InitEx(param br.FormParam) *Form

func (*Form) NoneBorderResize

func (_this *Form) NoneBorderResize()

func (*Form) SetBorderStyle

func (_this *Form) SetBorderStyle(style fm.FormBorder)

func (*Form) SetIcon

func (_this *Form) SetIcon(file string)

func (*Form) SetMaximizeBox

func (_this *Form) SetMaximizeBox(isShow bool)

func (*Form) SetMinimizeBox

func (_this *Form) SetMinimizeBox(isShow bool)

func (*Form) SetStartPosition

func (_this *Form) SetStartPosition(pos fm.FormStart)

func (*Form) SetState

func (_this *Form) SetState(state fm.FormState)

func (*Form) SetTitle

func (_this *Form) SetTitle(title string)

func (*Form) SetTopMost

func (_this *Form) SetTopMost(isTop bool)

func (*Form) ShowDialog

func (_this *Form) ShowDialog()

type GUI

type GUI interface {
	GetHandle() uintptr
	GetBound() fm.Bound
	SetSize(width, height int)
	SetLocation(x, y int)
	SetBgColor(color int32)
	Invoke(fn func())
	InvokeEx(fn func(state interface{}), state interface{})
	Enable(b bool)
	IsEnable() bool
	GetParent() GUI
	GetOwner() GUI
}

type MainForm

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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