uicontrols

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: MIT Imports: 24 Imported by: 12

Documentation

Index

Constants

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

This section is empty.

Functions

func AddPropertyToWidget

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

func AddUnstyledPropertyToWidget

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

func NewDialogHeader

func NewDialogHeader(parent uiinterfaces.Widget) *dialogHeader

func ShowErrorMessage

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

func ShowInformationMessage

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

func ShowQuestionMessageOKCancel

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

func ShowQuestionMessageYesNoCancel

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

Types

type Button

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

func NewButton

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

func (*Button) ControlType

func (c *Button) ControlType() string

func (*Button) Draw

func (c *Button) Draw(ctx ui.DrawContext)

func (*Button) DrawBackground

func (c *Button) DrawBackground(ctx ui.DrawContext)

func (*Button) EnabledChanged

func (c *Button) EnabledChanged(enabled bool)

func (*Button) FindWidgetUnderPointer

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

func (*Button) KeyDown

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

func (*Button) MouseDown

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

func (*Button) MouseEnter

func (c *Button) MouseEnter()

func (*Button) MouseLeave

func (c *Button) MouseLeave()

func (*Button) MouseUp

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

func (*Button) Press

func (c *Button) Press()

func (*Button) SetChecked

func (c *Button) SetChecked(checked bool)

func (*Button) SetDrawBackground

func (c *Button) SetDrawBackground(drawBackground bool)

func (*Button) SetEnabled

func (c *Button) SetEnabled(enabled bool)

func (*Button) SetForeColor

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

func (*Button) SetImage

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

func (*Button) SetImageDisabled

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

func (*Button) SetImageSize

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

func (*Button) SetOnPress

func (c *Button) SetOnPress(onPress func(ev *uievents.Event))

func (*Button) SetPadding

func (c *Button) SetPadding(padding int)

func (*Button) SetShowImage

func (c *Button) SetShowImage(showImage bool)

func (*Button) SetShowText

func (c *Button) SetShowText(showText bool)

func (*Button) SetText

func (c *Button) SetText(text string)

func (*Button) SetTextHAlign

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

func (*Button) SetTextImageVerticalOrientation

func (c *Button) SetTextImageVerticalOrientation(textImageVerticalOrientation bool)

func (*Button) SetTextVAlign

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

func (*Button) Subclass

func (c *Button) Subclass() string

func (*Button) Text

func (c *Button) Text() string

func (*Button) TextHAlign

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

func (*Button) TextVAlign

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

type CheckBox

