ui

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 29 Imported by: 2

README

// Low level Window interface

Methods:
- Show Window
  - Form
  - Modal Form
  - Popup Form
- Close Window
- Set title
- Resize
- Move

Events:
- Window Created
- Window Closing
- Window Closed
- Window Size Changed
- Window Position Changed

Entities:
- Visibility
- Title
- Size
- Position

Types:
- Regular
- Modal
- Popup

Documentation

Index

Constants

View Source
const (
	StyleLight     = 0
	StyleDarkBlue  = 1
	StyleDarkWhite = 2
)
View Source
const (
	DefaultWindowWidth  = 640
	DefaultWindowHeight = 480
)
View Source
const ANCHOR_ALL = 0xF
View Source
const ANCHOR_BOTTOM = 8
View Source
const ANCHOR_LEFT = 1
View Source
const ANCHOR_RIGHT = 4
View Source
const ANCHOR_TOP = 2
View Source
const MAX_HEIGHT = 100000
View Source
const MAX_WIDTH = 100000
View Source
const MaxInt = int(^uint(0) >> 1)
View Source
const MaxUint = ^uint(0)
View Source
const MenuBarItemMargin = 10
View Source
const MenuBarItemMinWidth = 30
View Source
const MinInt = -MaxInt - 1
View Source
const MinUint = 0
View Source
const PopupMenuItemHeight = 32

Variables

View Source
var CurrentStyle = StyleDarkWhite
View Source
var CursorArrow *glfw.Cursor
View Source
var CursorIBeam *glfw.Cursor
View Source
var CursorPointer *glfw.Cursor
View Source
var CursorResizeHor *glfw.Cursor
View Source
var CursorResizeVer *glfw.Cursor
View Source
var DefaultBackColor color.Color
View Source
var ServiceDrawBorders = false
View Source
var SimpleProgram uint32 = 0
View Source
var SimpleProgramFragment = `#version 330 core

out vec4 color;

uniform vec4 pixelColor;

void main()
{
    color = pixelColor;
}` + "\x00"
View Source
var SimpleProgramLoaded = false
View Source
var SimpleProgramVertex = `#version 330 core

layout (location = 0) in vec3 position;

void main()
{
    gl_Position = vec4(position.x, position.y, position.z, 1.0);
}` + "\x00"
View Source
var UseOpenGL33 bool = false

Functions

func AddPropertyToWidget added in v1.0.2

func AddPropertyToWidget(w Widget, name string, propertyType uiproperties.PropertyType) *uiproperties.Property

func AddUnstyledPropertyToWidget added in v1.0.2

func AddUnstyledPropertyToWidget(w Widget, name string, propertyType uiproperties.PropertyType) *uiproperties.Property

func ColorWithAlpha added in v1.0.2

func ColorWithAlpha(col color.Color, alpha uint8) color.Color

func CreateForm added in v1.0.2

func CreateForm(form Window)

func DecodeImage added in v1.0.3

func DecodeImage(bs []byte) image.Image

func InitDarkBlue added in v1.0.2

func InitDarkBlue(w Widget)

func InitDarkGreen added in v1.0.2

func InitDarkGreen(w Widget)

func InitDarkWhite added in v1.0.3

func InitDarkWhite(w Widget)

func InitDefaultStyle added in v1.0.2

func InitDefaultStyle(w Widget)

func InitLight added in v1.0.2

func InitLight(w Widget)

func InitOpenGL33

func InitOpenGL33()

func InitUI

func InitUI() error

func NewDialogHeader added in v1.0.2

func NewDialogHeader(parent Widget) *dialogHeader

func OnMouseButtonCallback added in v1.0.2

func OnMouseButtonCallback(w *glfw.Window, button glfw.MouseButton, action glfw.Action, mods glfw.ModifierKey)

func OnWindowCharCallback added in v1.0.2

func OnWindowCharCallback(w *glfw.Window, char rune)

func OnWindowClose added in v1.0.2

func OnWindowClose(w *glfw.Window)

func OnWindowCursorPosCallback added in v1.0.2

func OnWindowCursorPosCallback(w *glfw.Window, xpos float64, ypos float64)

func OnWindowFocusCallback added in v1.0.2

func OnWindowFocusCallback(w *glfw.Window, focused bool)

func OnWindowKeyCallback added in v1.0.2

func OnWindowKeyCallback(w *glfw.Window, key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey)

func OnWindowScrollCallback added in v1.0.2

func OnWindowScrollCallback(w *glfw.Window, xoff float64, yoff float64)

func OnWindowSizeCallback added in v1.0.2

func OnWindowSizeCallback(w *glfw.Window, width int, height int)

func ShowErrorMessage added in v1.0.2

func ShowErrorMessage(parent Widget, text string, header string)

func ShowInformationMessage added in v1.0.2

func ShowInformationMessage(parent Widget, text string, header string)

func ShowQuestionMessageOKCancel added in v1.0.2

func ShowQuestionMessageOKCancel(parent Widget, text string, header string, onOK func(), onCancel func())

func ShowQuestionMessageYesNoCancel added in v1.0.2

func ShowQuestionMessageYesNoCancel(parent Widget, text string, header string, onYes func(), onNo func(), onCancel func())

func StartMainForm added in v1.0.2

func StartMainForm(window Window)

func StartModalForm added in v1.0.2

func StartModalForm(parent Window, window Window)

func UnInitUI added in v1.0.2

func UnInitUI()

Types

type Button added in v1.0.2

type Button struct {
	Container

	// Events
	OnPress func(event *Event)
	// contains filtered or unexported fields
}

func NewButton added in v1.0.2

func NewButton(parent Widget, text string, onPress func(event *Event)) *Button

func (*Button) ControlType added in v1.0.2

func (c *Button) ControlType() string

func (*Button) Draw added in v1.0.2

func (c *Button) Draw(ctx DrawContext)

func (*Button) DrawBackground added in v1.0.2

func (c *Button) DrawBackground(ctx DrawContext)

func (*Button) EnabledChanged added in v1.0.2

func (c *Button) EnabledChanged(enabled bool)

func (*Button) FindWidgetUnderPointer added in v1.0.2

func (c *Button) FindWidgetUnderPointer(x, y int) Widget

func (*Button) KeyDown added in v1.0.2

func (c *Button) KeyDown(event *KeyDownEvent) bool

func (*Button) MouseDown added in v1.0.2

func (c *Button) MouseDown(event *MouseDownEvent)

func (*Button) MouseEnter added in v1.0.2

func (c *Button) MouseEnter()

func (*Button) MouseLeave added in v1.0.2

func (c *Button) MouseLeave()

func (*Button) MouseUp added in v1.0.2

func (c *Button) MouseUp(event *MouseUpEvent)

func (*Button) Press added in v1.0.2

func (c *Button) Press() bool

func (*Button) SetChecked added in v1.0.2

func (c *Button) SetChecked(checked bool)

func (*Button) SetDrawBackground added in v1.0.2

func (c *Button) SetDrawBackground(drawBackground bool)

func (*Button) SetEnabled added in v1.0.2

func (c *Button) SetEnabled(enabled bool)

func (*Button) SetForeColor added in v1.0.2

func (c *Button) SetForeColor(foreColor color.Color)

func (*Button) SetImage added in v1.0.2

func (c *Button) SetImage(img image.Image)

func (*Button) SetImageBeforeText added in v1.0.3

func (c *Button) SetImageBeforeText(imageBeforeText bool)

func (*Button) SetImageDisabled added in v1.0.2

func (c *Button) SetImageDisabled(img image.Image)

func (*Button) SetImageSize added in v1.0.2

func (c *Button) SetImageSize(width, height int)

func (*Button) SetPadding added in v1.0.2

func (c *Button) SetPadding(padding int)

func (*Button) SetShowImage added in v1.0.2

func (c *Button) SetShowImage(showImage bool)

func (*Button) SetShowText added in v1.0.2

func (c *Button) SetShowText(showText bool)

func (*Button) SetText added in v1.0.2

func (c *Button) SetText(text string)

func (*Button) SetTextHAlign added in v1.0.2

func (c *Button) SetTextHAlign(textHAlign canvas.HAlign)

func (*Button) SetTextImageVerticalOrientation added in v1.0.2

func (c *Button) SetTextImageVerticalOrientation(textImageVerticalOrientation bool)

func (*Button) SetTextVAlign added in v1.0.2

func (c *Button) SetTextVAlign(textVAlign canvas.VAlign)

func (*Button) Subclass added in v1.0.2

func (c *Button) Subclass() string

func (*Button) Text added in v1.0.2

func (c *Button) Text() string

func (*Button) TextHAlign added in v1.0.2

func (c *Button) TextHAlign() canvas.HAlign

func (*Button) TextVAlign added in v1.0.2

func (c *Button) TextVAlign() canvas.VAlign

type CSS added in v1.0.2

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

func (*CSS) Parse added in v1.0.2

func (c *CSS) Parse(cssText string)

type CSSLine added in v1.0.2

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

type CSSProperty added in v1.0.2

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

type CheckBox added in v1.0.2

type CheckBox struct {
	Container

	OnCheckedChanged func(checkBox *CheckBox, checked bool)
	// contains filtered or unexported fields
}

func NewCheckBox added in v1.0.2

func NewCheckBox(parent Widget, text string) *CheckBox

func (*CheckBox) ControlType added in v1.0.2

func (c *CheckBox) ControlType() string

func (*CheckBox) Dispose added in v1.0.2

func (c *CheckBox) Dispose()

func (*CheckBox) EnabledChanged added in v1.0.2

func (c *CheckBox) EnabledChanged(enabled bool)

func (*CheckBox) InitControl added in v1.0.2

func (c *CheckBox) InitControl(parent Widget, w Widget)

func (*CheckBox) IsChecked added in v1.0.2

func (c *CheckBox) IsChecked() bool

func (*CheckBox) MouseClick added in v1.0.2

func (c *CheckBox) MouseClick(event *MouseClickEvent)

func (*CheckBox) SetChecked added in v1.0.2

func (c *CheckBox) SetChecked(isChecked bool)

func (*CheckBox) SetEnabled added in v1.0.2

func (c *CheckBox) SetEnabled(enabled bool)

func (*CheckBox) SetText added in v1.0.2

func (c *CheckBox) SetText(text string)

func (*CheckBox) Text added in v1.0.2

func (c *CheckBox) Text() string

type ClipSettings

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

type ComboBox added in v1.0.2

type ComboBox struct {
	Container
	CurrentItemIndex int
	Items            []*ComboBoxItem

	OnCurrentIndexChanged func(event *ComboBoxEvent)
	// contains filtered or unexported fields
}

func NewComboBox added in v1.0.2

func NewComboBox(parent Widget) *ComboBox

func (*ComboBox) AddItem added in v1.0.2

func (c *ComboBox) AddItem(text string, userData interface{})

func (*ComboBox) ClosePopup added in v1.0.2

func (c *ComboBox) ClosePopup()

func (*ComboBox) ControlType added in v1.0.2

func (c *ComboBox) ControlType() string

func (*ComboBox) CurrentItemKey added in v1.0.2

func (c *ComboBox) CurrentItemKey() interface{}

func (*ComboBox) Draw added in v1.0.2

func (c *ComboBox) Draw(ctx DrawContext)

func (*ComboBox) FindWidgetUnderPointer added in v1.0.2

func (c *ComboBox) FindWidgetUnderPointer(x, y int) Widget

func (*ComboBox) KeyDown added in v1.0.2

func (c *ComboBox) KeyDown(event *KeyDownEvent) bool

func (*ComboBox) MouseDown added in v1.0.2

func (c *ComboBox) MouseDown(event *MouseDownEvent)

func (*ComboBox) MouseUp added in v1.0.2

func (c *ComboBox) MouseUp(event *MouseUpEvent)

func (*ComboBox) Press added in v1.0.2

func (c *ComboBox) Press()

func (*ComboBox) SetCurrentItemIndex added in v1.0.2

func (c *ComboBox) SetCurrentItemIndex(index int)

func (*ComboBox) SetCurrentItemKey added in v1.0.2

func (c *ComboBox) SetCurrentItemKey(key string)

func (*ComboBox) ShowPopupForm added in v1.0.2

func (c *ComboBox) ShowPopupForm()

func (*ComboBox) TabStop added in v1.0.2

func (c *ComboBox) TabStop() bool

func (*ComboBox) UpdateStyle added in v1.0.2

func (c *ComboBox) UpdateStyle()

type ComboBoxEvent added in v1.0.2

type ComboBoxEvent struct {
	Event
	CurrentIndex int
	Item         *ComboBoxItem
}

type ComboBoxItem added in v1.0.2

type ComboBoxItem struct {
	UserDataContainer
	Text string
}

type Container added in v1.0.2

