ui

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: MIT Imports: 23 Imported by: 6

Documentation

Index

Constants

View Source
const ContextMenuItemHeight = 32
View Source
const (
	DefaultButtonMinWidth = 100
)
View Source
const (
	DefaultUiLineHeight = 30
)
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 MinInt = -MaxInt - 1
View Source
const MinUint = 0

Variables

View Source
var IsDarkTheme = true
View Source
var Theme map[string]interface{}

Functions

func ApplyBaseFontSize added in v0.0.16

func ApplyBaseFontSize(fontSize float64)

func ApplyDarkTheme added in v0.0.16

func ApplyDarkTheme()

func ApplyLightTheme added in v0.0.16

func ApplyLightTheme()

func ClipboardGetText added in v0.0.2

func ClipboardGetText() (string, error)

func ClipboardSetText added in v0.0.2

func ClipboardSetText(text string)

func CohenSutherland

func CohenSutherland(x1, y1, x2, y2, left, top, right, bottom int) (int, int, int, int, bool)

func ColorFromHex added in v0.0.15

func ColorFromHex(hexStr string) color.RGBA

func ColorToHex added in v0.0.16

func ColorToHex(col color.Color) string

func DrawText added in v0.0.2

func DrawText(rgba *image.RGBA, text string, textColor color.Color, fontFamily string, fontSize float64, x int, y int, clipX int, clipY int, clipWidth int, clipHeight int)

func GetCharPositions added in v0.0.2

func GetCharPositions(fontFamily string, fontSize float64, text string) ([]int, error)

func GetThemeColor

func GetThemeColor(name string, defaultColor color.RGBA) color.RGBA

func GetThemeFloat added in v0.0.7

func GetThemeFloat(name string, defaultValue float64) float64

func GetThemeInt added in v0.0.7

func GetThemeInt(name string, defaultValue int) int

func GetThemeString

func GetThemeString(name string, defaultValue string) string

func MaximizeMainForm added in v0.0.16

func MaximizeMainForm()

func MeasureText

func MeasureText(fontFamily string, fontSize float64, text string) (int, int, error)

func MouseCursorFromString added in v0.0.14

func MouseCursorFromString(s string) nuimouse.MouseCursor

func MouseCursorToString added in v0.0.14

func MouseCursorToString(c nuimouse.MouseCursor) string

func NewComboBoxPopup added in v0.0.7

func NewComboBoxPopup() *comboBoxPopup

func NewDialogHeader added in v0.0.7

func NewDialogHeader() *dialogHeader

func NewId added in v0.0.2

func NewId() string

func NewTabWidgetButton added in v0.0.2

func NewTabWidgetButton(text string) *tabWidgetButton

func PopEvent added in v0.0.14

func PopEvent()

func PushEvent added in v0.0.14

func PushEvent(p any)

func ShowAboutDialog added in v0.0.15

func ShowAboutDialog(title string, line1 string, line2 string, line3 string, line4 string)

func ShowEnterStringDialog added in v0.0.12

func ShowEnterStringDialog(title string, messageText string, initialValue string, onSubmit func(value string))

func ShowMessageBox added in v0.0.12

func ShowMessageBox(title string, messageText string)

func ShowQuestionMessageBox added in v0.0.14

func ShowQuestionMessageBox(title string, messageText string, onOk func(), onCancel func())

func ThemeBackgroundColor added in v0.0.7

func ThemeBackgroundColor(elevation int, role string) color.RGBA

func ThemeBackgroundColorDarkTheme added in v0.0.16

func ThemeBackgroundColorDarkTheme(elevation int, role string) color.RGBA

func ThemeBackgroundColorLightTheme added in v0.0.16

func ThemeBackgroundColorLightTheme(elevation int, role string) color.RGBA

func ThemeFontFamily added in v0.0.7

func ThemeFontFamily() string

func ThemeFontSize added in v0.0.7

func ThemeFontSize() float64

func ThemeForegroundColor added in v0.0.7

func ThemeForegroundColor(role string) color.RGBA

func UpdateMainForm added in v0.0.2

func UpdateMainForm()

func UpdateMainFormLayout added in v0.0.6

func UpdateMainFormLayout()

Types

type Button added in v0.0.2

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

func NewButton

func NewButton(text string) *Button

func (*Button) Press added in v0.0.7

func (c *Button) Press()

func (*Button) ProcessPropChange added in v0.0.15

func (c *Button) ProcessPropChange(key string, value interface{})

func (*Button) SetOnButtonClick added in v0.0.2

func (c *Button) SetOnButtonClick(fn func())

func (*Button) SetText added in v0.0.2

func (c *Button) SetText(text string)

func (*Button) Text added in v0.0.2

func (c *Button) Text() string

type ButtonImage added in v0.0.12

type ButtonImage struct {
	Widget
	// contains filtered or unexported fields
}

func NewButtonImage added in v0.0.12

func NewButtonImage(img image.Image) *ButtonImage

func (*ButtonImage) Image added in v0.0.12

func (c *ButtonImage) Image() image.Image

func (*ButtonImage) Press added in v0.0.12

func (c *ButtonImage) Press()

func (*ButtonImage) SetImage added in v0.0.12

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

func (*ButtonImage) SetOnButtonClick added in v0.0.12

func (c *ButtonImage) SetOnButtonClick(fn func(btn *ButtonImage))

type Canvas

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

func NewCanvas

func NewCanvas(rgba *image.RGBA) *Canvas

func (*Canvas) ClipH added in v0.0.17

func (c *Canvas) ClipH() int

func (*Canvas) ClipW added in v0.0.17

func (c *Canvas) ClipW() int

func (*Canvas) ClipX added in v0.0.17

func (c *Canvas) ClipX() int

func (*Canvas) ClipY added in v0.0.17

func (c *Canvas) ClipY() int

func (*Canvas) DrawImage added in v0.0.8

func (c *Canvas) DrawImage(x int, y int, img image.Image)

func (*Canvas) DrawLine

func (c *Canvas) DrawLine(x1 int, y1 int, x2 int, y2 int, width int, color color.Color)

func (*Canvas) DrawRect added in v0.0.7

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

func (*Canvas) DrawRoundedRect added in v0.0.14

