Documentation ¶
Index ¶
- func Exit()
- func GetDPI() (float32, float32)
- func Init()
- func Run() int
- type AbsoluteLayout
- type Button
- type Canvas
- type CanvasObject
- type Color
- type GridLayout
- type Label
- type LabelHorizontalAlign
- type LabelVerticalAlign
- type Layout
- type StackLayout
- type StackLayoutOrientation
- type Window
- type WindowCallbackType
- type WindowState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AbsoluteLayout ¶
type AbsoluteLayout interface { Layout AddWidget(w widget) }
func NewAbsoluteLayout ¶
func NewAbsoluteLayout() AbsoluteLayout
type Canvas ¶
type Canvas struct {
Child []CanvasObject
}
type CanvasObject ¶
type CanvasObject interface { SetColorRGBA(color Color) // contains filtered or unexported methods }
func NewRectangle ¶
func NewRectangle(x, y, width, height float32, filled bool, color Color, strokeWidth float32) CanvasObject
type GridLayout ¶
TODO: add x and y offsets
func NewGridLayout ¶
func NewGridLayout(x, y float32, rows, cols uint32) GridLayout
type Label ¶
type Label interface { SetTextColor(textColor Color) SetText(text string) SetFontName(fontName string) SetFontSize(fontSize float32) SetTextAlignment(hAlign LabelHorizontalAlign, vAlign LabelVerticalAlign) // contains filtered or unexported methods }
type LabelHorizontalAlign ¶
type LabelHorizontalAlign int32
const ( LabelLeftH LabelHorizontalAlign = iota LabelRightH LabelCenterH LabelJustifiedH )
type LabelVerticalAlign ¶
type LabelVerticalAlign int32
const ( LabelTopV LabelVerticalAlign = iota LabelBottomV LabelCenterV )
type StackLayout ¶
func NewStackLayout ¶
func NewStackLayout(x, y float32, orientation StackLayoutOrientation) StackLayout
type StackLayoutOrientation ¶
type StackLayoutOrientation byte
const ( StackH StackLayoutOrientation = iota StackV )
type Window ¶
type Window interface { SetTitle(title string) SetPos(x, y int) SetSize(width, height int) GetHandle() user32.HWND GetTitle() string GetSize() (width, height int) GetPos() (x, y int) Enable(enable bool) AttachCallback(callbackType WindowCallbackType, callback interface{}) DetachCallback(callbackType WindowCallbackType) SetWidget(wdgt widget) SetBackgroundColor(r, g, b, a byte) SetCanvas(canvas *Canvas) Close() Hide() Show() }
Window определяет внешний интерфейс взаимодействия с окном
type WindowCallbackType ¶
type WindowCallbackType int
const ( OnLMouseButtonDown WindowCallbackType = iota OnLMouseButtonUp OnRMouseButtonDown OnRMouseButtonUp OnMouseMove OnClose OnResize )
type WindowState ¶
type WindowState interface { GetWindow() *Window LoadUIFromFile(filePath string) LoadUIFromFileWithInterval(filePath string, interval time.Duration) }
WindowState внешний интерфейс взаимодействия с движком
func NewWindowEngine ¶
func NewWindowEngine(windowFunctions map[string]interface{}) (WindowState, error)
NewWindowEngine иниициализирует движок для декларативного создания окна
Click to show internal directories.
Click to hide internal directories.