type Container struct {
	Control
	Controls     []Widget
	PopupWidgets []Widget
	// contains filtered or unexported fields
}

func (*Container) AddWidgetOnGrid added in v1.0.2

func (c *Container) AddWidgetOnGrid(w Widget, x int, y int)

func (*Container) AppendPopupWidget added in v1.0.2

func (c *Container) AppendPopupWidget(w Widget)

func (*Container) ClearFocus added in v1.0.2

func (c *Container) ClearFocus()

func (*Container) ClearHover added in v1.0.2

func (c *Container) ClearHover()

func (*Container) ClearLayoutCache added in v1.0.2

func (c *Container) ClearLayoutCache()

func (*Container) ClearRadioButtons added in v1.0.2

func (c *Container) ClearRadioButtons()

func (*Container) CloseAfterPopupWidget added in v1.0.2

func (c *Container) CloseAfterPopupWidget(w Widget)

func (*Container) CloseAllPopup added in v1.0.2

func (c *Container) CloseAllPopup()

func (*Container) CloseTopPopup added in v1.0.2

func (c *Container) CloseTopPopup()

func (*Container) ControlType added in v1.0.2

func (c *Container) ControlType() string

func (*Container) Dispose added in v1.0.2

func (c *Container) Dispose()

func (*Container) Draw added in v1.0.2

func (c *Container) Draw(ctx DrawContext)

func (*Container) FindWidgetUnderPointer added in v1.0.2

func (c *Container) FindWidgetUnderPointer(x, y int) Widget

func (*Container) InitControl added in v1.0.2

func (c *Container) InitControl(parent Widget, w Widget)

func (*Container) MaxHeight added in v1.0.2

func (c *Container) MaxHeight() int

func (*Container) MaxWidth added in v1.0.2

func (c *Container) MaxWidth() int

func (*Container) MinHeight added in v1.0.2

func (c *Container) MinHeight() int

func (*Container) MinWidth added in v1.0.2

func (c *Container) MinWidth() int

func (*Container) MouseClick added in v1.0.2

func (c *Container) MouseClick(event *MouseClickEvent)

func (*Container) MouseDown added in v1.0.2

func (c *Container) MouseDown(event *MouseDownEvent)

func (*Container) MouseDrop added in v1.0.2

func (c *Container) MouseDrop(event *MouseDropEvent)

func (*Container) MouseMove added in v1.0.2

func (c *Container) MouseMove(event *MouseMoveEvent)

func (*Container) MouseUp added in v1.0.2

func (c *Container) MouseUp(event *MouseUpEvent)

func (*Container) MouseValidateDrop added in v1.0.2

func (c *Container) MouseValidateDrop(event *MouseValidateDropEvent)

func (*Container) MouseWheel added in v1.0.2

func (c *Container) MouseWheel(event *MouseWheelEvent)

func (*Container) RemoveAllWidgets added in v1.0.2

func (c *Container) RemoveAllWidgets()

func (*Container) RemoveWidget added in v1.0.2

func (c *Container) RemoveWidget(w Widget)

func (*Container) SetAbsolutePositioning added in v1.0.2

func (c *Container) SetAbsolutePositioning(absolutePositioning bool)

func (*Container) SetCellPadding added in v1.0.2

func (c *Container) SetCellPadding(cellPadding int)

func (*Container) SetHeight added in v1.0.2

func (c *Container) SetHeight(height int)

func (*Container) SetPanelPadding added in v1.0.2

func (c *Container) SetPanelPadding(panelPadding int)

func (*Container) SetSize added in v1.0.2

func (c *Container) SetSize(width int, height int)

func (*Container) SetWidth added in v1.0.2

func (c *Container) SetWidth(width int)

func (*Container) String added in v1.0.2

func (c *Container) String(level int) string

func (*Container) UpdateLayout added in v1.0.2

func (c *Container) UpdateLayout()

func (*Container) UpdateStyle added in v1.0.2

func (c *Container) UpdateStyle()

func (*Container) Widgets added in v1.0.2

func (c *Container) Widgets() []Widget

func (*Container) XExpandable added in v1.0.2

func (c *Container) XExpandable() bool

func (*Container) YExpandable added in v1.0.2

func (c *Container) YExpandable() bool

type ContainerGridColumnInfo added in v1.0.2

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

type ContainerGridRowInfo added in v1.0.2

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

type Control added in v1.0.2

type Control struct {
	utils.Obj
	UserDataContainer

	InnerSizeOverloaded   bool
	InnerWidthOverloaded  int
	InnerHeightOverloaded int

	OnContextMenuNeed func(x, y int) IMenu

	OnMouseDrop func(droppedValue interface{}, x, y int)
	// contains filtered or unexported fields
}

func NewControl added in v1.0.2

func NewControl(parent Widget) *Control

func (*Control) AccentColor added in v1.0.2

func (c *Control) AccentColor() color.Color

func (*Control) AcceptsReturn added in v1.0.2

func (c *Control) AcceptsReturn() bool

func (*Control) AcceptsTab added in v1.0.2

func (c *Control) AcceptsTab() bool

func (*Control) AddProperty added in v1.0.2

func (c *Control) AddProperty(name string, prop *uiproperties.Property)

func (*Control) Anchors added in v1.0.2

func (c *Control) Anchors() int

func (*Control) ApplyStyleLine added in v1.0.2

func (c *Control) ApplyStyleLine(controlName string, controlType string, styleClass string, stylePseudoClass string, propertyName string, value string)

func (*Control) BackColor added in v1.0.2

func (c *Control) BackColor() color.Color

func (*Control) BeginDrag added in v1.0.2

func (c *Control) BeginDrag(draggingObject interface{})

func (*Control) BeginUpdate added in v1.0.2

func (c *Control) BeginUpdate()

func (*Control) BorderColors added in v1.0.2

func (c *Control) BorderColors() (color.Color, color.Color, color.Color, color.Color)

func (*Control) BottomBorderWidth added in v1.0.2

func (c *Control) BottomBorderWidth() int

func (*Control) Classes added in v1.0.2

func (c *Control) Classes() []string

func (*Control) ClearFocus added in v1.0.2

func (c *Control) ClearFocus()

func (*Control) ClearHover added in v1.0.2

func (c *Control) ClearHover()

func (*Control) ClearLayoutCache added in v1.0.2

func (c *Control) ClearLayoutCache()

func (*Control) ClearRadioButtons added in v1.0.2

func (c *Control) ClearRadioButtons()

func (*Control) ClientHeight added in v1.0.2

func (c *Control) ClientHeight() int

func (*Control) ClientWidth added in v1.0.2

func (c *Control) ClientWidth() int

func (*Control) ClosePopup added in v1.0.2

func (c *Control) ClosePopup()

func (*Control) CloseTopPopup added in v1.0.2

func (c *Control) CloseTopPopup()

func (*Control) ContextMenu added in v1.0.2

func (c *Control) ContextMenu() IMenu

func (*Control) ControlType added in v1.0.2

func (c *Control) ControlType() string

func (*Control) CurrentStyleValueScore added in v1.0.2

func (c *Control) CurrentStyleValueScore(subclass string, propertyName string) int

func (*Control) Dispose added in v1.0.2

func (c *Control) Dispose()

func (*Control) Disposed added in v1.0.2

func (c *Control) Disposed() bool

func (*Control) Draw added in v1.0.2

func (c *Control) Draw(ctx DrawContext)

func (*Control) DrawBackground added in v1.0.2

func (c *Control) DrawBackground(ctx DrawContext)

func (*Control) DrawBorders added in v1.0.2

func (c *Control) DrawBorders(ctx DrawContext)

func (*Control) DrawControl added in v1.0.2

func (c *Control) DrawControl(ctx DrawContext)

func (*Control) DrawScrollBars added in v1.0.2

func (c *Control) DrawScrollBars(ctx DrawContext)

func (*Control) EnabledChanged added in v1.0.2

func (c *Control) EnabledChanged(enabled bool)

func (*Control) EndUpdate added in v1.0.2

func (c *Control) EndUpdate()

func (*Control) FindWidgetUnderPointer added in v1.0.2

func (c *Control) FindWidgetUnderPointer(x, y int) Widget

func (*Control) FirstFocusControl added in v1.0.2

func (c *Control) FirstFocusControl() Widget

func (*Control) Focus added in v1.0.2

func (c *Control) Focus()

func (*Control) FocusChanged added in v1.0.2

func (c *Control) FocusChanged(focus bool)

func (*Control) FontBold added in v1.0.2

func (c *Control) FontBold() bool

func (*Control) FontFamily added in v1.0.2

func (c *Control) FontFamily() string

func (*Control) FontItalic added in v1.0.2

func (c *Control) FontItalic() bool

func (*Control) FontSize added in v1.0.2

func (c *Control) FontSize() float64

func (*Control) ForeColor added in v1.0.2

func (c *Control) ForeColor() color.Color

func (*Control) FullPath added in v1.0.2

func (c *Control) FullPath() string

func (*Control) GridX added in v1.0.2

func (c *Control) GridX() int

func (*Control) GridY added in v1.0.2

func (c *Control) GridY() int

func (*Control) HasFocus added in v1.0.2

func (c *Control) HasFocus() bool

func (*Control) Height added in v1.0.2

func (c *Control) Height() int

func (*Control) Hover added in v1.0.2

func (c *Control) Hover() bool

func (*Control) InactiveColor added in v1.0.2

func (c *Control) InactiveColor() color.Color

func (*Control) Init added in v1.0.2

func (c *Control) Init()

func (*Control) InitControl added in v1.0.2

func (c *Control) InitControl(parent Widget, w Widget)

func (*Control) Initialized added in v1.0.2

func (c *Control) Initialized() bool

func (*Control) InnerHeight added in v1.0.2

func (c *Control) InnerHeight() int

func (*Control) InnerWidth added in v1.0.2

func (c *Control) InnerWidth() int

func (*Control) IsTabPlate added in v1.0.2

func (c *Control) IsTabPlate() bool

func (*Control) IsVisible added in v1.0.2

func (c *Control) IsVisible() bool

func (*Control) IsVisibleRec added in v1.0.2

func (c *Control) IsVisibleRec() bool

func (*Control) KeyChar added in v1.0.2

func (c *Control) KeyChar(event *KeyCharEvent)

func (*Control) KeyDown added in v1.0.2

func (c *Control) KeyDown(event *KeyDownEvent) bool

func (*Control) KeyUp added in v1.0.2

func (c *Control) KeyUp(event *KeyUpEvent)

func (*Control) LeftBorderWidth added in v1.0.2

func (c *Control) LeftBorderWidth() int

func (*Control) MaxHeight added in v1.0.2

func (c *Control) MaxHeight() int

func (*Control) MaxWidth added in v1.0.2

func (c *Control) MaxWidth() int

func (*Control) MinHeight added in v1.0.2

func (c *Control) MinHeight() int

func (*Control) MinWidth added in v1.0.2

func (c *Control) MinWidth() int

func (*Control) MouseClick added in v1.0.2

func (c *Control) MouseClick(event *MouseClickEvent)

func (*Control) MouseCursor added in v1.0.2

func (c *Control) MouseCursor() MouseCursor

func (*Control) MouseDblClick added in v1.0.2

func (c *Control) MouseDblClick(event *MouseDblClickEvent)

func (*Control) MouseDown added in v1.0.2

func (c *Control) MouseDown(event *MouseDownEvent)

func (*Control) MouseDrop added in v1.0.2

func (c *Control) MouseDrop(event *MouseDropEvent)

func (*Control) MouseEnter added in v1.0.2

func (c *Control) MouseEnter()

func (*Control) MouseLeave added in v1.0.2

func (c *Control) MouseLeave()

func (*Control) MouseMove added in v1.0.2

func (c *Control) MouseMove(event *MouseMoveEvent)

func (*Control) MouseUp added in v1.0.2

func (c *Control) MouseUp(event *MouseUpEvent)

func (*Control) MouseValidateDrop added in v1.0.2

func (c *Control) MouseValidateDrop(event *MouseValidateDropEvent)

func (*Control) MouseWheel added in v1.0.2

func (c *Control) MouseWheel(event *MouseWheelEvent)

func (*Control) Name added in v1.0.2

func (c *Control) Name() string

func (*Control) NextFocusControl added in v1.0.2

func (c *Control) NextFocusControl() Widget

func (*Control) OnInit added in v1.0.2

func (c *Control) OnInit()

func (*Control) OnScroll added in v1.0.2

func (c *Control) OnScroll(scrollPositionX int, scrollPositionY int)

func (*Control) Parent added in v1.0.2

func (c *Control) Parent() Widget

func (*Control) ProcessFindWidgetUnderPointer added in v1.0.2