type CheckBox struct {
	Container

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

func NewCheckBox

func NewCheckBox(parent uiinterfaces.Widget, text string) *CheckBox

func (*CheckBox) ControlType

func (c *CheckBox) ControlType() string

func (*CheckBox) Dispose

func (c *CheckBox) Dispose()

func (*CheckBox) EnabledChanged

func (c *CheckBox) EnabledChanged(enabled bool)

func (*CheckBox) InitControl

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

func (*CheckBox) IsChecked

func (c *CheckBox) IsChecked() bool

func (*CheckBox) MouseClick

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

func (*CheckBox) SetChecked

func (c *CheckBox) SetChecked(isChecked bool)

func (*CheckBox) SetEnabled

func (c *CheckBox) SetEnabled(enabled bool)

func (*CheckBox) SetText

func (c *CheckBox) SetText(text string)

func (*CheckBox) Text

func (c *CheckBox) Text() string

type ColorPalette

type ColorPalette struct {
	Control

	OnColorChanged func(colorPicker *ColorPalette, color color.Color)
	// contains filtered or unexported fields
}

func NewColorPalette

func NewColorPalette(parent uiinterfaces.Widget) *ColorPalette

func (*ColorPalette) Color

func (c *ColorPalette) Color() color.Color

func (*ColorPalette) ControlType

func (c *ColorPalette) ControlType() string

func (*ColorPalette) Dispose

func (c *ColorPalette) Dispose()

func (*ColorPalette) Draw

func (c *ColorPalette) Draw(ctx ui.DrawContext)

func (*ColorPalette) MouseDown

func (c *ColorPalette) MouseDown(event *uievents.MouseDownEvent)

func (*ColorPalette) MouseUp

func (c *ColorPalette) MouseUp(event *uievents.MouseUpEvent)

func (*ColorPalette) SetColor

func (c *ColorPalette) SetColor(color color.Color)

func (*ColorPalette) Subclass

func (c *ColorPalette) Subclass() string

func (*ColorPalette) TabStop

func (c *ColorPalette) TabStop() bool

type ColorPicker

type ColorPicker struct {
	Panel

	OnColorChanged func(colorPicker *ColorPicker, color color.Color)
	// contains filtered or unexported fields
}

func NewColorPicker

func NewColorPicker(parent uiinterfaces.Widget) *ColorPicker

func (*ColorPicker) Color

func (c *ColorPicker) Color() color.Color

func (*ColorPicker) Dispose

func (c *ColorPicker) Dispose()

func (*ColorPicker) SetColor

func (c *ColorPicker) SetColor(color color.Color)

type ColorSelector

type ColorSelector struct {
	Dialog

	OnColorSelected func(col color.Color)
	// contains filtered or unexported fields
}

func NewColorSelector

func NewColorSelector(parent uiinterfaces.Widget, col color.Color) *ColorSelector

func (*ColorSelector) Color

func (c *ColorSelector) Color() color.Color

func (*ColorSelector) NotifyColorSelection

func (c *ColorSelector) NotifyColorSelection()

func (*ColorSelector) OnInit

func (c *ColorSelector) OnInit()

func (*ColorSelector) ResColor

func (c *ColorSelector) ResColor() color.Color

func (*ColorSelector) SetColor

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

type ComboBox

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

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

func NewComboBox

func NewComboBox(parent uiinterfaces.Widget) *ComboBox

func (*ComboBox) AddItem

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

func (*ComboBox) ClosePopup

func (c *ComboBox) ClosePopup()

func (*ComboBox) ControlType

func (c *ComboBox) ControlType() string

func (*ComboBox) CurrentItemKey

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

func (*ComboBox) Draw

func (c *ComboBox) Draw(ctx ui.DrawContext)

func (*ComboBox) FindWidgetUnderPointer

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

func (*ComboBox) KeyDown

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

func (*ComboBox) MouseDown

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

func (*ComboBox) MouseUp

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

func (*ComboBox) Press

func (c *ComboBox) Press()

func (*ComboBox) SetCurrentItemIndex

func (c *ComboBox) SetCurrentItemIndex(index int)

func (*ComboBox) SetCurrentItemKey

func (c *ComboBox) SetCurrentItemKey(key string)

func (*ComboBox) ShowPopupForm

func (c *ComboBox) ShowPopupForm()

func (*ComboBox) TabStop

func (c *ComboBox) TabStop() bool

func (*ComboBox) UpdateStyle

func (c *ComboBox) UpdateStyle()

type ComboBoxEvent

type ComboBoxEvent struct {
	uievents.Event
	CurrentIndex int
	Item         *ComboBoxItem
}

type ComboBoxItem

type ComboBoxItem struct {
	uievents.UserDataContainer
	Text string
}

type Container

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

func (*Container) AddWidget

func (c *Container) AddWidget(w uiinterfaces.Widget)

func (*Container) AddWidgetOnGrid

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

func (*Container) AppendPopupWidget

func (c *Container) AppendPopupWidget(w uiinterfaces.Widget)

func (*Container) ClearFocus

func (c *Container) ClearFocus()

func (*Container) ClearHover

func (c *Container) ClearHover()

func (*Container) ClearLayoutCache

func (c *Container) ClearLayoutCache()

func (*Container) ClearRadioButtons

func (c *Container) ClearRadioButtons()

func (*Container) CloseAfterPopupWidget

func (c *Container) CloseAfterPopupWidget(w uiinterfaces.Widget)

func (*Container) CloseAllPopup

func (c *Container) CloseAllPopup()

func (*Container) CloseTopPopup

func (c *Container) CloseTopPopup()

func (*Container) ControlType

func (c *Container) ControlType() string

func (*Container) Dispose

func (c *Container) Dispose()

func (*Container) Draw

func (c *Container) Draw(ctx ui.DrawContext)

func (*Container) FindWidgetUnderPointer

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

func (*Container) InitControl

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

func (*Container) MaxHeight

func (c *Container) MaxHeight() int

func (*Container) MaxWidth

func (c *Container) MaxWidth() int

func (*Container) MinHeight

func (c *Container) MinHeight() int

func (*Container) MinWidth

func (c *Container) MinWidth() int

func (*Container) MouseClick

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

func (*Container) MouseDown

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

func (*Container) MouseDrop

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

func (*Container) MouseMove

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

func (*Container) MouseUp

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

func (*Container) MouseValidateDrop

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

func (*Container) MouseWheel

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

func (*Container) RemoveAllWidgets

func (c *Container) RemoveAllWidgets()

func (*Container) RemoveWidget

func (c *Container) RemoveWidget(w uiinterfaces.Widget)

func (*Container) SetAbsolutePositioning

func (c *Container) SetAbsolutePositioning(absolutePositioning bool)

func (*Container) SetCellPadding

func (c *Container) SetCellPadding(cellPadding int)

func (*Container) SetHeight

func (c *Container) SetHeight(height int)

func (*Container) SetPanelPadding

func (c *Container) SetPanelPadding(panelPadding int)

func (*Container) SetSize

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

func (*Container) SetWidth

func (c *Container) SetWidth(width int)

func (*Container) String

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

func (*Container) UpdateLayout

func (c *Container) UpdateLayout()

func (*Container) UpdateStyle

func (c *Container) UpdateStyle()

func (*Container) Widgets

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

func (*Container) XExpandable

func (c *Container) XExpandable() bool

func (*Container) YExpandable

func (c *Container) YExpandable() bool

type ContainerGridColumnInfo

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

type ContainerGridRowInfo

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

type Control

type Control struct {
	stats.Obj
	uievents.UserDataContainer

	HScroll Rect
	VScroll Rect

	OwnWindow uiinterfaces.Window

	OnContextMenuNeed func(x, y int) uiinterfaces.Menu

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

func NewControl

func NewControl(parent uiinterfaces.Widget) *Control

func (*Control) AccentColor

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

func (*Control) AcceptsReturn

func (c *Control) AcceptsReturn() bool

func (*Control) AcceptsTab

func (c *Control) AcceptsTab() bool

func (*Control) AddProperty

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

func (*Control) Anchors

func (c *Control) Anchors() int

func (*Control) ApplyStyleLine

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

func (*Control) BackColor

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

func (*Control) BeginDrag

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

func (*Control) BeginUpdate

func (c *Control) BeginUpdate()

func (*Control) BorderColors

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

func (*Control) BottomBorderWidth

func (c *Control) BottomBorderWidth() int

func (*Control) Classes

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

func (*Control) ClearFocus

func (c *Control) ClearFocus()

func (*Control) ClearHover

func (c *Control) ClearHover()

func (*Control) ClearLayoutCache

func (c *Control) ClearLayoutCache()

func (*Control) ClearRadioButtons

func (c *Control) ClearRadioButtons()

func (*Control) ClientHeight

func (c *Control) ClientHeight() int

func (*Control) ClientWidth

func (c *Control) ClientWidth() int

func (*Control) ClosePopup

func (c *Control) ClosePopup()

func (*Control) CloseTopPopup

func (c *Control) CloseTopPopup()

func (*Control) ContextMenu

func (c *Control) ContextMenu() uiinterfaces.Menu

func (*Control) ControlType

func (c *Control) ControlType() string

func (*Control) CurrentStyleValueScore

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

func (*Control) Dispose

func (c *Control) Dispose()

func (*Control) Disposed

func (c *Control) Disposed() bool

func (*Control) Draw

func (c *Control) Draw(ctx ui.DrawContext)

func (*Control) DrawBackground

func (c *Control) DrawBackground(ctx ui.DrawContext)

func (*Control) DrawBorders

func (c *Control) DrawBorders(ctx ui.DrawContext)

func (*Control) DrawControl

func (c *Control) DrawControl(ctx ui.DrawContext)

func (*Control) DrawScrollBars

func (c *Control) DrawScrollBars(ctx ui.DrawContext)

func (*Control) EnabledChanged

func (c *Control) EnabledChanged(enabled bool)

func (*Control) EndUpdate

func (c *Control) EndUpdate()

func (*Control) FindWidgetUnderPointer

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

func (*Control) FirstFocusControl

func (c *Control) FirstFocusControl() uiinterfaces.Widget

func (*Control) Focus

func (c *Control) Focus()

func (*Control) FocusChanged

func (c *Control) FocusChanged(focus bool)

func (*Control) FontBold

func (c *Control) FontBold() bool

func (*Control) FontFamily

func (c *Control) FontFamily() string

func (*Control) FontItalic

func (c *Control) FontItalic() bool

func (*Control) FontSize

func (c *Control) FontSize() float64

func (*Control) ForeColor

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

func (*Control) FullPath

func (c *Control) FullPath() string

func (*Control) GridX

func (c *Control) GridX() int

func (*Control) GridY

func (c *Control) GridY() int

func (*Control) HasFocus

func (c *Control) HasFocus() bool

func (*Control) Height

func (c *Control) Height() int

func (*Control) Hover

func (c *Control) Hover() bool

func (*Control) InactiveColor

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

func (*Control) Init

func (c *Control) Init()

func (*Control) InitControl

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

func (*Control) Initialized

func (c *Control) Initialized() bool

func (*Control) InnerHeight

func (c *Control) InnerHeight() int

func (*Control) InnerWidth

func (c *Control) InnerWidth() int

func (*Control) IsTabPlate added in v1.0.5

func (c *Control) IsTabPlate() bool

func (*Control) IsVisible

func (c *Control) IsVisible() bool

func (*Control) IsVisibleRec added in v1.0.10

func (c *Control) IsVisibleRec() bool

func (*Control) KeyChar

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

func (*Control) KeyDown

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

func (*Control) KeyUp

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

func (*Control) LeftBorderWidth

func (c *Control) LeftBorderWidth() int

func (*Control) MaxHeight

func (c *Control) MaxHeight() int

func (*Control) MaxWidth

func (c *Control) MaxWidth() int

func (*Control) MinHeight

func (c *Control) MinHeight() int

func (*Control) MinWidth

func (c *Control) MinWidth() int

func (*Control) MouseClick

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

func (*Control) MouseCursor

func (c *Control) MouseCursor() ui.MouseCursor

func (*Control) MouseDblClick

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

func (*Control) MouseDown

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

func (*Control) MouseDrop

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

func (*Control) MouseEnter

func (c *Control) MouseEnter()

func (*Control) MouseLeave

func (c *Control) MouseLeave()

func (*Control) MouseMove

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

func (*Control) MouseUp

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

func (*Control) MouseValidateDrop

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

func (*Control) MouseWheel

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

func (*Control) Name

func (c *Control) Name() string

func (*Control) NextFocusControl

func (c *Control) NextFocusControl() uiinterfaces.Widget

func (*Control) OnInit

func (c *Control) OnInit()

func (*Control) OnScroll

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

func (*Control) Parent

func (c *Control) Parent() uiinterfaces.Widget

func (*Control) ProcessFindWidgetUnderPointer

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

func (*Control) ProcessKeyChar

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

func (*Control) ProcessKeyDown

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

func (*Control) ProcessKeyUp

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

func (*Control) ProcessMouseClick

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

func (*Control) ProcessMouseDblClick

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

func (*Control) ProcessMouseDown

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

func (*Control) ProcessMouseMove

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

func (*Control) ProcessMouseUp

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

func (*Control) ProcessMouseWheel

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

func (*Control) RectClientAreaOnWindow

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

func (*Control) RectOnWindow

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

func (*Control) ResetInnerSizeDirect

func (c *Control) ResetInnerSizeDirect()

func (*Control) RightBorderWidth

func (c *Control) RightBorderWidth() int

func (*Control) ScrollEnsureVisible

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

func (*Control) ScrollOffsetX

func (c *Control) ScrollOffsetX() int

func (*Control) ScrollOffsetY

func (c *Control) ScrollOffsetY() int

func (*Control) SetAnchors

func (c *Control) SetAnchors(anchors int)

func (*Control) SetBackColor

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

func (*Control) SetBorderBottom

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

func (*Control) SetBorderLeft

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

func (*Control) SetBorderRight

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

func (*Control) SetBorderTop

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

func (*Control) SetBorders

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

func (*Control) SetContextMenu

func (c *Control) SetContextMenu(menu uiinterfaces.Menu)

func (*Control) SetEnabled

func (c *Control) SetEnabled(enabled bool)

func (*Control) SetFixedSize

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

func (*Control) SetFocus

func (c *Control) SetFocus(focus bool)

func (*Control) SetFontSize

func (c *Control) SetFontSize(fontSize float64)

func (*Control) SetForeColor

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

func (*Control) SetGridPos

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

func (*Control) SetGridX

func (c *Control) SetGridX(gridX int)

func (*Control) SetGridY

func (c *Control) SetGridY(gridY int)

func (*Control) SetHeight

func (c *Control) SetHeight(height int)

func (*Control) SetHorizontalScrollVisible

func (c *Control) SetHorizontalScrollVisible(horizontalScrollVisible bool)

func (*Control) SetHover

func (c *Control) SetHover(hover bool)

func (*Control) SetInnerSizeDirect

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

func (*Control) SetIsTabPlate added in v1.0.5

func (c *Control) SetIsTabPlate(isTabPlate bool)

func (*Control) SetMaxHeight

func (c *Control) SetMaxHeight(maxHeight int)

func (*Control) SetMaxWidth

func (c *Control) SetMaxWidth(maxWidth int)

func (*Control) SetMinHeight

func (c *Control) SetMinHeight(minHeight int)

func (*Control) SetMinWidth

func (c *Control) SetMinWidth(minWidth int)

func (*Control) SetMouseCursor

func (c *Control) SetMouseCursor(cursor ui.MouseCursor)

func (*Control) SetName

func (c *Control) SetName(name string)

func (*Control) SetOnKeyDown

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

func (*Control) SetParent

func (c *Control) SetParent(p uiinterfaces.Widget)

func (*Control) SetPos

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

func (*Control) SetSize

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

func (*Control) SetStyledValue

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

func (*Control) SetTabIndex added in v1.0.5

func (c *Control) SetTabIndex(index int)

func (*Control) SetTheme

func (c *Control) SetTheme(theme string)

func (*Control) SetTooltip

func (c *Control) SetTooltip(text string)

func (*Control) SetVerticalScrollVisible

func (c *Control) SetVerticalScrollVisible(verticalScrollVisible bool)

func (*Control) SetVisible

func (c *Control) SetVisible(visible bool)

func (*Control) SetWidth

func (c *Control) SetWidth(width int)

func (*Control) SetWindow

func (c *Control) SetWindow(w uiinterfaces.Window)

func (*Control) SetX

func (c *Control) SetX(x int)

func (*Control) SetXExpandable

func (c *Control) SetXExpandable(xExpandable bool)

func (*Control) SetY

func (c *Control) SetY(y int)

func (*Control) SetYExpandable

func (c *Control) SetYExpandable(yExpandable bool)

func (*Control) String

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

func (*Control) StyledValue

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

func (*Control) Subclass

func (c *Control) Subclass() string

func (*Control) TabIndex

func (c *Control) TabIndex() int

func (*Control) Text

func (c *Control) Text() string

func (*Control) Theme

func (c *Control) Theme() string

func (*Control) Tooltip

func (c *Control) Tooltip() string

func (*Control) TopBorderWidth

func (c *Control) TopBorderWidth() int

func (*Control) TranslateX

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

func (*Control) TranslateY

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

func (*Control) Update

func (c *Control) Update(source string)

func (*Control) UpdateLayout

func (c *Control) UpdateLayout()

func (*Control) UpdateStyle

func (c *Control) UpdateStyle()

func (*Control) VisibleInnerRect

func (c *Control) VisibleInnerRect() Rect

func (*Control) Widgets added in v1.0.5

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

func (*Control) Width

func (c *Control) Width() int

func (*Control) Window

func (c *Control) Window() uiinterfaces.Window

func (*Control) X

func (c *Control) X() int

func (*Control) XExpandable

func (c *Control) XExpandable() bool

func (*Control) Y

func (c *Control) Y() int

func (*Control) YExpandable

func (c *Control) YExpandable() bool

type DateTimePicker

type DateTimePicker struct {
	Control

	Image image.Image

	DateTimeChanged func(event *uievents.Event)
	// contains filtered or unexported fields
}

func NewDateTimePicker

func NewDateTimePicker(parent uiinterfaces.Widget) *DateTimePicker

func (*DateTimePicker) ControlType

func (c *DateTimePicker) ControlType() string

func (*DateTimePicker) DateTime

func (c *DateTimePicker) DateTime() time.Time

func (*DateTimePicker) DateTimeToString

func (c *DateTimePicker) DateTimeToString() string

func (*DateTimePicker) Draw

func (c *DateTimePicker) Draw(ctx ui.DrawContext)

func (*DateTimePicker) KeyDown

func (c *DateTimePicker) KeyDown(event *uievents.KeyDownEvent) bool

func (*DateTimePicker) MouseClick

func (c *DateTimePicker) MouseClick(event *uievents.MouseClickEvent)

func (*DateTimePicker) MouseDown

func (c *DateTimePicker) MouseDown(event *uievents.MouseDownEvent)

func (*DateTimePicker) MouseEnter

func (c *DateTimePicker) MouseEnter()

func (*DateTimePicker) MouseLeave

func (c *DateTimePicker) MouseLeave()

func (*DateTimePicker) MouseUp

func (c *DateTimePicker) MouseUp(event *uievents.MouseUpEvent)

func (*DateTimePicker) Press

func (c *DateTimePicker) Press()

func (*DateTimePicker) SetChecked

func (c *DateTimePicker) SetChecked(checked bool)

func (*DateTimePicker) SetDateTime

func (c *DateTimePicker) SetDateTime(dateTime time.Time)

func (*DateTimePicker) SetEnabled

func (c *DateTimePicker) SetEnabled(enabled bool)

func (*DateTimePicker) Subclass

func (c *DateTimePicker) Subclass() string

func (*DateTimePicker) TabStop

func (c *DateTimePicker) TabStop() bool

type DateTimePickerDialog

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

func NewDateTimePickerDialog

func NewDateTimePickerDialog(parent uiinterfaces.Widget) *DateTimePickerDialog

func (*DateTimePickerDialog) DateTime

func (c *DateTimePickerDialog) DateTime() time.Time

func (*DateTimePickerDialog) OnInit

func (c *DateTimePickerDialog) OnInit()

func (*DateTimePickerDialog) SetDateTime

func (c *DateTimePickerDialog) SetDateTime(dateTime time.Time)

type DayOfMonthSelector

type DayOfMonthSelector struct {
	Container

	Image image.Image

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

func NewDayOfMonthSelector

func NewDayOfMonthSelector(parent uiinterfaces.Widget) *DayOfMonthSelector

func (*DayOfMonthSelector) ControlType

func (c *DayOfMonthSelector) ControlType() string

func (*DayOfMonthSelector) Day

func (c *DayOfMonthSelector) Day() int

func (*DayOfMonthSelector) SelectedDay

func (c *DayOfMonthSelector) SelectedDay() int

func (*DayOfMonthSelector) SetDay

func (c *DayOfMonthSelector) SetDay(day int)

func (*DayOfMonthSelector) SetEnabled

func (c *DayOfMonthSelector) SetEnabled(enabled bool)

func (*DayOfMonthSelector) SetYearAndMonth

func (c *DayOfMonthSelector) SetYearAndMonth(year, month int)

func (*DayOfMonthSelector) Subclass

func (c *DayOfMonthSelector) Subclass() string

func (*DayOfMonthSelector) XExpandable

func (c *DayOfMonthSelector) XExpandable() bool

func (*DayOfMonthSelector) YExpandable

func (c *DayOfMonthSelector) YExpandable() bool

type Dialog

type Dialog struct {
	Panel

	CloseEvent func()

	OnAccept func()
	OnReject func()

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

func NewDialog added in v1.0.5

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

func (*Dialog) Accept

func (c *Dialog) Accept()

func (*Dialog) Close

func (c *Dialog) Close()

func (*Dialog) ClosePopup

func (c *Dialog) ClosePopup()

func (*Dialog) ContentPanel

func (c *Dialog) ContentPanel() *Panel

func (*Dialog) ControlType

func (c *Dialog) ControlType() string

func (*Dialog) Dispose

func (c *Dialog) Dispose()

func (*Dialog) KeyDown

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

func (*Dialog) OnInit

func (c *Dialog) OnInit()

func (*Dialog) Reject

func (c *Dialog) Reject()

func (*Dialog) Resize

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

func (*Dialog) SetAcceptButton

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

func (*Dialog) SetRejectButton

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

func (*Dialog) SetTitle

func (c *Dialog) SetTitle(title string)

func (*Dialog) ShowDialog

func (c *Dialog) ShowDialog()

func (*Dialog) ShowDialogAtPos

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

type GroupBox

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

func NewGroupBox

func NewGroupBox(parent uiinterfaces.Widget, title string) *GroupBox

func (*GroupBox) ControlType

func (c *GroupBox) ControlType() string

func (*GroupBox) Dispose

func (c *GroupBox) Dispose()

func (*GroupBox) Panel

func (c *GroupBox) Panel() *Panel

func (*GroupBox) SetTitle

func (c *GroupBox) SetTitle(title string)

func (*GroupBox) Title

func (c *GroupBox) Title() string

type HSpacer

type HSpacer struct {
	Control
}

func NewHSpacer

func NewHSpacer(parent uiinterfaces.Widget) *HSpacer

func (*HSpacer) ControlType

func (c *HSpacer) ControlType() string

func (*HSpacer) Draw

func (c *HSpacer) Draw(ctx ui.DrawContext)

func (*HSpacer) Subclass

func (c *HSpacer) Subclass() string

func (*HSpacer) TabStop

func (c *HSpacer) TabStop() bool

type ImageBox

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

func NewImageBox

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

func NewImageBoxBytes

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

func (*ImageBox) ControlType

func (c *ImageBox) ControlType() string

func (*ImageBox) Draw

func (c *ImageBox) Draw(ctx ui.DrawContext)

func (*ImageBox) MaxHeight

func (c *ImageBox) MaxHeight() int

func (*ImageBox) MaxWidth

func (c *ImageBox) MaxWidth() int

func (*ImageBox) MinHeight

func (c *ImageBox) MinHeight() int

func (*ImageBox) MinWidth

func (c *ImageBox) MinWidth() int

func (*ImageBox) SetImage

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

func (*ImageBox) SetScaling

func (c *ImageBox) SetScaling(scaling ImageBoxScale)

type ImageBoxScale

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

type ListView

type ListView struct {
	Container

	OnItemClicked      func(item *ListViewItem)
	OnSelectionChanged func()
	// contains filtered or unexported fields
}

func NewListView

func NewListView(parent uiinterfaces.Widget) *ListView

func (*ListView) AddColumn

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

func (*ListView) AddItem

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

func (*ListView) AddItem2

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

func (*ListView) AddItem3

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

func (*ListView) ClearSelection

func (c *ListView) ClearSelection()

func (*ListView) ControlType

func (c *ListView) ControlType() string

func (*ListView) Dispose

func (c *ListView) Dispose()

func (*ListView) Draw

func (c *ListView) Draw(ctx ui.DrawContext)

func (*ListView) EnabledChanged

func (c *ListView) EnabledChanged(enabled bool)

func (*ListView) EnsureVisibleItem

func (c *ListView) EnsureVisibleItem(index int)

func (*ListView) Focus

func (c *ListView) Focus()

func (*ListView) IsHeaderVisible

func (c *ListView) IsHeaderVisible() bool

func (*ListView) Item

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

func (*ListView) ItemsCount

func (c *ListView) ItemsCount() int

func (*ListView) OnInit

func (c *ListView) OnInit()

func (*ListView) RemoveColumns

func (c *ListView) RemoveColumns()

func (*ListView) RemoveItems

func (c *ListView) RemoveItems()

func (*ListView) SelectAllItems

func (c *ListView) SelectAllItems()

func (*ListView) SelectItem

func (c *ListView) SelectItem(rowIndex int)

func (*ListView) SelectItemSelection

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

func (*ListView) SelectedItem

func (c *ListView) SelectedItem() *ListViewItem

func (*ListView) SelectedItemIndex

func (c *ListView) SelectedItemIndex() int

func (*ListView) SelectedItems

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

func (*ListView) SelectedItemsIndexes

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

func (*ListView) SetColumnTextAlign

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

func (*ListView) SetColumnWidth

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

func (*ListView) SetCurrentRow

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

func (*ListView) SetHeaderVisible

func (c *ListView) SetHeaderVisible(visible bool)

func (*ListView) SetItemValue

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

func (*ListView) TabStop

func (c *ListView) TabStop() bool

func (*ListView) UnselectAllItems

func (c *ListView) UnselectAllItems()

func (*ListView) UpdateStyle

func (c *ListView) UpdateStyle()

func (*ListView) VisibleItems

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

type ListViewColumn

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

type ListViewContent

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

func NewListViewContent

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

func (*ListViewContent) ControlType

func (c *ListViewContent) ControlType() string

func (*ListViewContent) Draw

func (c *ListViewContent) Draw(ctx ui.DrawContext)

func (*ListViewContent) KeyDown

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

func (*ListViewContent) MouseClick

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

type ListViewHeader

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

func NewListViewHeader

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

func (*ListViewHeader) ControlType

func (c *ListViewHeader) ControlType() string

func (*ListViewHeader) Draw

func (c *ListViewHeader) Draw(ctx ui.DrawContext)

func (*ListViewHeader) MinHeight

func (c *ListViewHeader) MinHeight() int

func (*ListViewHeader) MinWidth

func (c *ListViewHeader) MinWidth() int

func (*ListViewHeader) MouseDown

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

func (*ListViewHeader) MouseLeave

func (c *ListViewHeader) MouseLeave()

func (*ListViewHeader) MouseMove

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

func (*ListViewHeader) MouseUp

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

type ListViewItem

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

func (*ListViewItem) SetForeColorForCell

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

func (*ListViewItem) SetForeColorForRow

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

func (*ListViewItem) SetValue

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

func (*ListViewItem) Value

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

func NewMenu

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

type MessageBox

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

func NewMessageBox

func NewMessageBox(parent uiinterfaces.Widget, typeOfDialog string) *MessageBox

func (*MessageBox) OnInit

func (c *MessageBox) OnInit()

func (*MessageBox) SetHeader

func (c *MessageBox) SetHeader(header string)

func (*MessageBox) SetText

func (c *MessageBox) SetText(text string)

type MonthSelector

type MonthSelector struct {
	Container

	Image image.Image

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

func NewMonthSelector

func NewMonthSelector(parent uiinterfaces.Widget) *MonthSelector

func (*MonthSelector) ControlType

func (c *MonthSelector) ControlType() string

func (*MonthSelector) Month

func (c *MonthSelector) Month() int

func (*MonthSelector) SetEnabled

func (c *MonthSelector) SetEnabled(enabled bool)

func (*MonthSelector) SetMonth

func (c *MonthSelector) SetMonth(month int)

func (*MonthSelector) Subclass

func (c *MonthSelector) Subclass() string

func (*MonthSelector) UpdateStyle

func (c *MonthSelector) UpdateStyle()

func (*MonthSelector) XExpandable

func (c *MonthSelector) XExpandable() bool

func (*MonthSelector) YExpandable

func (c *MonthSelector) YExpandable() bool

type Panel

type Panel struct {
	Container
}

func NewPanel

func NewPanel(parent uiinterfaces.Widget) *Panel

func NewRootPanel

func NewRootPanel(parentWindow uiinterfaces.Window) *Panel

func (*Panel) AddButtonOnGrid

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

func (*Panel) AddCheckBoxOnGrid

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

func (*Panel) AddColorPickerOnGrid

func (c *Panel) AddColorPickerOnGrid(gridX int, gridY int) *ColorPicker

func (*Panel) AddComboBoxOnGrid

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

func (*Panel) AddDateTimePickerOnGrid

func (c *Panel) AddDateTimePickerOnGrid(gridX int, gridY int) *DateTimePicker

func (*Panel) AddGroupBoxOnGrid

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

func (*Panel) AddHSpacerOnGrid

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

func (*Panel) AddImageBoxOnGrid

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

func (*Panel) AddListViewOnGrid

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

func (*Panel) AddPanelOnGrid

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

func (*Panel) AddProgressBarOnGrid

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

func (*Panel) AddRadioButtonOnGrid

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

func (*Panel) AddSpinBoxOnGrid

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

func (*Panel) AddSplitContainerOnGrid

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

func (*Panel) AddTabControlOnGrid

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

func (*Panel) AddTableOnGrid

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

func (*Panel) AddTextBlockOnGrid

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

func (*Panel) AddTextBoxExtOnGrid

func (c *Panel) AddTextBoxExtOnGrid(gridX int, gridY int, text string, onSelect func(textBoxExt *TextBoxExt)) *TextBoxExt

func (*Panel) AddTextBoxOnGrid

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

func (*Panel) AddTreeViewOnGrid

func (c *Panel) AddTreeViewOnGrid(gridX int, gridY int) *TreeView

func (*Panel) AddVSpacerOnGrid

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

func (*Panel) ControlType

func (c *Panel) ControlType() string

func (*Panel) Dispose

func (c *Panel) Dispose()

func (*Panel) InitControl

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

func (*Panel) SetEnabled

func (c *Panel) SetEnabled(enabled bool)

func (*Panel) UpdateStyle

func (c *Panel) UpdateStyle()

type PopupMenu

type PopupMenu struct {
	Panel

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

func NewPopupMenu

func NewPopupMenu(parent uiinterfaces.Widget) *PopupMenu

func (*PopupMenu) AddItem

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

func (*PopupMenu) AddItemWithSubmenu

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

func (*PopupMenu) AddItemWithUiResImage

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

func (*PopupMenu) ClosePopup

func (c *PopupMenu) ClosePopup()

func (*PopupMenu) ControlType

func (c *PopupMenu) ControlType() string

func (*PopupMenu) Dispose

func (c *PopupMenu) Dispose()

func (*PopupMenu) DisposeMenu

func (c *PopupMenu) DisposeMenu()

func (*PopupMenu) OnInit

func (c *PopupMenu) OnInit()

func (*PopupMenu) RemoveAllItems

func (c *PopupMenu) RemoveAllItems()

func (*PopupMenu) ShowMenu

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

type PopupMenuItem

type PopupMenuItem struct {
	Control

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

	AdjustColorForImage bool
	// contains filtered or unexported fields
}

func (*PopupMenuItem) ControlType

func (c *PopupMenuItem) ControlType() string

func (*PopupMenuItem) Dispose

func (c *PopupMenuItem) Dispose()

func (*PopupMenuItem) Draw

func (c *PopupMenuItem) Draw(ctx ui.DrawContext)

func (*PopupMenuItem) MouseClick

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

func (*PopupMenuItem) MouseEnter

func (c *PopupMenuItem) MouseEnter()

func (*PopupMenuItem) MouseLeave

func (c *PopupMenuItem) MouseLeave()

func (*PopupMenuItem) MouseMove

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

func (*PopupMenuItem) OnInit

func (c *PopupMenuItem) OnInit()

func (*PopupMenuItem) SetInnerMenu

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

func (*PopupMenuItem) SetText

func (c *PopupMenuItem) SetText(text string)

type ProgressBar

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

func NewProgressBar

func NewProgressBar(parent uiinterfaces.Widget) *ProgressBar

func (*ProgressBar) ControlType

func (c *ProgressBar) ControlType() string

func (*ProgressBar) Draw

func (c *ProgressBar) Draw(ctx ui.DrawContext)

func (*ProgressBar) OnInit

func (c *ProgressBar) OnInit()

func (*ProgressBar) SetMax

func (c *ProgressBar) SetMax(max int)

func (*ProgressBar) SetMin

func (c *ProgressBar) SetMin(min int)

func (*ProgressBar) SetMinMax

func (c *ProgressBar) SetMinMax(min int, max int)

func (*ProgressBar) SetValue

func (c *ProgressBar) SetValue(value int)

func (*ProgressBar) Subclass

func (c *ProgressBar) Subclass() string

type RadioButton

type RadioButton struct {
	Container

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

func NewRadioButton

func NewRadioButton(parent uiinterfaces.Widget, text string) *RadioButton

func (*RadioButton) ClearRadioButtons

func (c *RadioButton) ClearRadioButtons()

func (*RadioButton) ControlType

func (c *RadioButton) ControlType() string

func (*RadioButton) InitControl

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

func (*RadioButton) IsChecked

func (c *RadioButton) IsChecked() bool

func (*RadioButton) MouseClick

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

func (*RadioButton) SetChecked

func (c *RadioButton) SetChecked(isChecked bool)

type Rect

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

func (*Rect) Contains

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

type Space

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

func NewSpace

func NewSpace(parent uiinterfaces.Widget) *Space

func (*Space) ControlType

func (c *Space) ControlType() string

func (*Space) Draw

func (c *Space) Draw(ctx ui.DrawContext)

func (*Space) Subclass

func (c *Space) Subclass() string

func (*Space) TabStop

func (c *Space) TabStop() bool

type SpinBox

type SpinBox struct {
	Container

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

func NewSpinBox

func NewSpinBox(parent uiinterfaces.Widget) *SpinBox

func (*SpinBox) Dispose

func (c *SpinBox) Dispose()

func (*SpinBox) MouseWheel

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

func (*SpinBox) SetIncrement

func (c *SpinBox) SetIncrement(increment float64)

func (*SpinBox) SetMaxValue

func (c *SpinBox) SetMaxValue(maxValue float64)

func (*SpinBox) SetMinValue

func (c *SpinBox) SetMinValue(minValue float64)

func (*SpinBox) SetPrecision

func (c *SpinBox) SetPrecision(precision int)

func (*SpinBox) SetValue

func (c *SpinBox) SetValue(value float64)

func (*SpinBox) Value

func (c *SpinBox) Value() float64

type SplitContainer

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

func NewSplitContainer

func NewSplitContainer(parent uiinterfaces.Widget) *SplitContainer

func (*SplitContainer) ControlType

func (c *SplitContainer) ControlType() string

func (*SplitContainer) Dispose

func (c *SplitContainer) Dispose()

func (*SplitContainer) Draw

func (c *SplitContainer) Draw(ctx ui.DrawContext)

func (*SplitContainer) FindWidgetUnderPointer

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

func (*SplitContainer) MouseDown

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

func (*SplitContainer) MouseMove

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

func (*SplitContainer) MouseUp

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

func (*SplitContainer) SetHeight

func (c *SplitContainer) SetHeight(height int)

func (*SplitContainer) SetLeftCollapsed

func (c *SplitContainer) SetLeftCollapsed(collapsed bool)

func (*SplitContainer) SetPosition

func (c *SplitContainer) SetPosition(pos int)

func (*SplitContainer) SetPositionRelative

func (c *SplitContainer) SetPositionRelative(pos float64)

func (*SplitContainer) SetRightCollapsed

func (c *SplitContainer) SetRightCollapsed(collapsed bool)

func (*SplitContainer) SetWidth

func (c *SplitContainer) SetWidth(height int)

func (*SplitContainer) SetWindow

func (c *SplitContainer) SetWindow(w uiinterfaces.Window)

func (*SplitContainer) XExpandable

func (c *SplitContainer) XExpandable() bool

func (*SplitContainer) YExpandable

func (c *SplitContainer) YExpandable() bool

type TabControl

type TabControl struct {
	Container

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

func NewTabControl

func NewTabControl(parent uiinterfaces.Widget) *TabControl

func (*TabControl) AddPage

func (c *TabControl) AddPage() *TabPage

func (*TabControl) ControlType

func (c *TabControl) ControlType() string

func (*TabControl) Dispose

func (c *TabControl) Dispose()

func (*TabControl) Page

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

func (*TabControl) PagesCount

func (c *TabControl) PagesCount() int

func (*TabControl) RemovePage

func (c *TabControl) RemovePage(index int)

func (*TabControl) SetCurrentPage

func (c *TabControl) SetCurrentPage(index int)

func (*TabControl) SetShowAddButton

func (c *TabControl) SetShowAddButton(showAddButton bool)

func (*TabControl) Tooltip

func (c *TabControl) Tooltip() string

type TabPage

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

	ShowCloseButton bool
	// contains filtered or unexported fields
}

func (*TabPage) ControlType

func (c *TabPage) ControlType() string

func (*TabPage) Dispose

func (c *TabPage) Dispose()

func (*TabPage) MouseMove

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

func (*TabPage) SetText

func (c *TabPage) SetText(text string)

func (*TabPage) SetVisible

func (c *TabPage) SetVisible(visible bool)

type Table

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

func NewTable

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

func (*Table) AddColumn

func (c *Table) AddColumn(name string)

func (*Table) AddRow

func (c *Table) AddRow(name string)

func (*Table) Draw

func (c *Table) Draw(ctx ui.DrawContext)

func (*Table) KeyChar

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

func (*Table) KeyDown

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

func (*Table) KeyUp

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

func (*Table) MouseClick

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

func (*Table) MouseDown

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

func (*Table) MouseMove

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

func (*Table) MouseUp

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

type TableColumn

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

type TableRow

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

type TextBlock

type TextBlock struct {
	Control

	OnClick func(ev *uievents.Event)

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

func NewTextBlock

func NewTextBlock(parent uiinterfaces.Widget, text string) *TextBlock

func (*TextBlock) ControlType

func (c *TextBlock) ControlType() string

func (*TextBlock) Draw

func (c *TextBlock) Draw(ctx ui.DrawContext)

func (*TextBlock) MinHeight

func (c *TextBlock) MinHeight() int

func (*TextBlock) MinWidth

func (c *TextBlock) MinWidth() int

func (*TextBlock) MouseDown

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

func (*TextBlock) MouseUp

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

func (*TextBlock) SetText

func (c *TextBlock) SetText(text string)

func (*TextBlock) SetUnderline

func (c *TextBlock) SetUnderline(underline bool)

func (*TextBlock) Text

func (c *TextBlock) Text() string

type TextBox

type TextBox struct {
	Control

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

func NewTextBox

func NewTextBox(parent uiinterfaces.Widget) *TextBox

func (*TextBox) AcceptsReturn

func (c *TextBox) AcceptsReturn() bool

func (*TextBox) AssemblyText

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

func (*TextBox) ControlType

func (c *TextBox) ControlType() string

func (*TextBox) Dispose

func (c *TextBox) Dispose()

func (*TextBox) Draw

func (c *TextBox) Draw(ctx ui.DrawContext)

func (*TextBox) KeyChar

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

func (*TextBox) KeyDown

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

func (*TextBox) KeyUp

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

func (*TextBox) MinHeight

func (c *TextBox) MinHeight() int

func (*TextBox) MouseDown

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

func (*TextBox) MouseMove

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

func (*TextBox) MouseUp

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

func (*TextBox) OnInit

func (c *TextBox) OnInit()

func (*TextBox) OneLineHeight

func (c *TextBox) OneLineHeight() int

func (*TextBox) ScrollToBegin

func (c *TextBox) ScrollToBegin()

func (*TextBox) SelectAllText

func (c *TextBox) SelectAllText()

func (*TextBox) SelectedText

func (c *TextBox) SelectedText() string

func (*TextBox) SetEmptyText

func (c *TextBox) SetEmptyText(text string)

func (*TextBox) SetIsPassword added in v1.0.9

func (c *TextBox) SetIsPassword(isPassword bool)

func (*TextBox) SetMultiline

func (c *TextBox) SetMultiline(multiline bool)

func (*TextBox) SetReadOnly

func (c *TextBox) SetReadOnly(readonly bool)

func (*TextBox) SetText

func (c *TextBox) SetText(text string)

func (*TextBox) Text

func (c *TextBox) Text() string

type TextBoxExt

type TextBoxExt struct {
	Container
	CurrentItemIndex int

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

func NewTextBoxExt

func NewTextBoxExt(parent uiinterfaces.Widget, text string, onSelect func(textBoxExt *TextBoxExt)) *TextBoxExt

func (*TextBoxExt) ControlType

func (c *TextBoxExt) ControlType() string

func (*TextBoxExt) SetText

func (c *TextBoxExt) SetText(text string)

func (*TextBoxExt) Text

func (c *TextBoxExt) Text() string

type TextBoxSelection

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

type ToolPanel

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

func NewToolPanel

func NewToolPanel(parent uiinterfaces.Widget, title string) *ToolPanel

func (*ToolPanel) AddButton

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

func (*ToolPanel) AddSpace

func (c *ToolPanel) AddSpace()

func (*ToolPanel) Dispose

func (c *ToolPanel) Dispose()

func (*ToolPanel) SetImage

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

func (*ToolPanel) XExpandable

func (c *ToolPanel) XExpandable() bool

func (*ToolPanel) YExpandable

func (c *ToolPanel) YExpandable() bool

type TreeColumn

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

type TreeNode

type TreeNode struct {
	ParentNode *TreeNode

	Icon      image.Image
	UserData  interface{}
	TextColor color.Color
	ToolTip   string
	// contains filtered or unexported fields
}

func (*TreeNode) Text

func (c *TreeNode) Text() string

type TreeView

type TreeView struct {
	Container

	OnExpand       func(treeView *TreeView, node *TreeNode)
	OnSelectedNode func(treeView *TreeView, node *TreeNode)
	OnBeginDrag    func(treeView *TreeView, node *TreeNode) interface{}
	OnDropOnNode   func(treeView *TreeView, node *TreeNode, parameter interface{})
	// contains filtered or unexported fields
}

func NewTreeView

func NewTreeView(parent uiinterfaces.Widget) *TreeView

func (*TreeView) AddColumn

func (c *TreeView) AddColumn(text string, width int) *TreeColumn

func (*TreeView) AddNode

func (c *TreeView) AddNode(parentNode *TreeNode, text string) *TreeNode

func (*TreeView) Children

func (c *TreeView) Children(node *TreeNode) []*TreeNode

func (*TreeView) CollapseNode

func (c *TreeView) CollapseNode(node *TreeNode)

func (*TreeView) ControlType

func (c *TreeView) ControlType() string

func (*TreeView) Dispose

func (c *TreeView) Dispose()

func (*TreeView) EnsureVisibleDisplayedNode

func (c *TreeView) EnsureVisibleDisplayedNode(node *displayedNode)

func (*TreeView) EnsureVisibleNode

func (c *TreeView) EnsureVisibleNode(node *TreeNode)

func (*TreeView) ExpandNode

func (c *TreeView) ExpandNode(node *TreeNode)

func (*TreeView) GetNodeIndexInParent

func (c *TreeView) GetNodeIndexInParent(node *TreeNode) int

func (*TreeView) IsHeaderVisible

func (c *TreeView) IsHeaderVisible() bool

func (*TreeView) KeyDown

func (c *TreeView) KeyDown(event *uievents.KeyDownEvent) bool

func (*TreeView) Nodes

func (c *TreeView) Nodes() []*TreeNode

func (*TreeView) RemoveAllNodes

func (c *TreeView) RemoveAllNodes()

func (*TreeView) RemoveNode

func (c *TreeView) RemoveNode(node *TreeNode)

func (*TreeView) RemoveNodes

func (c *TreeView) RemoveNodes(node *TreeNode)

func (*TreeView) SelectNode

func (c *TreeView) SelectNode(node *TreeNode)

func (*TreeView) SelectedNode

func (c *TreeView) SelectedNode() *TreeNode

func (*TreeView) SetColumnWidth

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

func (*TreeView) SetHeaderVisible

func (c *TreeView) SetHeaderVisible(visible bool)

func (*TreeView) SetNodeValue

func (c *TreeView) SetNodeValue(node *TreeNode, columnIndex int, text string)

func (*TreeView) TabStop

func (c *TreeView) TabStop() bool

func (*TreeView) VisibleNodes

func (c *TreeView) VisibleNodes() []*TreeNode

type TreeViewContent

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

func NewTreeViewContent

func NewTreeViewContent(parent uiinterfaces.Widget) *TreeViewContent

func (*TreeViewContent) Draw

func (c *TreeViewContent) Draw(ctx ui.DrawContext)

func (*TreeViewContent) MouseClick

func (c *TreeViewContent) MouseClick(event *uievents.MouseClickEvent)

func (*TreeViewContent) MouseDown

func (c *TreeViewContent) MouseDown(event *uievents.MouseDownEvent)

func (*TreeViewContent) MouseDrop

func (c *TreeViewContent) MouseDrop(event *uievents.MouseDropEvent)

func (*TreeViewContent) MouseMove

func (c *TreeViewContent) MouseMove(event *uievents.MouseMoveEvent)

func (*TreeViewContent) MouseUp

func (c *TreeViewContent) MouseUp(event *uievents.MouseUpEvent)

func (*TreeViewContent) OnScroll

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

func (*TreeViewContent) Tooltip

func (c *TreeViewContent) Tooltip() string

type TreeViewHeader

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

func NewTreeViewHeader

func NewTreeViewHeader(parent uiinterfaces.Widget) *TreeViewHeader

func (*TreeViewHeader) ControlType

func (c *TreeViewHeader) ControlType() string

func (*TreeViewHeader) Draw

func (c *TreeViewHeader) Draw(ctx ui.DrawContext)

func (*TreeViewHeader) MinHeight

func (c *TreeViewHeader) MinHeight() int

func (*TreeViewHeader) MinWidth

func (c *TreeViewHeader) MinWidth() int

func (*TreeViewHeader) MouseDown

func (c *TreeViewHeader) MouseDown(event *uievents.MouseDownEvent)

func (*TreeViewHeader) MouseLeave

func (c *TreeViewHeader) MouseLeave()

func (*TreeViewHeader) MouseMove

func (c *TreeViewHeader) MouseMove(event *uievents.MouseMoveEvent)

func (*TreeViewHeader) MouseUp

func (c *TreeViewHeader) MouseUp(event *uievents.MouseUpEvent)

type VSpacer

type VSpacer struct {
	Control
}

func NewVSpacer

func NewVSpacer(parent uiinterfaces.Widget) *VSpacer

func (*VSpacer) ControlType

func (c *VSpacer) ControlType() string

func (*VSpacer) Draw

func (c *VSpacer) Draw(ctx ui.DrawContext)

func (*VSpacer) Subclass

func (c *VSpacer) Subclass() string

func (*VSpacer) TabStop

func (c *VSpacer) TabStop() bool

Jump to

Keyboard shortcuts

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