func (c *Canvas) DrawRoundedRect(x int, y int, width int, height int, radius int)

func (*Canvas) DrawText

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

func (*Canvas) FillRect

func (c *Canvas) FillRect(x int, y int, width int, height int, colr color.Color)

func (*Canvas) FillRoundedRect added in v0.0.14

func (c *Canvas) FillRoundedRect(x int, y int, width int, height int, radius int)

func (*Canvas) Height added in v0.0.16

func (c *Canvas) Height() int

func (*Canvas) MakeScriptLine

func (c *Canvas) MakeScriptLine(x1, y1, x2, y2, width float64) *DrawScript

func (*Canvas) MakeScriptLineBresenham

func (c *Canvas) MakeScriptLineBresenham(x1 float64, y1 float64, x2 float64, y2 float64) *DrawScript

func (*Canvas) MakeScriptLineWu

func (c *Canvas) MakeScriptLineWu(x1, y1, x2, y2 float64) *DrawScript

func (*Canvas) MixPixel

func (c *Canvas) MixPixel(x int, y int, rgba color.Color)

func (*Canvas) RGBA added in v0.0.2

func (c *Canvas) RGBA() *image.RGBA

func (*Canvas) Restore

func (c *Canvas) Restore()

func (*Canvas) Save

func (c *Canvas) Save()

func (*Canvas) SetColor

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

func (*Canvas) SetDirectTranslateAndClip added in v0.0.2

func (c *Canvas) SetDirectTranslateAndClip(x, y, w, h int)

func (*Canvas) SetFontFamily added in v0.0.7

func (c *Canvas) SetFontFamily(fontFamily string)

func (*Canvas) SetFontSize added in v0.0.7

func (c *Canvas) SetFontSize(fontSize float64)

func (*Canvas) SetHAlign added in v0.0.7

func (c *Canvas) SetHAlign(hAlign HAlign)

func (*Canvas) SetPixel

func (c *Canvas) SetPixel(x, y int)

func (*Canvas) SetUnderline added in v0.0.7

func (c *Canvas) SetUnderline(underline bool)

func (*Canvas) SetVAlign added in v0.0.7

func (c *Canvas) SetVAlign(vAlign VAlign)

func (*Canvas) TranslateAndClip added in v0.0.2

func (c *Canvas) TranslateAndClip(x, y int, w, h int)

func (*Canvas) TranslatedX

func (c *Canvas) TranslatedX() int

func (*Canvas) TranslatedY

func (c *Canvas) TranslatedY() int

func (*Canvas) Width added in v0.0.16

func (c *Canvas) Width() int

type Checkbox added in v0.0.8

type Checkbox struct {
	Widget
}

func NewCheckbox added in v0.0.8

func NewCheckbox(text string) *Checkbox

func (*Checkbox) Checked added in v0.0.8

func (c *Checkbox) Checked() bool

func (*Checkbox) SetChecked added in v0.0.8

func (c *Checkbox) SetChecked(checked bool)

func (*Checkbox) SetOnStateChanged added in v0.0.8

func (c *Checkbox) SetOnStateChanged(fn func())

func (*Checkbox) SetText added in v0.0.8

func (c *Checkbox) SetText(text string)

func (*Checkbox) Text added in v0.0.8

func (c *Checkbox) Text() string

type ComboBox added in v0.0.7

type ComboBox struct {
	Widget
	// contains filtered or unexported fields
}

func NewComboBox added in v0.0.7

func NewComboBox() *ComboBox

func (*ComboBox) AddItem added in v0.0.7

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

func (*ComboBox) OpenPopup added in v0.0.7

func (c *ComboBox) OpenPopup()

func (*ComboBox) SelectedItemData added in v0.0.7

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

func (*ComboBox) SelectedItemText added in v0.0.7

func (c *ComboBox) SelectedItemText() string

func (*ComboBox) SetSelectedIndex added in v0.0.7

func (c *ComboBox) SetSelectedIndex(index int)

type ComboBoxItem added in v0.0.7

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

type ContainerGridColumnInfo added in v0.0.2

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

type ContainerGridRowInfo added in v0.0.2

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

type ContextMenu added in v0.0.7