func (c *Control) ProcessFindWidgetUnderPointer(x, y int) Widget

func (*Control) ProcessKeyChar added in v1.0.2

func (c *Control) ProcessKeyChar(event *KeyCharEvent)

func (*Control) ProcessKeyDown added in v1.0.2

func (c *Control) ProcessKeyDown(event *KeyDownEvent) bool

func (*Control) ProcessKeyUp added in v1.0.2

func (c *Control) ProcessKeyUp(event *KeyUpEvent)

func (*Control) ProcessMouseClick added in v1.0.2

func (c *Control) ProcessMouseClick(event *MouseClickEvent)

func (*Control) ProcessMouseDblClick added in v1.0.2

func (c *Control) ProcessMouseDblClick(event *MouseDblClickEvent)

func (*Control) ProcessMouseDown added in v1.0.2

func (c *Control) ProcessMouseDown(event *MouseDownEvent)

func (*Control) ProcessMouseMove added in v1.0.2

func (c *Control) ProcessMouseMove(event *MouseMoveEvent)

func (*Control) ProcessMouseUp added in v1.0.2

func (c *Control) ProcessMouseUp(event *MouseUpEvent)

func (*Control) ProcessMouseWheel added in v1.0.2

func (c *Control) ProcessMouseWheel(event *MouseWheelEvent)

func (*Control) RectClientAreaOnWindow added in v1.0.2

func (c *Control) RectClientAreaOnWindow() (int, int)

func (*Control) RectOnWindow added in v1.0.2

func (c *Control) RectOnWindow() (int, int)

func (*Control) ResetInnerSizeDirect added in v1.0.2

func (c *Control) ResetInnerSizeDirect()

func (*Control) RightBorderWidth added in v1.0.2

func (c *Control) RightBorderWidth() int

func (*Control) ScrollEnsureVisible added in v1.0.2

func (c *Control) ScrollEnsureVisible(x1, y1 int)

func (*Control) ScrollOffsetX added in v1.0.2

func (c *Control) ScrollOffsetX() int

func (*Control) ScrollOffsetY added in v1.0.2

func (c *Control) ScrollOffsetY() int

func (*Control) SetAnchors added in v1.0.2

func (c *Control) SetAnchors(anchors int)

func (*Control) SetBackColor added in v1.0.2

func (c *Control) SetBackColor(backColor color.Color)

func (*Control) SetBorderBottom added in v1.0.2

func (c *Control) SetBorderBottom(width int, col color.Color)

func (*Control) SetBorderLeft added in v1.0.2

func (c *Control) SetBorderLeft(width int, col color.Color)

func (*Control) SetBorderRight added in v1.0.2

func (c *Control) SetBorderRight(width int, col color.Color)

func (*Control) SetBorderTop added in v1.0.2

func (c *Control) SetBorderTop(width int, col color.Color)

func (*Control) SetBorders added in v1.0.2

func (c *Control) SetBorders(width int, col color.Color)

func (*Control) SetContextMenu added in v1.0.2

func (c *Control) SetContextMenu(menu IMenu)

func (*Control) SetEnabled added in v1.0.2

func (c *Control) SetEnabled(enabled bool)

func (*Control) SetFixedSize added in v1.0.2

func (c *Control) SetFixedSize(w int, h int)

func (*Control) SetFocus added in v1.0.2

func (c *Control) SetFocus(focus bool)

func (*Control) SetFontSize added in v1.0.2

func (c *Control) SetFontSize(fontSize float64)

func (*Control) SetForeColor added in v1.0.2

func (c *Control) SetForeColor(foreColor color.Color)

func (*Control) SetGridPos added in v1.0.2

func (c *Control) SetGridPos(x int, y int)

func (*Control) SetGridX added in v1.0.2

func (c *Control) SetGridX(gridX int)

func (*Control) SetGridY added in v1.0.2

func (c *Control) SetGridY(gridY int)

func (*Control) SetHeight added in v1.0.2

func (c *Control) SetHeight(height int)

func (*Control) SetHorizontalScrollVisible added in v1.0.2

func (c *Control) SetHorizontalScrollVisible(horizontalScrollVisible bool)

func (*Control) SetHover added in v1.0.2

func (c *Control) SetHover(hover bool)

func (*Control) SetInnerSizeDirect added in v1.0.2

func (c *Control) SetInnerSizeDirect(w int, h int)

func (*Control) SetIsTabPlate added in v1.0.2

func (c *Control) SetIsTabPlate(isTabPlate bool)

func (*Control) SetMaxHeight added in v1.0.2

func (c *Control) SetMaxHeight(maxHeight int)

func (*Control) SetMaxWidth added in v1.0.2

func (c *Control) SetMaxWidth(maxWidth int)

func (*Control) SetMinHeight added in v1.0.2

func (c *Control) SetMinHeight(minHeight int)

func (*Control) SetMinWidth added in v1.0.2

func (c *Control) SetMinWidth(minWidth int)

func (*Control) SetMouseCursor added in v1.0.2

func (c *Control) SetMouseCursor(cursor MouseCursor)

func (*Control) SetName added in v1.0.2

func (c *Control) SetName(name string)

func (*Control) SetOnKeyDown added in v1.0.2

func (c *Control) SetOnKeyDown(callback func(event *KeyDownEvent) bool)

func (*Control) SetParent added in v1.0.2

func (c *Control) SetParent(p Widget)

func (*Control) SetPos added in v1.0.2

func (c *Control) SetPos(x, y int)

func (*Control) SetSize added in v1.0.2

func (c *Control) SetSize(w, h int)

func (*Control) SetStyledValue added in v1.0.2

func (c *Control) SetStyledValue(subclass string, propertyName string, value string, score int)

func (*Control) SetTabIndex added in v1.0.2

func (c *Control) SetTabIndex(index int)

func (*Control) SetTheme added in v1.0.2

func (c *Control) SetTheme(theme string)

func (*Control) SetTooltip added in v1.0.2

func (c *Control) SetTooltip(text string)

func (*Control) SetVerticalScrollVisible added in v1.0.2

func (c *Control) SetVerticalScrollVisible(verticalScrollVisible bool)

func (*Control) SetVisible added in v1.0.2

func (c *Control) SetVisible(visible bool)

func (*Control) SetWidth added in v1.0.2

func (c *Control) SetWidth(width int)

func (*Control) SetWindow added in v1.0.2

func (c *Control) SetWindow(w Window)

func (*Control) SetX added in v1.0.2

func (c *Control) SetX(x int)

func (*Control) SetXExpandable added in v1.0.2

func (c *Control) SetXExpandable(xExpandable bool)

func (*Control) SetY added in v1.0.2

func (c *Control) SetY(y int)

func (*Control) SetYExpandable added in v1.0.2

func (c *Control) SetYExpandable(yExpandable bool)

func (*Control) String added in v1.0.2

func (c *Control) String(level int) string

func (*Control) StyledValue added in v1.0.2

func (c *Control) StyledValue(subclass string, propertyName string) interface{}

func (*Control) Subclass added in v1.0.2

func (c *Control) Subclass() string

func (*Control) TabIndex added in v1.0.2

func (c *Control) TabIndex() int

func (*Control) Text added in v1.0.2

func (c *Control) Text() string

func (*Control) Theme added in v1.0.2

func (c *Control) Theme() string

func (*Control) Tooltip added in v1.0.2

func (c *Control) Tooltip() string

func (*Control) TopBorderWidth added in v1.0.2

func (c *Control) TopBorderWidth() int

func (*Control) TranslateX added in v1.0.2

func (c *Control) TranslateX(x int) int

func (*Control) TranslateY added in v1.0.2

func (c *Control) TranslateY(y int) int

func (*Control) Update added in v1.0.2

func (c *Control) Update(source string)

func (*Control) UpdateLayout added in v1.0.2

func (c *Control) UpdateLayout()

func (*Control) UpdateStyle added in v1.0.2

func (c *Control) UpdateStyle()

func (*Control) VisibleInnerRect added in v1.0.2

func (c *Control) VisibleInnerRect() Rect

func (*Control) Widgets added in v1.0.2

func (c *Control) Widgets() []Widget

func (*Control) Width added in v1.0.2

func (c *Control) Width() int

func (*Control) Window added in v1.0.2

func (c *Control) Window() Window

func (*Control) X added in v1.0.2

func (c *Control) X() int

func (*Control) XExpandable added in v1.0.2

func (c *Control) XExpandable() bool

func (*Control) Y added in v1.0.2

func (c *Control) Y() int

func (*Control) YExpandable added in v1.0.2

func (c *Control) YExpandable() bool

type CoordinateTranslator added in v1.0.2

type CoordinateTranslator interface {
	TranslateX(x int) int
	TranslateY(y int) int
}

type Dialog added in v1.0.2

type Dialog struct {
	Panel

	//menuWidth  int
	//menuHeight int
	CloseEvent func()

	OnAccept func()
	OnReject func()

	TryAccept func() bool
	OnShow    func()
	// contains filtered or unexported fields
}

func NewDialog added in v1.0.2

func NewDialog(parent Widget, title string, width, height int) *Dialog

func (*Dialog) Accept added in v1.0.2

func (c *Dialog) Accept()

func (*Dialog) Close added in v1.0.2

func (c *Dialog) Close()

func (*Dialog) ClosePopup added in v1.0.2

func (c *Dialog) ClosePopup()

func (*Dialog) ContentPanel added in v1.0.2

func (c *Dialog) ContentPanel() *Panel

func (*Dialog) ControlType added in v1.0.2

func (c *Dialog) ControlType() string

func (*Dialog) Dispose added in v1.0.2

func (c *Dialog) Dispose()

func (*Dialog) KeyDown added in v1.0.2

func (c *Dialog) KeyDown(event *KeyDownEvent) bool

func (*Dialog) OnInit added in v1.0.2

func (c *Dialog) OnInit()

func (*Dialog) Reject added in v1.0.2

func (c *Dialog) Reject()

func (*Dialog) Resize added in v1.0.2

func (c *Dialog) Resize(w, h int)

func (*Dialog) SetAcceptButton added in v1.0.2

func (c *Dialog) SetAcceptButton(acceptButton *Button)

func (*Dialog) SetRejectButton added in v1.0.2

func (c *Dialog) SetRejectButton(rejectButton *Button)

func (*Dialog) SetTitle added in v1.0.2

func (c *Dialog) SetTitle(title string)

func (*Dialog) ShowDialog added in v1.0.2

func (c *Dialog) ShowDialog()

func (*Dialog) ShowDialogAtPos added in v1.0.2

func (c *Dialog) ShowDialogAtPos(x, y int)

type DrawContext

type DrawContext interface {
	Init()

	SetColor(col color.Color)
	SetStrokeWidth(w int)
	SetFontFamily(fontFamily string)
	SetFontSize(s float64)
	SetTextAlign(h canvas.HAlign, v canvas.VAlign)
	SetUnderline(underline bool)

	DrawLine(x1, y1, x2, y2 int)
	DrawEllipse(x, y, width, height int)
	DrawRect(x, y, width, height int)
	FillRect(x, y, width, height int)
	Save()
	Load()
	Translate(x, y int)
	//Clip(x, y, width, height int)
	ClipIn(x, y, width, height int)
	DrawImage(x, y, width, height int, img image.Image)
	DrawText(x, y, width, height int, text string)
	MeasureText(text string) (int, int)

	TranslatedX() int
	TranslatedY() int
	ClippedRegion() (int, int, int, int)

	GraphContextImage() *image.RGBA
	GG() *gg.Context

	State() canvas.CanvasDirectState

	Finish()
}

type DrawContextBase

type DrawContextBase struct {
	// Current settings
	CurrentColor color.Color
	StrokeWidth  int
	FontFamily   string
	FontSize     float64
	UnderLine    bool
	TextHAlign   canvas.HAlign
	TextVAlign   canvas.VAlign

	CurrentClipSettings ClipSettings
	StackClipSettings   stack.Stack
	WindowWidth         int
	WindowHeight        int
	WindowWidthScale    float32
	WindowHeightScale   float32

	Window *glfw.Window
}

func (*DrawContextBase) Finish

func (c *DrawContextBase) Finish()

func (*DrawContextBase) InitBase

func (c *DrawContextBase) InitBase()

func (*DrawContextBase) Load

func (c *DrawContextBase) Load()

func (*DrawContextBase) Save

func (c *DrawContextBase) Save()

func (*DrawContextBase) SetColor

func (c *DrawContextBase) SetColor(col color.Color)

func (*DrawContextBase) SetFontFamily

func (c *DrawContextBase) SetFontFamily(fontFamily string)

func (*DrawContextBase) SetFontSize

func (c *DrawContextBase) SetFontSize(s float64)

func (*DrawContextBase) SetStrokeWidth

func (c *DrawContextBase) SetStrokeWidth(w int)

func (*DrawContextBase) SetTextAlign

func (c *DrawContextBase) SetTextAlign(h canvas.HAlign, v canvas.VAlign)

func (*DrawContextBase) SetUnderline

func (c *DrawContextBase) SetUnderline(underline bool)

func (*DrawContextBase) TranslateAndClip

func (c *DrawContextBase) TranslateAndClip(x, y, width, height int)

type DrawContextGL

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

func NewDrawContext

func NewDrawContext(windowWidth, windowHeight int) *DrawContextGL

func (*DrawContextGL) Clip

func (c *DrawContextGL) Clip(x, y, width, height int)

func (*DrawContextGL) DrawEllipse

func (c *DrawContextGL) DrawEllipse(x, y, width, height int)

func (*DrawContextGL) DrawPolygon

func (c *DrawContextGL) DrawPolygon(x, y, width, height int)

func (*DrawContextGL) DrawText

func (c *DrawContextGL) DrawText(x, y, width, height int, text string)

func (*DrawContextGL) SetColor

func (c *DrawContextGL) SetColor(col color.Color)

func (*DrawContextGL) SetFont

func (c *DrawContextGL) SetFont(fontFamily string, fontSize float64, bold, italic, underline bool)

func (*DrawContextGL) UnClip

func (c *DrawContextGL) UnClip()

type DrawContextOpenGL

type DrawContextOpenGL struct {
	DrawContextBase
}

func NewDrawContextOpenGL

func NewDrawContextOpenGL(window *glfw.Window) *DrawContextOpenGL

func (*DrawContextOpenGL) Clip

func (c *DrawContextOpenGL) Clip(x, y, width, height int)

func (*DrawContextOpenGL) ClipIn

func (c *DrawContextOpenGL) ClipIn(x, y, width, height int)

func (*DrawContextOpenGL) ClippedRegion

func (c *DrawContextOpenGL) ClippedRegion() (int, int, int, int)

func (*DrawContextOpenGL) DrawEllipse

func (c *DrawContextOpenGL) DrawEllipse(x, y, width, height int)

func (*DrawContextOpenGL) DrawImage

func (c *DrawContextOpenGL) DrawImage(x, y, width, height int, img image.Image)

func (*DrawContextOpenGL) DrawLine

func (c *DrawContextOpenGL) DrawLine(x1, y1, x2, y2 int)

func (*DrawContextOpenGL) DrawRect

func (c *DrawContextOpenGL) DrawRect(x, y, width, height int)

func (*DrawContextOpenGL) DrawText

func (c *DrawContextOpenGL) DrawText(x, y, width, height int, text string)

func (*DrawContextOpenGL) FillRect

func (c *DrawContextOpenGL) FillRect(x, y, width, height int)

func (*DrawContextOpenGL) Finish

func (c *DrawContextOpenGL) Finish()

func (*DrawContextOpenGL) GG

func (c *DrawContextOpenGL) GG() *gg.Context

func (*DrawContextOpenGL) GraphContextImage

func (c *DrawContextOpenGL) GraphContextImage() *image.RGBA

func (*DrawContextOpenGL) Init

func (c *DrawContextOpenGL) Init()

func (*DrawContextOpenGL) Load

func (c *DrawContextOpenGL) Load()

func (*DrawContextOpenGL) MeasureText

func (c *DrawContextOpenGL) MeasureText(text string) (int, int)

func (*DrawContextOpenGL) Save

func (c *DrawContextOpenGL) Save()

func (*DrawContextOpenGL) State

func (*DrawContextOpenGL) Translate

func (c *DrawContextOpenGL) Translate(x, y int)

func (*DrawContextOpenGL) TranslatedX

func (c *DrawContextOpenGL) TranslatedX() int

func (*DrawContextOpenGL) TranslatedY

func (c *DrawContextOpenGL) TranslatedY() int

type DrawContextSW

type DrawContextSW struct {
	DrawContextBase
	// contains filtered or unexported fields
}

func NewDrawContextSW

func NewDrawContextSW(window *glfw.Window) *DrawContextSW

func NewDrawContextSWSpecial

func NewDrawContextSWSpecial(width, height int) *DrawContextSW

func (*DrawContextSW) ClipIn

func (c *DrawContextSW) ClipIn(x, y, width, height int)

func (*DrawContextSW) ClippedRegion

func (c *DrawContextSW) ClippedRegion() (int, int, int, int)

func (*DrawContextSW) DrawEllipse

func (c *DrawContextSW) DrawEllipse(x, y, width, height int)

func (*DrawContextSW) DrawImage

func (c *DrawContextSW) DrawImage(x, y, width, height int, img image.Image)

func (*DrawContextSW) DrawLine

func (c *DrawContextSW) DrawLine(x1, y1, x2, y2 int)

func (*DrawContextSW) DrawRect

func (c *DrawContextSW) DrawRect(x, y, width, height int)

func (*DrawContextSW) DrawText

func (c *DrawContextSW) DrawText(x, y, width, height int, text string)

func (*DrawContextSW) FillRect

func (c *DrawContextSW) FillRect(x, y, width, height int)

func (*DrawContextSW) Finish

func (c *DrawContextSW) Finish()

func (*DrawContextSW) GG

func (c *DrawContextSW) GG() *gg.Context

func (*DrawContextSW) GraphContextImage

func (c *DrawContextSW) GraphContextImage() *image.RGBA

func (*DrawContextSW) Init

func (c *DrawContextSW) Init()

func (*DrawContextSW) Load

func (c *DrawContextSW) Load()

func (*DrawContextSW) MeasureText

func (c *DrawContextSW) MeasureText(text string) (int, int)

func (*DrawContextSW) Save

func (c *DrawContextSW) Save()

func (*DrawContextSW) State

func (*DrawContextSW) Translate

func (c *DrawContextSW) Translate(x, y int)

func (*DrawContextSW) TranslatedX

func (c *DrawContextSW) TranslatedX() int

func (*DrawContextSW) TranslatedY

func (c *DrawContextSW) TranslatedY() int

type Event added in v1.0.2

type Event struct {
	UserDataContainer
	Sender    interface{}
	Modifiers KeyModifiers
	Ignore    bool
}

func NewEvent added in v1.0.2

func NewEvent(sender interface{}) *Event

func (*Event) PosX added in v1.0.2

func (c *Event) PosX() int

func (*Event) PosY added in v1.0.2

func (c *Event) PosY() int

func (*Event) SetPosX added in v1.0.2

func (c *Event) SetPosX(x int)

func (*Event) SetPosY added in v1.0.2

func (c *Event) SetPosY(y int)

type Form added in v1.0.2

type Form struct {
	utils.Obj

	OnKeyDown func(event *KeyDownEvent) bool
	// contains filtered or unexported fields
}

func NewForm added in v1.0.2

func NewForm() *Form

func (*Form) Accept added in v1.0.2

func (c *Form) Accept()

func (*Form) AcceptButton added in v1.0.2

func (c *Form) AcceptButton(ev *Event)

func (*Form) AddWidget added in v1.0.2

func (c *Form) AddWidget(w Widget)

func (*Form) AppendPopup added in v1.0.2

func (c *Form) AppendPopup(w Widget)

func (*Form) BeginDrag added in v1.0.2

func (c *Form) BeginDrag(draggingObject interface{})

func (*Form) CentralWidget added in v1.0.2

func (c *Form) CentralWidget() Widget

func (*Form) Close added in v1.0.2

func (c *Form) Close()

func (*Form) CloseAfterPopupWidget added in v1.0.2

func (c *Form) CloseAfterPopupWidget(w Widget)

func (*Form) CloseAllPopup added in v1.0.2

func (c *Form) CloseAllPopup()

func (*Form) CloseTopPopup added in v1.0.2

func (c *Form) CloseTopPopup()

func (*Form) ControlRemoved added in v1.0.2

func (c *Form) ControlRemoved()

func (*Form) CreateModalForm added in v1.0.2

func (c *Form) CreateModalForm(window Window)

func (*Form) CurrentDraggingObject added in v1.0.2

func (c *Form) CurrentDraggingObject() interface{}

func (*Form) DialogResult added in v1.0.2

func (c *Form) DialogResult() bool

func (*Form) Dispose added in v1.0.2

func (c *Form) Dispose()

func (*Form) Draw added in v1.0.2

func (c *Form) Draw() bool

func (*Form) FocusedWidget added in v1.0.2

func (c *Form) FocusedWidget() Widget

func (*Form) Height added in v1.0.2

func (c *Form) Height() int

func (*Form) Id added in v1.0.2

func (c *Form) Id() int

func (*Form) Init added in v1.0.2

func (c *Form) Init()

func (*Form) IsMainWindow added in v1.0.2

func (c *Form) IsMainWindow() bool

func (*Form) KeyModifiers added in v1.0.2

func (c *Form) KeyModifiers() KeyModifiers

func (*Form) LoopUI added in v1.0.2

func (c *Form) LoopUI()

func (*Form) LoopUI_OpenGL added in v1.0.2

func (c *Form) LoopUI_OpenGL()

func (*Form) MainTimer added in v1.0.2

func (c *Form) MainTimer()

func (*Form) MakeTimerAndStart added in v1.0.2

func (c *Form) MakeTimerAndStart(period int64, handler func(timer *FormTimer)) *FormTimer

func (*Form) Maximize added in v1.0.2

func (c *Form) Maximize()

func (*Form) Menu added in v1.0.2

func (c *Form) Menu() Menu

func (*Form) Modal added in v1.0.2

func (c *Form) Modal() bool

func (*Form) Move added in v1.0.2

func (c *Form) Move(x, y int)

func (*Form) NewTimer added in v1.0.2

func (c *Form) NewTimer(period int64, handler func()) *FormTimer

func (*Form) OnClose added in v1.0.2

func (c *Form) OnClose() bool

func (*Form) OnInit added in v1.0.2

func (c *Form) OnInit()

func (*Form) OpenFileDialog added in v1.0.2

func (c *Form) OpenFileDialog() string

func (*Form) Panel added in v1.0.2

func (c *Form) Panel() *Panel

func (*Form) Parent added in v1.0.2

func (c *Form) Parent() Window

func (*Form) Popup added in v1.0.2

func (c *Form) Popup() bool

func (*Form) Position added in v1.0.2

func (c *Form) Position() Point

func (*Form) ProcessCharInput added in v1.0.2

func (c *Form) ProcessCharInput(ch rune)

func (*Form) ProcessClick added in v1.0.2

func (c *Form) ProcessClick(x, y int, button MouseButton)

func (*Form) ProcessFocus added in v1.0.2

func (c *Form) ProcessFocus()

func (*Form) ProcessKeyDown added in v1.0.2

func (c *Form) ProcessKeyDown(key glfw.Key)

func (*Form) ProcessKeyModifiers added in v1.0.2

func (c *Form) ProcessKeyModifiers(shift bool, control bool, alt bool)

func (*Form) ProcessKeyUp added in v1.0.2

func (c *Form) ProcessKeyUp(key glfw.Key)

func (*Form) ProcessMouseDown added in v1.0.2

func (c *Form) ProcessMouseDown(button MouseButton)

func (*Form) ProcessMouseMove added in v1.0.2

func (c *Form) ProcessMouseMove(x, y int)

func (*Form) ProcessMouseUp added in v1.0.2

func (c *Form) ProcessMouseUp(button MouseButton)

func (*Form) ProcessMouseWheel added in v1.0.2

func (c *Form) ProcessMouseWheel(delta int)

func (*Form) ProcessReturnDown added in v1.0.2

func (c *Form) ProcessReturnDown() bool

func (*Form) ProcessReturnUp added in v1.0.2

func (c *Form) ProcessReturnUp()

func (*Form) ProcessTabDown added in v1.0.2

func (c *Form) ProcessTabDown()

func (*Form) ProcessTabUp added in v1.0.2

func (c *Form) ProcessTabUp()

func (*Form) ProcessWindowMove added in v1.0.2

func (c *Form) ProcessWindowMove(x, y int)

func (*Form) ProcessWindowResize added in v1.0.2

func (c *Form) ProcessWindowResize(width, height int)

func (*Form) Reject added in v1.0.2

func (c *Form) Reject()

func (*Form) RejectButton added in v1.0.2

func (c *Form) RejectButton(ev *Event)

func (*Form) RemoveTimer added in v1.0.2

func (c *Form) RemoveTimer(timer *FormTimer)

func (*Form) Resize added in v1.0.2

func (c *Form) Resize(width, height int)

func (*Form) SelectColorDialog added in v1.0.2

func (c *Form) SelectColorDialog(col color.Color, onColorChanged func(color color.Color)) (bool, color.Color)

func (*Form) SetAcceptButton added in v1.0.2