type ContextMenu struct {
	Widget

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

func NewContextMenu added in v0.0.7

func NewContextMenu(parent Widgeter) *ContextMenu

func (*ContextMenu) AddItem added in v0.0.7

func (c *ContextMenu) AddItem(text string, onClick func()) *ContextMenuItem

func (*ContextMenu) AddItemWithSubmenu added in v0.0.7

func (c *ContextMenu) AddItemWithSubmenu(text string, innerMenu *ContextMenu) *ContextMenuItem

func (*ContextMenu) ClosePopup added in v0.0.7

func (c *ContextMenu) ClosePopup()

func (*ContextMenu) OnInit added in v0.0.7

func (c *ContextMenu) OnInit()

func (*ContextMenu) RemoveAllItems added in v0.0.7

func (c *ContextMenu) RemoveAllItems()

func (*ContextMenu) ShowMenu added in v0.0.7

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

type ContextMenuItem added in v0.0.7

type ContextMenuItem struct {
	Widget

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

func NewContextMenuItem added in v0.0.7

func NewContextMenuItem() *ContextMenuItem

func (*ContextMenuItem) ControlType added in v0.0.7

func (c *ContextMenuItem) ControlType() string

func (*ContextMenuItem) Draw added in v0.0.7

func (c *ContextMenuItem) Draw(ctx *Canvas)

func (*ContextMenuItem) MouseEnter added in v0.0.7

func (c *ContextMenuItem) MouseEnter()

func (*ContextMenuItem) MouseLeave added in v0.0.7

func (c *ContextMenuItem) MouseLeave()

func (*ContextMenuItem) MouseMove added in v0.0.7

func (c *ContextMenuItem) MouseMove(x int, y int, mods nuikey.KeyModifiers) bool

func (*ContextMenuItem) SetInnerMenu added in v0.0.7

func (c *ContextMenuItem) SetInnerMenu(menu *ContextMenu)

func (*ContextMenuItem) SetText added in v0.0.7

func (c *ContextMenuItem) SetText(text string)

type Dialog added in v0.0.7

type Dialog struct {
	Widget

	CloseEvent func()

	OnAccept func()
	OnReject func()

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

func NewDialog added in v0.0.7

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

func (*Dialog) Accept added in v0.0.7

func (c *Dialog) Accept()

func (*Dialog) Close added in v0.0.7

func (c *Dialog) Close()

func (*Dialog) ClosePopup added in v0.0.7

func (c *Dialog) ClosePopup()

func (*Dialog) ContentPanel added in v0.0.7

func (c *Dialog) ContentPanel() *Panel

func (*Dialog) Reject added in v0.0.7

func (c *Dialog) Reject()

func (*Dialog) Resize added in v0.0.7

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

func (*Dialog) SetAcceptButton added in v0.0.7

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

func (*Dialog) SetRejectButton added in v0.0.7

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

func (*Dialog) SetTitle added in v0.0.7

func (c *Dialog) SetTitle(title string)

func (*Dialog) ShowDialog added in v0.0.7

func (c *Dialog) ShowDialog()

func (*Dialog) ShowDialogAtPos added in v0.0.7

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

type DrawScript

type DrawScript struct {
	Bounds image.Rectangle
	// contains filtered or unexported fields
}

func NewDrawScript

func NewDrawScript() *DrawScript

func (*DrawScript) DrawToRGBA

func (c *DrawScript) DrawToRGBA(img *image.RGBA, col color.Color)

func (*DrawScript) MixPixel

func (c *DrawScript) MixPixel(img *image.RGBA, x int, y int, rgba color.Color, intensity uint32)

type DrawScriptHorLine

type DrawScriptHorLine struct {
	X1 int
	X2 int
	Y  int
	C  float64
}

type DrawScriptPoint

type DrawScriptPoint struct {
	X int
	Y int
	C float64
}

type Event added in v0.0.14

type Event struct {
	Parameter any
}

func CurrentEvent added in v0.0.14

func CurrentEvent() *Event

type EventCheckboxStateChanged added in v0.0.14

type EventCheckboxStateChanged struct {
	Checkbox *Checkbox
	Checked  bool
}

type EventTableCellMouseDblClick added in v0.0.19

type EventTableCellMouseDblClick struct {
	Table     *Table
	Row       int
	Col       int
	Processed bool
}

type EventTextboxKeyDown added in v0.0.14

type EventTextboxKeyDown struct {
	Key       nuikey.Key
	Mods      nuikey.KeyModifiers
	Processed bool
}

type Form

type Form struct {
	// contains filtered or unexported fields
}
var MainForm *Form

func NewForm

func NewForm() *Form

func (*Form) Close added in v0.0.2

func (c *Form) Close()

func (*Form) DrawWidgetDebugInfo added in v0.0.2

func (c *Form) DrawWidgetDebugInfo(w Widgeter, cnv *Canvas)

func (*Form) Exec

func (c *Form) Exec()

func (*Form) ExecMaximized added in v0.0.16

func (c *Form) ExecMaximized()

func (*Form) FocusedWidget added in v0.0.16

func (c *Form) FocusedWidget() Widgeter

func (*Form) LayoutingBlockPop added in v0.0.12

func (c *Form) LayoutingBlockPop()

func (*Form) LayoutingBlockPush added in v0.0.12

func (c *Form) LayoutingBlockPush()

func (*Form) Panel

func (c *Form) Panel() *Panel

func (*Form) SetOnGlobalKeyDown added in v0.0.2

func (c *Form) SetOnGlobalKeyDown(onGlobalKeyDown func(keyCode nuikey.Key, mods nuikey.KeyModifiers) bool)

func (*Form) SetSize

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

func (*Form) SetTitle

func (c *Form) SetTitle(title string)

func (*Form) Update

func (c *Form) Update()

func (*Form) UpdateBlockPop added in v0.0.11

func (c *Form) UpdateBlockPop()

func (*Form) UpdateBlockPush added in v0.0.11

func (c *Form) UpdateBlockPush()

type Frame added in v0.0.14

type Frame struct {
	Widget
}

func NewFrame added in v0.0.14

func NewFrame() *Frame

type HAlign

type HAlign int
const HAlignCenter HAlign = 1
const HAlignLeft HAlign = 0
const HAlignRight HAlign = 2

func (*HAlign) String added in v0.0.14

func (c *HAlign) String() string

type HSpacer added in v0.0.2

type HSpacer struct {
	Widget
}

func NewHSpacer added in v0.0.2

func NewHSpacer() *HSpacer

type ImageBox added in v0.0.8

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

func NewImageBox added in v0.0.8

func NewImageBox() *ImageBox

func (*ImageBox) Image added in v0.0.8

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

func (*ImageBox) MaxHeight added in v0.0.12

func (c *ImageBox) MaxHeight() int

func (*ImageBox) MaxWidth added in v0.0.12

func (c *ImageBox) MaxWidth() int

func (*ImageBox) MinHeight added in v0.0.12

func (c *ImageBox) MinHeight() int

func (*ImageBox) MinWidth added in v0.0.12

func (c *ImageBox) MinWidth() int

func (*ImageBox) Scaling added in v0.0.8

func (c *ImageBox) Scaling() ImageBoxScale

func (*ImageBox) SetImage added in v0.0.8

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

func (*ImageBox) SetScaling added in v0.0.8

func (c *ImageBox) SetScaling(scaling ImageBoxScale)

type ImageBoxScale added in v0.0.8

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

type Label added in v0.0.2

type Label struct {
	Widget
}

func NewLabel added in v0.0.2

func NewLabel(text string) *Label

////////////////////////////////////////////////////////////////////////////////// NewLabel creates a new Label widget with the specified text.

func (*Label) IsUnderline added in v0.0.14

func (c *Label) IsUnderline() bool

IsUnderline returns whether the Label's text is underlined.

func (*Label) ProcessPropChange added in v0.0.15

func (c *Label) ProcessPropChange(key string, value interface{})

/////////////////////////////////////////////////////////////////////////////// Props

func (*Label) SetText added in v0.0.2

func (c *Label) SetText(text string)

SetText sets the text of the Label.

func (*Label) SetTextAlign added in v0.0.12

func (c *Label) SetTextAlign(align HAlign)

SetTextAlign sets the horizontal alignment of the Label's text.

func (*Label) SetUnderline added in v0.0.14

func (c *Label) SetUnderline(underline bool)

SetUnderline sets whether the Label's text is underlined.

func (*Label) Text added in v0.0.2

func (c *Label) Text() string

Text returns the text of the Label.

func (*Label) TextAlign added in v0.0.12

func (c *Label) TextAlign() HAlign

TextAlign returns the horizontal alignment of the Label's text.

type Panel added in v0.0.2

type Panel struct {
	Widget
}

func NewPanel added in v0.0.2

func NewPanel() *Panel

type ProgressBar added in v0.0.8

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

func NewProgressBar added in v0.0.8

func NewProgressBar(minValue, maxValue, initValue float64) *ProgressBar

func (*ProgressBar) SetMaxValue added in v0.0.8

func (c *ProgressBar) SetMaxValue(maxValue float64)

func (*ProgressBar) SetMinValue added in v0.0.8

func (c *ProgressBar) SetMinValue(minValue float64)

func (*ProgressBar) SetText added in v0.0.8

func (c *ProgressBar) SetText(text string)

func (*ProgressBar) SetValue added in v0.0.8

func (c *ProgressBar) SetValue(value float64)

func (*ProgressBar) Text added in v0.0.8

func (c *ProgressBar) Text() string

func (*ProgressBar) Value added in v0.0.8

func (c *ProgressBar) Value() float64

type RadioButton added in v0.0.8

type RadioButton struct {
	Widget
	// contains filtered or unexported fields
}

func NewRadioButton added in v0.0.8

func NewRadioButton(text string) *RadioButton

func (*RadioButton) Checked added in v0.0.8

func (c *RadioButton) Checked() bool

func (*RadioButton) SetChecked added in v0.0.8

func (c *RadioButton) SetChecked(checked bool)

func (*RadioButton) SetOnStateChanged added in v0.0.8

func (c *RadioButton) SetOnStateChanged(fn func(btn *RadioButton, checked bool))

func (*RadioButton) SetText added in v0.0.8

func (c *RadioButton) SetText(text string)

func (*RadioButton) Text added in v0.0.8

func (c *RadioButton) Text() string

type ScrollArea added in v0.0.14

type ScrollArea struct {
	Widget
}

func NewScrollArea added in v0.0.14

func NewScrollArea() *ScrollArea

type Space added in v0.0.15

type Space struct {
	Widget
}

func NewSpace added in v0.0.15

func NewSpace() *Space

func (*Space) MaxHeight added in v0.0.15

func (c *Space) MaxHeight() int

func (*Space) MaxWidth added in v0.0.15

func (c *Space) MaxWidth() int

func (*Space) MinHeight added in v0.0.15

func (c *Space) MinHeight() int

func (*Space) MinWidth added in v0.0.15

func (c *Space) MinWidth() int

func (*Space) SetSize added in v0.0.15

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

type TabWidget added in v0.0.2

type TabWidget struct {
	Widget
	// contains filtered or unexported fields
}

func NewTabWidget added in v0.0.2

func NewTabWidget() *TabWidget

func (*TabWidget) AddPage added in v0.0.2

func (c *TabWidget) AddPage(name string, widgeter Widgeter)

type Table added in v0.0.2

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

func NewTable added in v0.0.2

func NewTable() *Table

func (*Table) AddWidgetOnTable added in v0.0.7

func (c *Table) AddWidgetOnTable(widget Widgeter, posCellRow int, posCellCol int, widthInCells int, heightInCells int)

func (*Table) CellBorderColor added in v0.0.14

func (c *Table) CellBorderColor() color.Color

func (*Table) CellBorderWidth added in v0.0.14

func (c *Table) CellBorderWidth() int

func (*Table) ColumnCount added in v0.0.15

func (c *Table) ColumnCount() int

func (*Table) ColumnName added in v0.0.15

func (c *Table) ColumnName(col int) string

func (*Table) ColumnWidth added in v0.0.15

func (c *Table) ColumnWidth(col int) int

func (*Table) CopySelectionToClipboard added in v0.0.13

func (c *Table) CopySelectionToClipboard()

func (*Table) CurrentColumn added in v0.0.2

func (c *Table) CurrentColumn() int

func (*Table) CurrentRow added in v0.0.2

func (c *Table) CurrentRow() int

func (*Table) EditCurrentCell added in v0.0.7

func (c *Table) EditCurrentCell(enteredText string)

func (*Table) GetCellData2 added in v0.0.12

func (c *Table) GetCellData2(row int, col int) interface{}

func (*Table) GetCellText2 added in v0.0.12

func (c *Table) GetCellText2(row int, col int) string

func (*Table) ProcessKeyDown added in v0.0.8

func (c *Table) ProcessKeyDown(key nuikey.Key, mods nuikey.KeyModifiers) bool

func (*Table) RowCount added in v0.0.2

func (c *Table) RowCount() int

func (*Table) RowHeight added in v0.0.18

func (c *Table) RowHeight() int

func (*Table) ScrollToCell2 added in v0.0.12

func (c *Table) ScrollToCell2(row, col int)

func (*Table) SetCellBorderColor added in v0.0.14

func (c *Table) SetCellBorderColor(col color.RGBA)

func (*Table) SetCellBorderWidth added in v0.0.14

func (c *Table) SetCellBorderWidth(width int)

func (*Table) SetCellColor added in v0.0.12

func (c *Table) SetCellColor(row int, col int, color color.Color)

func (*Table) SetCellData2 added in v0.0.12

func (c *Table) SetCellData2(row int, col int, data interface{})

func (*Table) SetCellDisplayText added in v0.0.16

func (c *Table) SetCellDisplayText(row int, col int, text string)

func (*Table) SetCellEditTriggerDoubleClick added in v0.0.16

func (c *Table) SetCellEditTriggerDoubleClick(row int, col int, enabled bool)

func (*Table) SetCellEditTriggerEnter added in v0.0.16

func (c *Table) SetCellEditTriggerEnter(row int, col int, enabled bool)

func (*Table) SetCellEditTriggerF2 added in v0.0.16

func (c *Table) SetCellEditTriggerF2(row int, col int, enabled bool)

func (*Table) SetCellEditTriggerKeyDown added in v0.0.16

func (c *Table) SetCellEditTriggerKeyDown(row int, col int, enabled bool)

func (*Table) SetCellHAlign added in v0.0.13

func (c *Table) SetCellHAlign(row int, col int, align HAlign)

func (*Table) SetCellImage added in v0.0.15

func (c *Table) SetCellImage(row int, col int, img image.Image, imgWidth int)

func (*Table) SetCellOnDraw added in v0.0.18

func (c *Table) SetCellOnDraw(row int, col int, onDraw func(cnv *Canvas))

func (*Table) SetCellSelectionDisabled added in v0.0.16

func (c *Table) SetCellSelectionDisabled(row int, col int, disabled bool)

func (*Table) SetCellText2 added in v0.0.12

func (c *Table) SetCellText2(row int, col int, text string)

func (*Table) SetCellVAlign added in v0.0.13

func (c *Table) SetCellVAlign(row int, col int, align VAlign)

func (*Table) SetColumnCellName2 added in v0.0.12

func (c *Table) SetColumnCellName2(row int, col int, name string)

func (*Table) SetColumnCount added in v0.0.2

func (c *Table) SetColumnCount(count int)

func (*Table) SetColumnName added in v0.0.2

func (c *Table) SetColumnName(col int, name string)

func (*Table) SetColumnWidth added in v0.0.2

func (c *Table) SetColumnWidth(col int, width int)

func (*Table) SetCurrentCell2 added in v0.0.12

func (c *Table) SetCurrentCell2(row int, col int)

func (*Table) SetEditTriggerDoubleClick added in v0.0.8

func (c *Table) SetEditTriggerDoubleClick(enabled bool)

func (*Table) SetEditTriggerEnter added in v0.0.8

func (c *Table) SetEditTriggerEnter(enabled bool)

func (*Table) SetEditTriggerF2 added in v0.0.8

func (c *Table) SetEditTriggerF2(enabled bool)

func (*Table) SetEditTriggerKeyDown added in v0.0.8

func (c *Table) SetEditTriggerKeyDown(enabled bool)

func (*Table) SetHeaderCellSpan2 added in v0.0.12

func (c *Table) SetHeaderCellSpan2(row int, col int, spanRow int, spanCol int)

func (*Table) SetHeaderRowCount added in v0.0.8

func (c *Table) SetHeaderRowCount(count int)

func (*Table) SetModeLoading added in v0.0.13

func (c *Table) SetModeLoading(loading bool, text string)

func (*Table) SetOnCellChanged added in v0.0.16

func (c *Table) SetOnCellChanged(callback func(row int, col int, text string, data interface{}) bool)

func (*Table) SetOnCellMouseDblClick added in v0.0.19

func (c *Table) SetOnCellMouseDblClick(callback func())

func (*Table) SetOnColumnClick added in v0.0.15

func (c *Table) SetOnColumnClick(callback func(col int))

func (*Table) SetOnColumnResize added in v0.0.8

func (c *Table) SetOnColumnResize(callback func(col int, newWidth int))

func (*Table) SetOnSelectionChanged added in v0.0.2

func (c *Table) SetOnSelectionChanged(callback func(x int, y int))

func (*Table) SetRowCount added in v0.0.2

func (c *Table) SetRowCount(count int)

func (*Table) SetRowHeight added in v0.0.16

func (c *Table) SetRowHeight(height int)

func (*Table) SetSelectingCell added in v0.0.2

func (c *Table) SetSelectingCell(selecting bool)

func (*Table) SetSelectingRow added in v0.0.2

func (c *Table) SetSelectingRow(selecting bool)

func (*Table) SetShowSelection added in v0.0.2

func (c *Table) SetShowSelection(show bool)

type TextBox added in v0.0.2

type TextBox struct {
	Widget
	// contains filtered or unexported fields
}

func NewTextBox added in v0.0.2

func NewTextBox() *TextBox

func (*TextBox) AssemblyText added in v0.0.2

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

func (*TextBox) Draw added in v0.0.2

func (c *TextBox) Draw(ctx *Canvas, width, height int)

func (*TextBox) KeyChar added in v0.0.2

func (c *TextBox) KeyChar(ch rune, mods nuikey.KeyModifiers)

func (*TextBox) KeyDown added in v0.0.2

func (c *TextBox) KeyDown(key nuikey.Key, mods nuikey.KeyModifiers) bool

func (*TextBox) KeyUp added in v0.0.2

func (c *TextBox) KeyUp(key nuikey.Key, mods nuikey.KeyModifiers)

func (*TextBox) Lines added in v0.0.14

func (c *TextBox) Lines() []string

func (*TextBox) MouseDown added in v0.0.2

func (c *TextBox) MouseDown(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers)

func (*TextBox) MouseMove added in v0.0.2

func (c *TextBox) MouseMove(x int, y int, mods nuikey.KeyModifiers)

func (*TextBox) MouseUp added in v0.0.2

func (c *TextBox) MouseUp(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers)

func (*TextBox) MoveCursorToEnd added in v0.0.2

func (c *TextBox) MoveCursorToEnd()

func (*TextBox) OneLineHeight added in v0.0.2

func (c *TextBox) OneLineHeight() int

func (*TextBox) ScrollToBegin added in v0.0.2

func (c *TextBox) ScrollToBegin()

func (*TextBox) SelectAllText added in v0.0.2

func (c *TextBox) SelectAllText()

func (*TextBox) SelectedText added in v0.0.2

func (c *TextBox) SelectedText() string

func (*TextBox) SetEmptyText added in v0.0.2

func (c *TextBox) SetEmptyText(text string)

func (*TextBox) SetIsPassword added in v0.0.2

func (c *TextBox) SetIsPassword(isPassword bool)

func (*TextBox) SetMultiline added in v0.0.2

func (c *TextBox) SetMultiline(multiline bool, w *Widget)

func (*TextBox) SetOnTextBoxKeyDown added in v0.0.2

func (c *TextBox) SetOnTextBoxKeyDown(onKeyDown func())

func (*TextBox) SetOnTextChanged added in v0.0.2

func (c *TextBox) SetOnTextChanged(onTextChanged func())

func (*TextBox) SetProp added in v0.0.14

func (c *TextBox) SetProp(key string, value any)

func (*TextBox) SetReadOnly added in v0.0.2

func (c *TextBox) SetReadOnly(readonly bool)

func (*TextBox) SetText added in v0.0.2

func (c *TextBox) SetText(text string)

func (*TextBox) Text added in v0.0.2

func (c *TextBox) Text() string

type TextBoxSelection added in v0.0.2

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

type VAlign

type VAlign int
const VAlignBottom VAlign = 2
const VAlignCenter VAlign = 1
const VAlignTop VAlign = 0

func (*VAlign) String added in v0.0.14

func (c *VAlign) String() string

type VSpacer added in v0.0.2

type VSpacer struct {
	Widget
}

func NewVSpacer added in v0.0.2

func NewVSpacer() *VSpacer

type Widget

type Widget struct {
	PopupWidgets []Widgeter
	// contains filtered or unexported fields
}

func (*Widget) AddTimer added in v0.0.2

func (c *Widget) AddTimer(intervalMs int, callback func())

func (*Widget) AddWidget

func (c *Widget) AddWidget(w Widgeter)

func (*Widget) AddWidgetOnGrid added in v0.0.2

func (c *Widget) AddWidgetOnGrid(w Widgeter, gridRow int, gridColumn int)

func (*Widget) Anchors added in v0.0.2

func (c *Widget) Anchors() (left, top, right, bottom bool)

func (*Widget) AppendPopupWidget added in v0.0.7

func (c *Widget) AppendPopupWidget(w Widgeter)

func (*Widget) BackgroundColor added in v0.0.7

func (c *Widget) BackgroundColor() color.Color

func (*Widget) BackgroundColorForRole added in v0.0.16

func (c *Widget) BackgroundColorForRole(role string) color.Color

func (*Widget) BackgroundColorWithAddElevation added in v0.0.14

func (c *Widget) BackgroundColorWithAddElevation(elevation int) color.Color

func (*Widget) ClearLayoutCache added in v0.0.12

func (c *Widget) ClearLayoutCache()

func (*Widget) CloseAfterPopupWidget added in v0.0.7

func (c *Widget) CloseAfterPopupWidget(w Widgeter)

func (*Widget) CloseAllPopup added in v0.0.7

func (c *Widget) CloseAllPopup()

func (*Widget) CloseTopPopup added in v0.0.7

func (c *Widget) CloseTopPopup()

func (*Widget) ContextMenu added in v0.0.7

func (c *Widget) ContextMenu() *ContextMenu

func (*Widget) CurrentElevation added in v0.0.14

func (c *Widget) CurrentElevation() int

func (*Widget) Elevation added in v0.0.14

func (c *Widget) Elevation() int

func (*Widget) Enabled added in v0.0.12

func (c *Widget) Enabled() bool

func (*Widget) FindWidgetByName added in v0.0.14

func (c *Widget) FindWidgetByName(name string) Widgeter

func (*Widget) Focus

func (c *Widget) Focus()

func (*Widget) FontFamily added in v0.0.2

func (c *Widget) FontFamily() string

func (*Widget) FontSize added in v0.0.2

func (c *Widget) FontSize() float64

func (*Widget) ForegroundColor added in v0.0.14

func (c *Widget) ForegroundColor() color.Color

func (*Widget) FullPath added in v0.0.7

func (c *Widget) FullPath() []string

func (*Widget) GetHAlign added in v0.0.14

func (c *Widget) GetHAlign(key string, defaultValue HAlign) HAlign

func (*Widget) GetProp

func (c *Widget) GetProp(key string) any

func (*Widget) GetPropBool

func (c *Widget) GetPropBool(key string, defaultValue bool) bool

func (*Widget) GetPropColor added in v0.0.14

func (c *Widget) GetPropColor(key string, defaultValue string) color.Color

func (*Widget) GetPropFloat64 added in v0.0.14

func (c *Widget) GetPropFloat64(key string, defaultValue float64) float64

func (*Widget) GetPropFunction added in v0.0.14

func (c *Widget) GetPropFunction(key string) func()

func (*Widget) GetPropInt

func (c *Widget) GetPropInt(key string, defaultValue int) int

func (*Widget) GetPropString

func (c *Widget) GetPropString(key string, defaultValue string) string

func (*Widget) GetVAlign added in v0.0.14

func (c *Widget) GetVAlign(key string, defaultValue VAlign) VAlign

func (*Widget) GridX added in v0.0.2

func (c *Widget) GridX() int

func (*Widget) GridY added in v0.0.2

func (c *Widget) GridY() int

func (*Widget) Height added in v0.0.2

func (c *Widget) Height() int

func (*Widget) Id added in v0.0.2

func (c *Widget) Id() string

func (*Widget) InitWidget added in v0.0.2

func (c *Widget) InitWidget()

func (*Widget) InnerHeight added in v0.0.2

func (c *Widget) InnerHeight() int

func (*Widget) InnerWidth added in v0.0.2

func (c *Widget) InnerWidth() int

func (*Widget) IsCanBeFocused added in v0.0.7

func (c *Widget) IsCanBeFocused() bool

func (*Widget) IsFocused

func (c *Widget) IsFocused() bool

func (*Widget) IsHovered

func (c *Widget) IsHovered() bool

func (*Widget) IsRolePrimary added in v0.0.14

func (c *Widget) IsRolePrimary() bool

func (*Widget) IsRoleSecondary added in v0.0.14

func (c *Widget) IsRoleSecondary() bool

func (*Widget) IsRoleSurface added in v0.0.14

func (c *Widget) IsRoleSurface() bool

func (*Widget) IsVisible added in v0.0.2

func (c *Widget) IsVisible() bool

func (*Widget) MaxHeight added in v0.0.2

func (c *Widget) MaxHeight() int

func (*Widget) MaxWidth added in v0.0.2

func (c *Widget) MaxWidth() int

func (*Widget) MinHeight added in v0.0.2

func (c *Widget) MinHeight() int

func (*Widget) MinWidth added in v0.0.2

func (c *Widget) MinWidth() int

func (*Widget) MouseCursor added in v0.0.2

func (c *Widget) MouseCursor() nuimouse.MouseCursor

func (*Widget) Name

func (c *Widget) Name() string

func (*Widget) NextGridColumn added in v0.0.12

func (c *Widget) NextGridColumn() int

func (*Widget) NextGridRow added in v0.0.12

func (c *Widget) NextGridRow() int

func (*Widget) ParentWidget added in v0.0.7

func (c *Widget) ParentWidget() Widgeter

func (*Widget) ParentWidgetId added in v0.0.7

func (c *Widget) ParentWidgetId() string

func (*Widget) ProcessChar added in v0.0.2

func (c *Widget) ProcessChar(char rune, mods nuikey.KeyModifiers) bool

func (*Widget) ProcessClosePopup added in v0.0.7

func (c *Widget) ProcessClosePopup()

func (*Widget) ProcessFocusLost added in v0.0.7

func (c *Widget) ProcessFocusLost()

func (*Widget) ProcessFocused added in v0.0.7

func (c *Widget) ProcessFocused()

func (*Widget) ProcessKeyDown added in v0.0.2

func (c *Widget) ProcessKeyDown(key nuikey.Key, mods nuikey.KeyModifiers) bool

func (*Widget) ProcessKeyUp added in v0.0.2

func (c *Widget) ProcessKeyUp(key nuikey.Key, mods nuikey.KeyModifiers) bool

func (*Widget) ProcessMouseDblClick added in v0.0.2

func (c *Widget) ProcessMouseDblClick(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers) bool

func (*Widget) ProcessMouseDown added in v0.0.2

func (c *Widget) ProcessMouseDown(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers) bool

func (*Widget) ProcessMouseEnter added in v0.0.2

func (c *Widget) ProcessMouseEnter() bool

func (*Widget) ProcessMouseLeave added in v0.0.2

func (c *Widget) ProcessMouseLeave() bool

func (*Widget) ProcessMouseMove added in v0.0.2

func (c *Widget) ProcessMouseMove(x int, y int, mods nuikey.KeyModifiers) bool

func (*Widget) ProcessMouseUp added in v0.0.2

func (c *Widget) ProcessMouseUp(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers, onlyForWidgetId string) bool

func (*Widget) ProcessMouseWheel added in v0.0.2

func (c *Widget) ProcessMouseWheel(deltaX, deltaY int) bool

func (*Widget) ProcessPaint added in v0.0.2

func (c *Widget) ProcessPaint(cnv *Canvas)

func (*Widget) ProcessPropChange added in v0.0.15

func (c *Widget) ProcessPropChange(key string, value interface{})

func (*Widget) ProcessTimer added in v0.0.2

func (c *Widget) ProcessTimer()

func (*Widget) RectClientAreaOnWindow added in v0.0.7

func (c *Widget) RectClientAreaOnWindow() (x, y int)

func (*Widget) RemoveAllWidgets added in v0.0.2

func (c *Widget) RemoveAllWidgets()

func (*Widget) RemoveWidget added in v0.0.2

func (c *Widget) RemoveWidget(w Widgeter)

func (*Widget) Role added in v0.0.14

func (c *Widget) Role() string

func (*Widget) ScrollEnsureVisible added in v0.0.2

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

func (*Widget) ScrollX added in v0.0.7

func (c *Widget) ScrollX() int

func (*Widget) ScrollY added in v0.0.7

func (c *Widget) ScrollY() int

func (*Widget) SetAbsolutePositioning added in v0.0.2

func (c *Widget) SetAbsolutePositioning(absolute bool)

func (*Widget) SetAllowScroll added in v0.0.2

func (c *Widget) SetAllowScroll(allowX bool, allowY bool)

func (*Widget) SetAnchors

func (c *Widget) SetAnchors(left, top, right, bottom bool)

func (*Widget) SetAutoFillBackground added in v0.0.12

func (c *Widget) SetAutoFillBackground(autoFill bool)

func (*Widget) SetBackgroundColor added in v0.0.2

func (c *Widget) SetBackgroundColor(col color.Color)

func (*Widget) SetCanBeFocused added in v0.0.7

func (c *Widget) SetCanBeFocused(canBeFocused bool)

func (*Widget) SetCellPadding added in v0.0.7

func (c *Widget) SetCellPadding(padding int)

func (*Widget) SetContextMenu added in v0.0.7

func (c *Widget) SetContextMenu(menu *ContextMenu)

func (*Widget) SetElevation added in v0.0.14

func (c *Widget) SetElevation(elevation int)

func (*Widget) SetEnabled added in v0.0.12

func (c *Widget) SetEnabled(enabled bool)

func (*Widget) SetForegroundColor added in v0.0.10

func (c *Widget) SetForegroundColor(col color.Color)

func (*Widget) SetGridPosition added in v0.0.2

func (c *Widget) SetGridPosition(row, column int)

func (*Widget) SetInnerSize added in v0.0.2

func (c *Widget) SetInnerSize(width, height int)

func (*Widget) SetLayout added in v0.0.14

func (c *Widget) SetLayout(layoutAsXml string, eventProcessor interface{}, widgets map[string]Widgeter) error

func (*Widget) SetMaxHeight added in v0.0.2

func (c *Widget) SetMaxHeight(maxHeight int)

func (*Widget) SetMaxSize added in v0.0.2

func (c *Widget) SetMaxSize(maxWidth, maxHeight int)

func (*Widget) SetMaxWidth added in v0.0.2

func (c *Widget) SetMaxWidth(maxWidth int)

func (*Widget) SetMinHeight added in v0.0.2

func (c *Widget) SetMinHeight(minHeight int)

func (*Widget) SetMinSize added in v0.0.2

func (c *Widget) SetMinSize(minWidth, minHeight int)

func (*Widget) SetMinWidth added in v0.0.2

func (c *Widget) SetMinWidth(minWidth int)

func (*Widget) SetMouseCursor

func (c *Widget) SetMouseCursor(cursor nuimouse.MouseCursor)

func (*Widget) SetName

func (c *Widget) SetName(name string)

func (*Widget) SetOnChar added in v0.0.2

func (c *Widget) SetOnChar(f func(char rune, mods nuikey.KeyModifiers) bool)

func (*Widget) SetOnClick

func (c *Widget) SetOnClick(f func(button nuimouse.MouseButton, x int, y int) bool)

func (*Widget) SetOnFocusLost added in v0.0.7

func (c *Widget) SetOnFocusLost(onFocusLost func())

func (*Widget) SetOnFocused added in v0.0.2

func (c *Widget) SetOnFocused(onFocused func())

func (*Widget) SetOnKeyDown

func (c *Widget) SetOnKeyDown(f func(key nuikey.Key, mods nuikey.KeyModifiers) bool)

func (*Widget) SetOnKeyUp

func (c *Widget) SetOnKeyUp(f func(key nuikey.Key, mods nuikey.KeyModifiers) bool)

func (*Widget) SetOnMouseDblClick added in v0.0.7

func (c *Widget) SetOnMouseDblClick(f func(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers) bool)

func (*Widget) SetOnMouseDown

func (c *Widget) SetOnMouseDown(f func(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers) bool)

func (*Widget) SetOnMouseEnter

func (c *Widget) SetOnMouseEnter(f func())

func (*Widget) SetOnMouseLeave

func (c *Widget) SetOnMouseLeave(f func())

func (*Widget) SetOnMouseMove

func (c *Widget) SetOnMouseMove(f func(x int, y int, mods nuikey.KeyModifiers) bool)

func (*Widget) SetOnMouseUp

func (c *Widget) SetOnMouseUp(f func(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers) bool)

func (*Widget) SetOnMouseWheel

func (c *Widget) SetOnMouseWheel(f func(deltaX, deltaY int) bool)

func (*Widget) SetOnPaint

func (c *Widget) SetOnPaint(f func(cnv *Canvas))

func (*Widget) SetOnPostPaint added in v0.0.7

func (c *Widget) SetOnPostPaint(f func(cnv *Canvas))

func (*Widget) SetOnScrollChanged added in v0.0.7

func (c *Widget) SetOnScrollChanged(f func(scrollX, scrollY int))

func (*Widget) SetPanelPadding added in v0.0.2

func (c *Widget) SetPanelPadding(padding int)

func (*Widget) SetParentWidgetId added in v0.0.7

func (c *Widget) SetParentWidgetId(id string)

func (*Widget) SetPosition

func (c *Widget) SetPosition(x, y int)

func (*Widget) SetProp

func (c *Widget) SetProp(key string, value any)

func (*Widget) SetPropFunction added in v0.0.14

func (c *Widget) SetPropFunction(key string, f func())

func (*Widget) SetRole added in v0.0.14

func (c *Widget) SetRole(role string)

func (*Widget) SetSize

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

func (*Widget) SetTypeName added in v0.0.2

func (c *Widget) SetTypeName(typeName string)

func (*Widget) SetVisible added in v0.0.2

func (c *Widget) SetVisible(visible bool)

func (*Widget) SetXExpandable added in v0.0.2

func (c *Widget) SetXExpandable(expandable bool)

func (*Widget) SetYExpandable added in v0.0.2

func (c *Widget) SetYExpandable(expandable bool)

func (*Widget) TypeName added in v0.0.2

func (c *Widget) TypeName() string

func (*Widget) Widgets added in v0.0.4

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

func (*Widget) Width added in v0.0.2

func (c *Widget) Width() int

func (*Widget) X

func (c *Widget) X() int

func (*Widget) XExpandable added in v0.0.2

func (c *Widget) XExpandable() bool

func (*Widget) Y

func (c *Widget) Y() int

func (*Widget) YExpandable added in v0.0.2

func (c *Widget) YExpandable() bool

type Widgeter added in v0.0.2

type Widgeter interface {
	Id() string
	ParentWidgetId() string
	SetParentWidgetId(id string)
	FullPath() []string
	TypeName() string
	Name() string
	X() int
	Y() int
	Width() int
	Height() int
	InnerWidth() int
	InnerHeight() int

	SetProp(key string, value interface{})
	SetPropFunction(key string, f func())
	GetProp(key string) interface{}
	GetPropString(key string, defaultValue string) string
	GetPropInt(key string, defaultValue int) int
	GetPropBool(key string, defaultValue bool) bool
	GetPropFloat64(key string, defaultValue float64) float64

	Widgets() []Widgeter

	Elevation() int

	SetRole(role string)
	Role() string

	FindWidgetByName(name string) Widgeter

	Enabled() bool
	SetEnabled(enabled bool)

	AddTimer(duration int, callback func())

	SetName(name string)
	SetPosition(x, y int)
	SetSize(width, height int)
	SetAnchors(left, top, right, bottom bool)

	Focus()

	ProcessPaint(cnv *Canvas)
	ProcessMouseDown(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers) bool
	ProcessMouseUp(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers, onlyForWidgetId string) bool
	ProcessMouseMove(x int, y int, mods nuikey.KeyModifiers) bool
	ProcessMouseLeave() bool
	ProcessMouseEnter() bool
	ProcessKeyDown(keyCode nuikey.Key, mods nuikey.KeyModifiers) bool
	ProcessKeyUp(keyCode nuikey.Key, mods nuikey.KeyModifiers) bool
	ProcessMouseDblClick(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers) bool
	ProcessChar(char rune, mods nuikey.KeyModifiers) bool
	ProcessMouseWheel(deltaX int, deltaY int) bool
	ProcessTimer()
	ProcessFocused()
	ProcessFocusLost()
	ProcessPropChange(key string, value interface{})

	ProcessClosePopup()

	RectClientAreaOnWindow() (x, y int)

	ScrollX() int
	ScrollY() int

	SetMouseCursor(cursor nuimouse.MouseCursor)
	MouseCursor() nuimouse.MouseCursor

	Anchors() (left, top, right, bottom bool)

	AddWidget(widget Widgeter)
	AddWidgetOnGrid(widget Widgeter, gridX, gridY int)
	RemoveWidget(widget Widgeter)

	IsVisible() bool

	GridX() int
	GridY() int
	SetGridPosition(row, column int)

	XExpandable() bool
	YExpandable() bool

	MinWidth() int
	MinHeight() int

	MaxWidth() int
	MaxHeight() int

	SetAbsolutePositioning(absolute bool)
	SetXExpandable(expandable bool)
	SetYExpandable(expandable bool)

	ClearLayoutCache()
	// contains filtered or unexported methods
}

func WidgetById added in v0.0.2

func WidgetById(id string) Widgeter

Jump to

Keyboard shortcuts

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