func (c *Form) SetAcceptButton(acceptButton *Button)

func (*Form) SetFocusForWidget added in v1.0.2

func (c *Form) SetFocusForWidget(w Widget)

func (*Form) SetIcon added in v1.0.2

func (c *Form) SetIcon(img image.Image)

func (*Form) SetId added in v1.0.2

func (c *Form) SetId(id int)

func (*Form) SetIsMainWindow added in v1.0.2

func (c *Form) SetIsMainWindow(isMainWindow bool)

func (*Form) SetModal added in v1.0.2

func (c *Form) SetModal(modal bool)

func (*Form) SetMouseCursor added in v1.0.2

func (c *Form) SetMouseCursor(cur MouseCursor)

func (*Form) SetParent added in v1.0.2

func (c *Form) SetParent(window Window)

func (*Form) SetPopup added in v1.0.2

func (c *Form) SetPopup(popup bool)

func (*Form) SetRejectButton added in v1.0.2

func (c *Form) SetRejectButton(rejectButton *Button)

func (*Form) SetShowMaximazed added in v1.0.2

func (c *Form) SetShowMaximazed(maximazed bool)

func (*Form) SetTheme added in v1.0.2

func (c *Form) SetTheme(theme string)

func (*Form) SetTitle added in v1.0.2

func (c *Form) SetTitle(title string)

func (*Form) SetWindow added in v1.0.2

func (c *Form) SetWindow(w *glfw.Window)

func (*Form) Show added in v1.0.2

func (c *Form) Show()

func (*Form) ShowMaximazed added in v1.0.2

func (c *Form) ShowMaximazed() bool

func (*Form) ShowTooltip added in v1.0.2

func (c *Form) ShowTooltip(x, y int, text string)

func (*Form) String added in v1.0.2

func (c *Form) String() string

func (*Form) Title added in v1.0.2

func (c *Form) Title() string

func (*Form) UpdateLayout added in v1.0.2

func (c *Form) UpdateLayout()

func (*Form) UpdateMenu added in v1.0.2

func (c *Form) UpdateMenu()

func (*Form) UpdateStyle added in v1.0.2

func (c *Form) UpdateStyle()

func (*Form) UpdateWindow added in v1.0.2

func (c *Form) UpdateWindow(source string)

func (*Form) Width added in v1.0.2

func (c *Form) Width() int

func (*Form) Window added in v1.0.2

func (c *Form) Window() *glfw.Window

type FormSizeChangedEvent added in v1.0.2

type FormSizeChangedEvent struct {
	Event
	Width  int
	Height int
}

type FormTimer added in v1.0.2

type FormTimer struct {
	Enabled           bool
	LastElapsedDTMSec int64
	Period            int64
	Handler           func()
}

func (*FormTimer) StartTimer added in v1.0.2

func (c *FormTimer) StartTimer()

func (*FormTimer) StopTimer added in v1.0.2

func (c *FormTimer) StopTimer()

type GroupBox added in v1.0.2

type GroupBox struct {
	Container
	// contains filtered or unexported fields
}

func NewGroupBox added in v1.0.2

func NewGroupBox(parent Widget, title string) *GroupBox

func (*GroupBox) ControlType added in v1.0.2

func (c *GroupBox) ControlType() string

func (*GroupBox) Dispose added in v1.0.2

func (c *GroupBox) Dispose()

func (*GroupBox) Panel added in v1.0.2

func (c *GroupBox) Panel() *Panel

func (*GroupBox) SetTitle added in v1.0.2

func (c *GroupBox) SetTitle(title string)

func (*GroupBox) Title added in v1.0.2

func (c *GroupBox) Title() string

type HSpacer added in v1.0.2

type HSpacer struct {
	Control
}

func NewHSpacer added in v1.0.2

func NewHSpacer(parent Widget) *HSpacer

func (*HSpacer) ControlType added in v1.0.2

func (c *HSpacer) ControlType() string

func (*HSpacer) Draw added in v1.0.2

func (c *HSpacer) Draw(ctx DrawContext)

func (*HSpacer) Subclass added in v1.0.2

func (c *HSpacer) Subclass() string

func (*HSpacer) TabStop added in v1.0.2

func (c *HSpacer) TabStop() bool

type IEvent added in v1.0.2

type IEvent interface {
	SetPosX(x int)
	SetPosY(y int)
	PosX() int
	PosY() int
}

type IMenu added in v1.0.2

type IMenu interface {
	ShowMenu(x int, y int)
	DisposeMenu()
}

type ImageBox added in v1.0.2

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

func NewImageBox added in v1.0.2

func NewImageBox(parent Widget, img image.Image) *ImageBox

func NewImageBoxBytes added in v1.0.2

func NewImageBoxBytes(parent Widget, data []byte) *ImageBox

func (*ImageBox) ControlType added in v1.0.2

func (c *ImageBox) ControlType() string

func (*ImageBox) Draw added in v1.0.2

func (c *ImageBox) Draw(ctx DrawContext)

func (*ImageBox) MaxHeight added in v1.0.2

func (c *ImageBox) MaxHeight() int

func (*ImageBox) MaxWidth added in v1.0.2

func (c *ImageBox) MaxWidth() int

func (*ImageBox) MinHeight added in v1.0.2

func (c *ImageBox) MinHeight() int

func (*ImageBox) MinWidth added in v1.0.2

func (c *ImageBox) MinWidth() int

func (*ImageBox) SetImage added in v1.0.2

func (c *ImageBox) SetImage(img image.Image)

func (*ImageBox) SetScaling added in v1.0.2

func (c *ImageBox) SetScaling(scaling ImageBoxScale)

type ImageBoxScale added in v1.0.2

type ImageBoxScale int
const (
	ImageBoxScaleNoScaleAdjustBox           ImageBoxScale = 0
	ImageBoxScaleNoScaleImageInLeftTop      ImageBoxScale = 1
	ImageBoxScaleNoScaleImageInCenter       ImageBoxScale = 2
	ImageBoxScaleStretchImage               ImageBoxScale = 3
	ImageBoxScaleAdjustImageKeepAspectRatio ImageBoxScale = 4
)

type ImageCache

type ImageCache struct {
	utils.Obj
	// contains filtered or unexported fields
}

func NewImageCache

func NewImageCache(name string) *ImageCache

func (*ImageCache) Clear

func (c *ImageCache) Clear()

func (*ImageCache) ClearXY

func (c *ImageCache) ClearXY(x, y int)

func (*ImageCache) GetXY

func (c *ImageCache) GetXY(x, y int) *canvas.CanvasDirect

func (*ImageCache) SetXY

func (c *ImageCache) SetXY(x, y int, cnv *canvas.CanvasDirect)

type KeyCharEvent added in v1.0.2

type KeyCharEvent struct {
	Event
	Ch rune
}

type KeyDownEvent added in v1.0.2

type KeyDownEvent struct {
	Event
	Key glfw.Key
}

type KeyModifiers added in v1.0.2

type KeyModifiers struct {
	Shift   bool
	Control bool
	Alt     bool
}

type KeyUpEvent added in v1.0.2

type KeyUpEvent struct {
	Event
	Key glfw.Key
}

type ListView added in v1.0.2

type ListView struct {
	Container

	OnItemClicked      func(item *ListViewItem)
	OnSelectionChanged func()

	AllowDeselectItems bool

	OnMouseDown func()
	OnMouseUp   func()
	// contains filtered or unexported fields
}

func NewListView added in v1.0.2

func NewListView(parent Widget) *ListView

func (*ListView) AddColumn added in v1.0.2

func (c *ListView) AddColumn(text string, width int) *ListViewColumn

func (*ListView) AddItem added in v1.0.2

func (c *ListView) AddItem(text string) *ListViewItem

func (*ListView) AddItem2 added in v1.0.2

func (c *ListView) AddItem2(col0 string, col1 string) *ListViewItem

func (*ListView) AddItem3 added in v1.0.2

func (c *ListView) AddItem3(col0 string, col1 string, col2 string) *ListViewItem

func (*ListView) ClearSelection added in v1.0.2

func (c *ListView) ClearSelection()

func (*ListView) Construct added in v1.0.6

func (c *ListView) Construct()

func (*ListView) ControlType added in v1.0.2

func (c *ListView) ControlType() string

func (*ListView) Dispose added in v1.0.2

func (c *ListView) Dispose()

func (*ListView) Draw added in v1.0.2

func (c *ListView) Draw(ctx DrawContext)

func (*ListView) EnabledChanged added in v1.0.2

func (c *ListView) EnabledChanged(enabled bool)

func (*ListView) EnsureVisibleItem added in v1.0.2

func (c *ListView) EnsureVisibleItem(index int)

func (*ListView) Focus added in v1.0.2

func (c *ListView) Focus()

func (*ListView) IsHeaderVisible added in v1.0.2

func (c *ListView) IsHeaderVisible() bool

func (*ListView) Item added in v1.0.2

func (c *ListView) Item(rowIndex int) *ListViewItem

func (*ListView) ItemsCount added in v1.0.2

func (c *ListView) ItemsCount() int

func (*ListView) OnInit added in v1.0.2

func (c *ListView) OnInit()

func (*ListView) RemoveColumns added in v1.0.2

func (c *ListView) RemoveColumns()

func (*ListView) RemoveItems added in v1.0.2

func (c *ListView) RemoveItems()

func (*ListView) SelectAllItems added in v1.0.2

func (c *ListView) SelectAllItems()

func (*ListView) SelectItem added in v1.0.2

func (c *ListView) SelectItem(rowIndex int)

func (*ListView) SelectItemSelection added in v1.0.2

func (c *ListView) SelectItemSelection(rowIndex int, selected bool)

func (*ListView) SelectedItem added in v1.0.2

func (c *ListView) SelectedItem() *ListViewItem

func (*ListView) SelectedItemIndex added in v1.0.2

func (c *ListView) SelectedItemIndex() int

func (*ListView) SelectedItems added in v1.0.2

func (c *ListView) SelectedItems() []*ListViewItem

func (*ListView) SelectedItemsIndexes added in v1.0.2

func (c *ListView) SelectedItemsIndexes() []int

func (*ListView) SetColumnTextAlign added in v1.0.2

func (c *ListView) SetColumnTextAlign(columnIndex int, hAlign canvas.HAlign)

func (*ListView) SetColumnWidth added in v1.0.2

func (c *ListView) SetColumnWidth(colIndex int, width int)

func (*ListView) SetCurrentRow added in v1.0.2

func (c *ListView) SetCurrentRow(row int, byMouse bool)

func (*ListView) SetHeaderVisible added in v1.0.2

func (c *ListView) SetHeaderVisible(visible bool)

func (*ListView) SetItemValue added in v1.0.2

func (c *ListView) SetItemValue(rowIndex int, columnIndex int, text string)

func (*ListView) TabStop added in v1.0.2

func (c *ListView) TabStop() bool

func (*ListView) UnselectAllItems added in v1.0.2

func (c *ListView) UnselectAllItems()

func (*ListView) UpdateStyle added in v1.0.2

func (c *ListView) UpdateStyle()

func (*ListView) VisibleItems added in v1.0.2

func (c *ListView) VisibleItems() []*ListViewItem

type ListViewColumn added in v1.0.2

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

type ListViewContent added in v1.0.2

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

func NewListViewContent added in v1.0.2

func NewListViewContent(parent Widget, x int, y int, width int, height int) *ListViewContent

func (*ListViewContent) ControlType added in v1.0.2

func (c *ListViewContent) ControlType() string

func (*ListViewContent) Draw added in v1.0.2

func (c *ListViewContent) Draw(ctx DrawContext)

func (*ListViewContent) KeyDown added in v1.0.2

func (c *ListViewContent) KeyDown(event *KeyDownEvent) bool

func (*ListViewContent) MouseClick added in v1.0.2

func (c *ListViewContent) MouseClick(event *MouseClickEvent)

type ListViewHeader added in v1.0.2

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

func NewListViewHeader added in v1.0.2

func NewListViewHeader(parent Widget, x int, y int, width int, height int) *ListViewHeader

func (*ListViewHeader) ControlType added in v1.0.2

func (c *ListViewHeader) ControlType() string

func (*ListViewHeader) Draw added in v1.0.2

func (c *ListViewHeader) Draw(ctx DrawContext)

func (*ListViewHeader) MinHeight added in v1.0.2

func (c *ListViewHeader) MinHeight() int

func (*ListViewHeader) MinWidth added in v1.0.2

func (c *ListViewHeader) MinWidth() int

func (*ListViewHeader) MouseDown added in v1.0.2

func (c *ListViewHeader) MouseDown(event *MouseDownEvent)

func (*ListViewHeader) MouseLeave added in v1.0.2

func (c *ListViewHeader) MouseLeave()

func (*ListViewHeader) MouseMove added in v1.0.2

func (c *ListViewHeader) MouseMove(event *MouseMoveEvent)

func (*ListViewHeader) MouseUp added in v1.0.2

func (c *ListViewHeader) MouseUp(event *MouseUpEvent)

type ListViewItem added in v1.0.2

type ListViewItem struct {
	UserDataContainer
	// contains filtered or unexported fields
}

func (*ListViewItem) SetForeColorForCell added in v1.0.2

func (c *ListViewItem) SetForeColorForCell(colIndex int, color color.Color)

func (*ListViewItem) SetForeColorForRow added in v1.0.2

func (c *ListViewItem) SetForeColorForRow(color color.Color)

func (*ListViewItem) SetValue added in v1.0.2

func (c *ListViewItem) SetValue(column int, text string)

func (*ListViewItem) Value added in v1.0.2

func (c *ListViewItem) Value(column int) string
type Menu struct {
	Control
	// contains filtered or unexported fields
}

func NewMenu added in v1.0.2

func NewMenu(parent Widget) *Menu
func (c *Menu) AddItem(text string) *MenuItem
func (c *Menu) ControlType() string
func (c *Menu) Draw(ctx DrawContext)
func (c *Menu) FocusChanged(focus bool)
func (c *Menu) IsVisible() bool
func (c *Menu) MouseClick(event *MouseClickEvent)
func (c *Menu) MouseLeave()
func (c *Menu) MouseMove(event *MouseMoveEvent)
func (c *Menu) SetVisible(visible bool)
func (c *Menu) ShowSubmenu(item *MenuItem)
type MenuItem struct {
	Text    string
	OnClick func(*Event)
	// contains filtered or unexported fields
}
func (c *MenuItem) AddItem(text string, menu *Menu)
func (c *MenuItem) Draw(ctx DrawContext)

type MessageBox added in v1.0.2

type MessageBox struct {
	Dialog
	// contains filtered or unexported fields
}

func NewMessageBox added in v1.0.2

func NewMessageBox(parent Widget, typeOfDialog string) *MessageBox

func (*MessageBox) OnInit added in v1.0.2

func (c *MessageBox) OnInit()

func (*MessageBox) SetHeader added in v1.0.2

func (c *MessageBox) SetHeader(header string)

func (*MessageBox) SetText added in v1.0.2

func (c *MessageBox) SetText(text string)

type MouseButton added in v1.0.2

type MouseButton int
const MouseButtonLeft MouseButton = 0x01
const MouseButtonMiddle MouseButton = 0x02
const MouseButtonRight MouseButton = 0x04

type MouseClickEvent added in v1.0.2

type MouseClickEvent struct {
	MouseEvent
	Button MouseButton
}

func (*MouseClickEvent) Translate added in v1.0.2

type MouseCursor

type MouseCursor int
const (
	MouseCursorNotDefined MouseCursor = 0
	MouseCursorArrow      MouseCursor = 1
	MouseCursorPointer    MouseCursor = 2
	MouseCursorResizeHor  MouseCursor = 3
	MouseCursorResizeVer  MouseCursor = 4
	MouseCursorIBeam      MouseCursor = 5
)

type MouseDblClickEvent added in v1.0.2

type MouseDblClickEvent struct {
	MouseEvent
	Button MouseButton
}

func (*MouseDblClickEvent) Translate added in v1.0.2

type MouseDownEvent added in v1.0.2

type MouseDownEvent struct {
	MouseEvent
	Button MouseButton
}

func NewMouseDownEvent added in v1.0.2

func NewMouseDownEvent(x, y int, button MouseButton, modifiers KeyModifiers) *MouseDownEvent

func (*MouseDownEvent) Translate added in v1.0.2

func (event *MouseDownEvent) Translate(w CoordinateTranslator) *MouseDownEvent

type MouseDropEvent added in v1.0.2

type MouseDropEvent struct {
	MouseEvent
	Button         MouseButton
	DroppingObject interface{}
}

func NewMouseDropEvent added in v1.0.2

func NewMouseDropEvent(x, y int, button MouseButton, modifiers KeyModifiers, droppingObject interface{}) *MouseDropEvent

func (*MouseDropEvent) Translate added in v1.0.2

func (event *MouseDropEvent) Translate(w CoordinateTranslator) *MouseDropEvent

type MouseEvent added in v1.0.2

type MouseEvent struct {
	Event
	X, Y int
}

func (*MouseEvent) PosX added in v1.0.2

func (c *MouseEvent) PosX() int

func (*MouseEvent) PosY added in v1.0.2

func (c *MouseEvent) PosY() int

func (*MouseEvent) SetPosX added in v1.0.2

func (c *MouseEvent) SetPosX(x int)

func (*MouseEvent) SetPosY added in v1.0.2

func (c *MouseEvent) SetPosY(y int)

type MouseMoveEvent added in v1.0.2

type MouseMoveEvent struct {
	MouseEvent
}

func (*MouseMoveEvent) Translate added in v1.0.2

func (event *MouseMoveEvent) Translate(w CoordinateTranslator) *MouseMoveEvent

type MouseUpEvent added in v1.0.2

type MouseUpEvent struct {
	MouseEvent
	Button MouseButton
}

func (*MouseUpEvent) Translate added in v1.0.2

func (event *MouseUpEvent) Translate(w CoordinateTranslator) *MouseUpEvent

type MouseValidateDropEvent added in v1.0.2

type MouseValidateDropEvent struct {
	MouseEvent
	Button         MouseButton
	DroppingObject interface{}
	AllowDrop      bool
}

func NewMouseValidateDropEvent added in v1.0.2

func NewMouseValidateDropEvent(x, y int, button MouseButton, modifiers KeyModifiers, droppingObject interface{}) *MouseValidateDropEvent

func (*MouseValidateDropEvent) Translate added in v1.0.2

type MouseWheelEvent added in v1.0.2

type MouseWheelEvent struct {
	MouseEvent
	Delta int
}

func (*MouseWheelEvent) Translate added in v1.0.2

type Panel added in v1.0.2

type Panel struct {
	Container
	// contains filtered or unexported fields
}

func NewHPanel added in v1.0.3

func NewHPanel(parent Widget) *Panel

func NewPanel added in v1.0.2

func NewPanel(parent Widget) *Panel

func NewRootPanel added in v1.0.2

func NewRootPanel(parentWindow Window) *Panel

func NewVPanel added in v1.0.3

func NewVPanel(parent Widget) *Panel

func (*Panel) AddButton added in v1.0.3

func (c *Panel) AddButton(text string, onPress func(event *Event)) *Button

func (*Panel) AddButtonOnGrid added in v1.0.2

func (c *Panel) AddButtonOnGrid(gridX int, gridY int, text string, onPress func(event *Event)) *Button

func (*Panel) AddCheckBox added in v1.0.3

func (c *Panel) AddCheckBox(text string) *CheckBox

func (*Panel) AddCheckBoxOnGrid added in v1.0.2

func (c *Panel) AddCheckBoxOnGrid(gridX int, gridY int, text string) *CheckBox

func (*Panel) AddComboBox added in v1.0.3

func (c *Panel) AddComboBox() *ComboBox

func (*Panel) AddComboBoxOnGrid added in v1.0.2

func (c *Panel) AddComboBoxOnGrid(gridX int, gridY int) *ComboBox

func (*Panel) AddGroupBox added in v1.0.3

func (c *Panel) AddGroupBox(title string) *GroupBox

func (*Panel) AddGroupBoxOnGrid added in v1.0.2

func (c *Panel) AddGroupBoxOnGrid(gridX int, gridY int, title string) *GroupBox

func (*Panel) AddHPanel added in v1.0.3

func (c *Panel) AddHPanel() *Panel

func (*Panel) AddHSpacer added in v1.0.3

func (c *Panel) AddHSpacer() *HSpacer

func (*Panel) AddHSpacerOnGrid added in v1.0.2

func (c *Panel) AddHSpacerOnGrid(gridX int, gridY int) *HSpacer

func (*Panel) AddImageBox added in v1.0.3

func (c *Panel) AddImageBox(img image.Image) *ImageBox

func (*Panel) AddImageBoxOnGrid added in v1.0.2

func (c *Panel) AddImageBoxOnGrid(gridX int, gridY int, img image.Image) *ImageBox

func (*Panel) AddListView added in v1.0.3

func (c *Panel) AddListView() *ListView

func (*Panel) AddListViewOnGrid added in v1.0.2

func (c *Panel) AddListViewOnGrid(gridX int, gridY int) *ListView

func (*Panel) AddPanelOnGrid added in v1.0.2

func (c *Panel) AddPanelOnGrid(gridX int, gridY int) *Panel

func (*Panel) AddProgressBar added in v1.0.3

func (c *Panel) AddProgressBar() *ProgressBar

func (*Panel) AddProgressBarOnGrid added in v1.0.2

func (c *Panel) AddProgressBarOnGrid(gridX int, gridY int) *ProgressBar

func (*Panel) AddRadioButtonOnGrid added in v1.0.2

func (c *Panel) AddRadioButtonOnGrid(gridX int, gridY int, text string, onCheckChanged func(checkBox *RadioButton, checked bool)) *RadioButton

func (*Panel) AddSpinBoxOnGrid added in v1.0.2

func (c *Panel) AddSpinBoxOnGrid(gridX int, gridY int) *SpinBox

func (*Panel) AddSplitContainerOnGrid added in v1.0.2

func (c *Panel) AddSplitContainerOnGrid(gridX int, gridY int) *SplitContainer

func (*Panel) AddTabControl added in v1.0.3

func (c *Panel) AddTabControl() *TabControl

func (*Panel) AddTabControlOnGrid added in v1.0.2

func (c *Panel) AddTabControlOnGrid(gridX int, gridY int) *TabControl

func (*Panel) AddTableOnGrid added in v1.0.2

func (c *Panel) AddTableOnGrid(gridX int, gridY int) *Table

func (*Panel) AddTextBlock added in v1.0.3

func (c *Panel) AddTextBlock(text string) *TextBlock

func (*Panel) AddTextBlockOnGrid added in v1.0.2

func (c *Panel) AddTextBlockOnGrid(gridX int, gridY int, text string) *TextBlock

func (*Panel) AddTextBox added in v1.0.3

func (c *Panel) AddTextBox() *TextBox

func (*Panel) AddTextBoxOnGrid added in v1.0.2

func (c *Panel) AddTextBoxOnGrid(gridX int, gridY int) *TextBox

func (*Panel) AddVPanel added in v1.0.3

func (c *Panel) AddVPanel() *Panel

func (*Panel) AddVSpacer added in v1.0.3

func (c *Panel) AddVSpacer() *VSpacer

func (*Panel) AddVSpacerOnGrid added in v1.0.2

func (c *Panel) AddVSpacerOnGrid(gridX int, gridY int) *VSpacer

func (*Panel) AddWidget added in v1.0.4

func (c *Panel) AddWidget(w Widget)

func (*Panel) ControlType added in v1.0.2

func (c *Panel) ControlType() string

func (*Panel) Dispose added in v1.0.2

func (c *Panel) Dispose()

func (*Panel) InitControl added in v1.0.2

func (c *Panel) InitControl(parent Widget, w Widget)

func (*Panel) SetEnabled added in v1.0.2

func (c *Panel) SetEnabled(enabled bool)

func (*Panel) UpdateStyle added in v1.0.2

func (c *Panel) UpdateStyle()

type Point

type Point struct {
	X int
	Y int
}

type PopupMenu added in v1.0.2

type PopupMenu struct {
	Panel

	CloseEvent func()
	// contains filtered or unexported fields
}

func NewPopupMenu added in v1.0.2

func NewPopupMenu(parent Widget) *PopupMenu

func (*PopupMenu) AddItem added in v1.0.2

func (c *PopupMenu) AddItem(text string, onClick func(event *Event), img image.Image, keyCombination string) *PopupMenuItem

func (*PopupMenu) AddItemWithSubmenu added in v1.0.2

func (c *PopupMenu) AddItemWithSubmenu(text string, img image.Image, innerMenu *PopupMenu) *PopupMenuItem

func (*PopupMenu) AddItemWithUiResImage added in v1.0.2

func (c *PopupMenu) AddItemWithUiResImage(text string, onClick func(event *Event), img []byte, keyCombination string) *PopupMenuItem

func (*PopupMenu) ClosePopup added in v1.0.2

func (c *PopupMenu) ClosePopup()

func (*PopupMenu) ControlType added in v1.0.2

func (c *PopupMenu) ControlType() string

func (*PopupMenu) Dispose added in v1.0.2

func (c *PopupMenu) Dispose()

func (*PopupMenu) DisposeMenu added in v1.0.2

func (c *PopupMenu) DisposeMenu()

func (*PopupMenu) OnInit added in v1.0.2

func (c *PopupMenu) OnInit()

func (*PopupMenu) RemoveAllItems added in v1.0.2

func (c *PopupMenu) RemoveAllItems()

func (*PopupMenu) ShowMenu added in v1.0.2

func (c *PopupMenu) ShowMenu(x int, y int)

type PopupMenuItem added in v1.0.2

type PopupMenuItem struct {
	Control

	OnClick        func(event *Event)
	Image          image.Image
	ImageResource  []byte
	KeyCombination string

	AdjustColorForImage bool
	// contains filtered or unexported fields
}

func (*PopupMenuItem) ControlType added in v1.0.2

func (c *PopupMenuItem) ControlType() string

func (*PopupMenuItem) Dispose added in v1.0.2

func (c *PopupMenuItem) Dispose()

func (*PopupMenuItem) Draw added in v1.0.2

func (c *PopupMenuItem) Draw(ctx DrawContext)

func (*PopupMenuItem) MouseClick added in v1.0.2

func (c *PopupMenuItem) MouseClick(event *MouseClickEvent)

func (*PopupMenuItem) MouseEnter added in v1.0.2

func (c *PopupMenuItem) MouseEnter()

func (*PopupMenuItem) MouseLeave added in v1.0.2

func (c *PopupMenuItem) MouseLeave()

func (*PopupMenuItem) MouseMove added in v1.0.2

func (c *PopupMenuItem) MouseMove(event *MouseMoveEvent)

func (*PopupMenuItem) OnInit added in v1.0.2

func (c *PopupMenuItem) OnInit()

func (*PopupMenuItem) SetInnerMenu added in v1.0.2

func (c *PopupMenuItem) SetInnerMenu(menu *PopupMenu)

func (*PopupMenuItem) SetText added in v1.0.2

func (c *PopupMenuItem) SetText(text string)

type ProgressBar added in v1.0.2

type ProgressBar struct {
	TextBlock
	// contains filtered or unexported fields
}

func NewProgressBar added in v1.0.2

func NewProgressBar(parent Widget) *ProgressBar

func (*ProgressBar) ControlType added in v1.0.2

func (c *ProgressBar) ControlType() string

func (*ProgressBar) Draw added in v1.0.2

func (c *ProgressBar) Draw(ctx DrawContext)

func (*ProgressBar) IsZero added in v1.0.3

func (c *ProgressBar) IsZero(value float64) bool

func (*ProgressBar) OnInit added in v1.0.2

func (c *ProgressBar) OnInit()

func (*ProgressBar) SetMaxValue added in v1.0.3

func (c *ProgressBar) SetMaxValue(max float64)

func (*ProgressBar) SetMinMaxValue added in v1.0.3

func (c *ProgressBar) SetMinMaxValue(min float64, max float64)

func (*ProgressBar) SetMinValue added in v1.0.3

func (c *ProgressBar) SetMinValue(min float64)

func (*ProgressBar) SetValue added in v1.0.2

func (c *ProgressBar) SetValue(value float64)

func (*ProgressBar) SetValueAndText added in v1.0.3

func (c *ProgressBar) SetValueAndText(value float64, text string)

func (*ProgressBar) Subclass added in v1.0.2

func (c *ProgressBar) Subclass() string

type RadioButton added in v1.0.2

type RadioButton struct {
	Container

	OnCheckedChanged func(checkBox *RadioButton, checked bool)
	// contains filtered or unexported fields
}

func NewRadioButton added in v1.0.2

func NewRadioButton(parent Widget, text string) *RadioButton

func (*RadioButton) ClearRadioButtons added in v1.0.2

func (c *RadioButton) ClearRadioButtons()

func (*RadioButton) ControlType added in v1.0.2

func (c *RadioButton) ControlType() string

func (*RadioButton) InitControl added in v1.0.2

func (c *RadioButton) InitControl(parent Widget, w Widget)

func (*RadioButton) IsChecked added in v1.0.2

func (c *RadioButton) IsChecked() bool

func (*RadioButton) MouseClick added in v1.0.2

func (c *RadioButton) MouseClick(event *MouseClickEvent)

func (*RadioButton) SetChecked added in v1.0.2

func (c *RadioButton) SetChecked(isChecked bool)

type Rect added in v1.0.2

type Rect struct {
	X      int
	Y      int
	Width  int
	Height int
}

func (*Rect) Contains added in v1.0.2

func (c *Rect) Contains(x, y int) bool

type SpinBox added in v1.0.2

type SpinBox struct {
	Container

	OnValueChanged func(spinBox *SpinBox, value float64)
	// contains filtered or unexported fields
}

func NewSpinBox added in v1.0.2

func NewSpinBox(parent Widget) *SpinBox

func (*SpinBox) Dispose added in v1.0.2

func (c *SpinBox) Dispose()

func (*SpinBox) MouseWheel added in v1.0.2

func (c *SpinBox) MouseWheel(event *MouseWheelEvent)

func (*SpinBox) SetIncrement added in v1.0.2

func (c *SpinBox) SetIncrement(increment float64)

func (*SpinBox) SetMaxValue added in v1.0.2

func (c *SpinBox) SetMaxValue(maxValue float64)

func (*SpinBox) SetMinValue added in v1.0.2

func (c *SpinBox) SetMinValue(minValue float64)

func (*SpinBox) SetPrecision added in v1.0.2

func (c *SpinBox) SetPrecision(precision int)

func (*SpinBox) SetValue added in v1.0.2

func (c *SpinBox) SetValue(value float64)

func (*SpinBox) Value added in v1.0.2

func (c *SpinBox) Value() float64

type SplitContainer added in v1.0.2

type SplitContainer struct {
	Panel
	Panel1 *Panel
	Panel2 *Panel
	// contains filtered or unexported fields
}

func NewSplitContainer added in v1.0.2

func NewSplitContainer(parent Widget) *SplitContainer

func (*SplitContainer) ControlType added in v1.0.2

func (c *SplitContainer) ControlType() string

func (*SplitContainer) Dispose added in v1.0.2

func (c *SplitContainer) Dispose()

func (*SplitContainer) Draw added in v1.0.2

func (c *SplitContainer) Draw(ctx DrawContext)

func (*SplitContainer) FindWidgetUnderPointer added in v1.0.2

func (c *SplitContainer) FindWidgetUnderPointer(x, y int) Widget

func (*SplitContainer) MouseDown added in v1.0.2

func (c *SplitContainer) MouseDown(event *MouseDownEvent)

func (*SplitContainer) MouseMove added in v1.0.2

func (c *SplitContainer) MouseMove(event *MouseMoveEvent)

func (*SplitContainer) MouseUp added in v1.0.2

func (c *SplitContainer) MouseUp(event *MouseUpEvent)

func (*SplitContainer) SetHeight added in v1.0.2

func (c *SplitContainer) SetHeight(height int)

func (*SplitContainer) SetLeftCollapsed added in v1.0.2

func (c *SplitContainer) SetLeftCollapsed(collapsed bool)

func (*SplitContainer) SetPosition added in v1.0.2

func (c *SplitContainer) SetPosition(pos int)

func (*SplitContainer) SetPositionRelative added in v1.0.2

func (c *SplitContainer) SetPositionRelative(pos float64)

func (*SplitContainer) SetRightCollapsed added in v1.0.2

func (c *SplitContainer) SetRightCollapsed(collapsed bool)

func (*SplitContainer) SetWidth added in v1.0.2

func (c *SplitContainer) SetWidth(height int)

func (*SplitContainer) SetWindow added in v1.0.2

func (c *SplitContainer) SetWindow(w Window)

func (*SplitContainer) XExpandable added in v1.0.2

func (c *SplitContainer) XExpandable() bool

func (*SplitContainer) YExpandable added in v1.0.2

func (c *SplitContainer) YExpandable() bool

type StateStruct

type StateStruct struct {
	CurrentColor color.Color
	StrokeWidth  int
	FontFamily   string
	FontSize     float64
	UnderLine    bool
	TextHAlign   canvas.HAlign
	TextVAlign   canvas.VAlign

	CurrentClipSettings ClipSettings
}

type Style added in v1.0.2

type Style int

type TabControl added in v1.0.2

type TabControl struct {
	Container

	OnPageSelected     func(index int)
	OnNeedClose        func(index int)
	OnAddButtonPressed func()
	// contains filtered or unexported fields
}

func NewTabControl added in v1.0.2

func NewTabControl(parent Widget) *TabControl

func (*TabControl) AddPage added in v1.0.2

func (c *TabControl) AddPage() *TabPage

func (*TabControl) ControlType added in v1.0.2

func (c *TabControl) ControlType() string

func (*TabControl) Dispose added in v1.0.2

func (c *TabControl) Dispose()

func (*TabControl) Page added in v1.0.2

func (c *TabControl) Page(index int) *TabPage

func (*TabControl) PagesCount added in v1.0.2

func (c *TabControl) PagesCount() int

func (*TabControl) RemovePage added in v1.0.2

func (c *TabControl) RemovePage(index int)

func (*TabControl) SetCurrentPage added in v1.0.2

func (c *TabControl) SetCurrentPage(index int)

func (*TabControl) SetShowAddButton added in v1.0.2

func (c *TabControl) SetShowAddButton(showAddButton bool)

func (*TabControl) Tooltip added in v1.0.2

func (c *TabControl) Tooltip() string

type TabPage added in v1.0.2

type TabPage struct {
	Panel
	ShowImage bool
	ShowText  bool
	Img       image.Image

	ShowCloseButton bool
	// contains filtered or unexported fields
}

func (*TabPage) ControlType added in v1.0.2

func (c *TabPage) ControlType() string

func (*TabPage) Dispose added in v1.0.2

func (c *TabPage) Dispose()

func (*TabPage) MouseMove added in v1.0.2

func (c *TabPage) MouseMove(event *MouseMoveEvent)

func (*TabPage) SetText added in v1.0.2

func (c *TabPage) SetText(text string)

func (*TabPage) SetVisible added in v1.0.2

func (c *TabPage) SetVisible(visible bool)

type Table added in v1.0.2

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

func NewTable added in v1.0.2

func NewTable(parent Widget, x int, y int, width int, height int) *Table

func (*Table) AddColumn added in v1.0.2

func (c *Table) AddColumn(name string)

func (*Table) AddRow added in v1.0.2

func (c *Table) AddRow(name string)

func (*Table) Draw added in v1.0.2

func (c *Table) Draw(ctx DrawContext)

func (*Table) KeyChar added in v1.0.2

func (c *Table) KeyChar(event *KeyCharEvent)

func (*Table) KeyDown added in v1.0.2

func (c *Table) KeyDown(event *KeyDownEvent) bool

func (*Table) KeyUp added in v1.0.2

func (c *Table) KeyUp(event *KeyUpEvent)

func (*Table) MouseClick added in v1.0.2

func (c *Table) MouseClick(event *MouseClickEvent)

func (*Table) MouseDown added in v1.0.2

func (c *Table) MouseDown(event *MouseDownEvent)

func (*Table) MouseMove added in v1.0.2

func (c *Table) MouseMove(event *MouseMoveEvent)

func (*Table) MouseUp added in v1.0.2

func (c *Table) MouseUp(event *MouseUpEvent)

type TableColumn added in v1.0.2

type TableColumn struct {
	Name  string
	Width int
	// contains filtered or unexported fields
}

type TableRow added in v1.0.2

type TableRow struct {
	Name   string
	Height int
	Cells  []Widget
	// contains filtered or unexported fields
}

type TextBlock added in v1.0.2

type TextBlock struct {
	Control

	OnClick func(ev *Event)

	TextVAlign canvas.VAlign
	TextHAlign canvas.HAlign
	// contains filtered or unexported fields
}

func NewTextBlock added in v1.0.2

func NewTextBlock(parent Widget, text string) *TextBlock

func (*TextBlock) ControlType added in v1.0.2

func (c *TextBlock) ControlType() string

func (*TextBlock) Draw added in v1.0.2

func (c *TextBlock) Draw(ctx DrawContext)

func (*TextBlock) MinHeight added in v1.0.2

func (c *TextBlock) MinHeight() int

func (*TextBlock) MinWidth added in v1.0.2

func (c *TextBlock) MinWidth() int

func (*TextBlock) MouseDown added in v1.0.2

func (c *TextBlock) MouseDown(event *MouseDownEvent)

func (*TextBlock) MouseUp added in v1.0.2

func (c *TextBlock) MouseUp(event *MouseUpEvent)

func (*TextBlock) SetText added in v1.0.2

func (c *TextBlock) SetText(text string)

func (*TextBlock) SetUnderline added in v1.0.2

func (c *TextBlock) SetUnderline(underline bool)

func (*TextBlock) Text added in v1.0.2

func (c *TextBlock) Text() string

type TextBox added in v1.0.2

type TextBox struct {
	Control

	OnTextChanged func(txtBox *TextBox, oldValue string, newValue string)
	// contains filtered or unexported fields
}

func NewTextBox added in v1.0.2

func NewTextBox(parent Widget) *TextBox

func (*TextBox) AcceptsReturn added in v1.0.2

func (c *TextBox) AcceptsReturn() bool

func (*TextBox) AssemblyText added in v1.0.2

func (c *TextBox) AssemblyText(lines []string) string

func (*TextBox) ControlType added in v1.0.2

func (c *TextBox) ControlType() string

func (*TextBox) Dispose added in v1.0.2

func (c *TextBox) Dispose()

func (*TextBox) Draw added in v1.0.2

func (c *TextBox) Draw(ctx DrawContext)

func (*TextBox) KeyChar added in v1.0.2

func (c *TextBox) KeyChar(event *KeyCharEvent)

func (*TextBox) KeyDown added in v1.0.2

func (c *TextBox) KeyDown(event *KeyDownEvent) bool

func (*TextBox) KeyUp added in v1.0.2

func (c *TextBox) KeyUp(event *KeyUpEvent)

func (*TextBox) MinHeight added in v1.0.2

func (c *TextBox) MinHeight() int

func (*TextBox) MouseDown added in v1.0.2

func (c *TextBox) MouseDown(event *MouseDownEvent)

func (*TextBox) MouseMove added in v1.0.2

func (c *TextBox) MouseMove(event *MouseMoveEvent)

func (*TextBox) MouseUp added in v1.0.2

func (c *TextBox) MouseUp(event *MouseUpEvent)

func (*TextBox) OnInit added in v1.0.2

func (c *TextBox) OnInit()

func (*TextBox) OneLineHeight added in v1.0.2

func (c *TextBox) OneLineHeight() int

func (*TextBox) ScrollToBegin added in v1.0.2

func (c *TextBox) ScrollToBegin()

func (*TextBox) SelectAllText added in v1.0.2

func (c *TextBox) SelectAllText()

func (*TextBox) SelectedText added in v1.0.2

func (c *TextBox) SelectedText() string

func (*TextBox) SetEmptyText added in v1.0.2

func (c *TextBox) SetEmptyText(text string)

func (*TextBox) SetIsPassword added in v1.0.2

func (c *TextBox) SetIsPassword(isPassword bool)

func (*TextBox) SetMultiline added in v1.0.2

func (c *TextBox) SetMultiline(multiline bool)

func (*TextBox) SetReadOnly added in v1.0.2

func (c *TextBox) SetReadOnly(readonly bool)

func (*TextBox) SetText added in v1.0.2

func (c *TextBox) SetText(text string)

func (*TextBox) Text added in v1.0.2

func (c *TextBox) Text() string

type TextBoxSelection added in v1.0.2

type TextBoxSelection struct {
	X1, Y1, X2, Y2 int
	Text           string
}

type ToolPanel added in v1.0.2

type ToolPanel struct {
	Panel
	// contains filtered or unexported fields
}

func NewToolPanel added in v1.0.2

func NewToolPanel(parent Widget, title string) *ToolPanel

func (*ToolPanel) AddButton added in v1.0.2

func (c *ToolPanel) AddButton(text string, img image.Image, onClick func())

func (*ToolPanel) AddSpace added in v1.0.2

func (c *ToolPanel) AddSpace()

func (*ToolPanel) Dispose added in v1.0.2

func (c *ToolPanel) Dispose()

func (*ToolPanel) SetImage added in v1.0.2

func (c *ToolPanel) SetImage(img image.Image)

func (*ToolPanel) XExpandable added in v1.0.2

func (c *ToolPanel) XExpandable() bool

func (*ToolPanel) YExpandable added in v1.0.2

func (c *ToolPanel) YExpandable() bool

type UserDataContainer added in v1.0.2

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

func (*UserDataContainer) AllUserData added in v1.0.2

func (c *UserDataContainer) AllUserData() interface{}

func (*UserDataContainer) Dispose added in v1.0.2

func (c *UserDataContainer) Dispose()

func (*UserDataContainer) InitDataContainer added in v1.0.2

func (c *UserDataContainer) InitDataContainer()

func (*UserDataContainer) SetUserData added in v1.0.2

func (c *UserDataContainer) SetUserData(key string, data interface{})

func (*UserDataContainer) UserData added in v1.0.2

func (c *UserDataContainer) UserData(key string) interface{}

type VSpacer added in v1.0.2

type VSpacer struct {
	Control
}

func NewVSpacer added in v1.0.2

func NewVSpacer(parent Widget) *VSpacer

func (*VSpacer) ControlType added in v1.0.2

func (c *VSpacer) ControlType() string

func (*VSpacer) Draw added in v1.0.2

func (c *VSpacer) Draw(ctx DrawContext)

func (*VSpacer) Subclass added in v1.0.2

func (c *VSpacer) Subclass() string

func (*VSpacer) TabStop added in v1.0.2

func (c *VSpacer) TabStop() bool

type Widget added in v1.0.2

type Widget interface {
	Draw(ctx DrawContext)
	DrawControl(ctx DrawContext)

	Init()
	InitControl(parent Widget, w Widget)

	SetX(x int)
	SetY(y int)
	SetWidth(width int)
	SetHeight(height int)
	SetAnchors(anchors int)
	X() int
	Y() int
	Width() int
	Height() int
	Anchors() int
	SetHover(hover bool)
	Hover() bool

	Name() string
	SetName(name string)

	Focus()
	SetFocus(focus bool)
	HasFocus() bool

	Update(source string)

	ProcessMouseWheel(event *MouseWheelEvent)
	ProcessMouseMove(event *MouseMoveEvent)
	ProcessMouseDown(event *MouseDownEvent)
	ProcessMouseUp(event *MouseUpEvent)
	ProcessMouseClick(event *MouseClickEvent)
	ProcessMouseDblClick(event *MouseDblClickEvent)
	ProcessKeyChar(event *KeyCharEvent)
	ProcessKeyDown(event *KeyDownEvent) bool
	ProcessKeyUp(event *KeyUpEvent)

	MouseWheel(event *MouseWheelEvent)
	MouseMove(event *MouseMoveEvent)
	MouseDown(event *MouseDownEvent)
	MouseUp(event *MouseUpEvent)
	MouseDrop(event *MouseDropEvent)
	MouseValidateDrop(event *MouseValidateDropEvent)
	MouseClick(event *MouseClickEvent)
	MouseDblClick(event *MouseDblClickEvent)
	KeyChar(event *KeyCharEvent)
	KeyDown(event *KeyDownEvent) bool
	KeyUp(event *KeyUpEvent)

	MouseEnter()
	MouseLeave()
	FocusChanged(focus bool)

	InnerWidth() int
	InnerHeight() int

	LeftBorderWidth() int
	RightBorderWidth() int
	TopBorderWidth() int
	BottomBorderWidth() int

	ScrollOffsetX() int
	ScrollOffsetY() int
	ScrollEnsureVisible(x, y int)

	BackColor() color.Color
	ForeColor() color.Color
	AccentColor() color.Color
	InactiveColor() color.Color

	DrawBorders(ctx DrawContext)
	DrawBackground(ctx DrawContext)
	DrawScrollBars(ctx DrawContext)

	ProcessFindWidgetUnderPointer(x, y int) Widget
	FindWidgetUnderPointer(x, y int) Widget
	ClearHover()
	ClearFocus()
	AddProperty(name string, prop *uiproperties.Property)

	Classes() []string
	Subclass() string
	ControlType() string

	CurrentStyleValueScore(subclass string, propertyName string) int
	SetStyledValue(subclass string, propertyName string, value string, score int)
	StyledValue(subclass string, propertyName string) interface{}
	ApplyStyleLine(controlName string, controlType string, styleClass string, stylePseudoClass string, propertyName string, value string)

	SetBorderLeft(width int, col color.Color)
	SetBorderRight(width int, col color.Color)
	SetBorderTop(width int, col color.Color)
	SetBorderBottom(width int, col color.Color)
	SetBorders(width int, col color.Color)

	OnInit()

	ClearRadioButtons()
	SetParent(p Widget)
	Parent() Widget
	RectOnWindow() (int, int)
	RectClientAreaOnWindow() (int, int)
	Window() Window

	TranslateX(x int) int
	TranslateY(y int) int

	IsTabPlate() bool
	TabIndex() int

	AcceptsReturn() bool
	AcceptsTab() bool

	NextFocusControl() Widget
	FirstFocusControl() Widget

	FontFamily() string
	FontSize() float64
	FontBold() bool
	FontItalic() bool

	SetContextMenu(menu IMenu)
	ContextMenu() IMenu
	SetWindow(window Window)

	MouseCursor() MouseCursor

	SetUserData(key string, data interface{})
	UserData(key string) interface{}

	BeginUpdate()
	EndUpdate()

	Dispose()

	SetTooltip(text string)
	Tooltip() string

	ClosePopup()

	GridX() int
	GridY() int

	SetGridX(x int)
	SetGridY(y int)

	SetGridPos(x int, y int)

	MinWidth() int
	MinHeight() int
	MaxWidth() int
	MaxHeight() int
	XExpandable() bool
	YExpandable() bool

	SetXExpandable(xExpandable bool)
	SetYExpandable(yExpandable bool)

	SetMinWidth(minWidth int)
	SetMinHeight(minHeight int)
	SetMaxWidth(maxWidth int)
	SetMaxHeight(maxHeight int)

	Disposed() bool
	FullPath() string

	OnScroll(scrollPositionX int, scrollPositionY int)

	IsVisible() bool
	IsVisibleRec() bool
	SetVisible(visible bool)

	SetEnabled(enabled bool)
	EnabledChanged(enabled bool)

	Initialized() bool
	SetFixedSize(w int, h int)

	SetSize(w, h int)
	SetPos(x, y int)
	String(level int) string
	UpdateLayout()

	ClientWidth() int
	ClientHeight() int
	Text() string

	ClearLayoutCache()

	UpdateStyle()
	Widgets() []Widget
}

type WidgetEvent

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

func (*WidgetEvent) AddListener

func (c *WidgetEvent) AddListener(l func()) int

func (*WidgetEvent) Invoke

func (c *WidgetEvent) Invoke()

func (*WidgetEvent) RemoveAllListeners

func (c *WidgetEvent) RemoveAllListeners()

func (*WidgetEvent) RemoveListener

func (c *WidgetEvent) RemoveListener(id int)

type Window added in v1.0.2

type Window interface {
	LoopUI()

	Show()
	Draw() bool

	OnInit()
	OnClose() bool
	Maximize()

	Init()
	Close()

	// process events from OS
	// mouse
	ProcessMouseMove(x, y int)
	ProcessMouseWheel(delta int)
	ProcessMouseDown(button MouseButton)
	ProcessMouseUp(button MouseButton)
	ProcessClick(x, y int, button MouseButton)
	// keyboard
	ProcessCharInput(ch rune)
	ProcessKeyModifiers(shift bool, control bool, alt bool)
	ProcessKeyDown(key glfw.Key)
	ProcessKeyUp(key glfw.Key)
	// window
	ProcessWindowResize(width, height int)
	ProcessWindowMove(x, y int)
	ProcessFocus()

	KeyModifiers() KeyModifiers

	// title
	Title() string
	SetTitle(title string)

	// size
	Width() int
	Height() int
	Resize(width, height int)

	IsMainWindow() bool
	SetIsMainWindow(isMainWindow bool)
	Id() int
	SetId(id int)
	Position() Point

	SetParent(window Window)
	Parent() Window
	Menu() Menu

	CreateModalForm(window Window)

	Modal() bool
	SetModal(modal bool)

	Popup() bool
	SetPopup(popup bool)

	UpdateWindow(source string)
	UpdateMenu()

	Accept()
	DialogResult() bool

	NewTimer(period int64, handler func()) *FormTimer
	RemoveTimer(timer *FormTimer)
	MainTimer()

	BeginDrag(object interface{})
	CurrentDraggingObject() interface{}

	ShowTooltip(x, y int, text string)
	SetFocusForWidget(c Widget)
	FocusedWidget() Widget

	AppendPopup(c Widget)
	CloseAllPopup()
	CloseAfterPopupWidget(w Widget)
	CloseTopPopup()

	ProcessTabDown()

	ControlRemoved()

	ShowMaximazed() bool

	UpdateLayout()

	SetWindow(w *glfw.Window)
	Window() *glfw.Window

	SetMouseCursor(cur MouseCursor)
	CentralWidget() Widget
}
var MainForm Window

Jump to

Keyboard shortcuts

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