Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyBaseFontSize(fontSize float64)
- func ApplyDarkTheme()
- func ApplyLightTheme()
- func ClipboardGetText() (string, error)
- func ClipboardSetText(text string)
- func CohenSutherland(x1, y1, x2, y2, left, top, right, bottom int) (int, int, int, int, bool)
- func ColorFromHex(hexStr string) color.RGBA
- func ColorToHex(col color.Color) string
- func DrawText(rgba *image.RGBA, text string, textColor color.Color, fontFamily string, ...)
- func GetCharPositions(fontFamily string, fontSize float64, text string) ([]int, error)
- func GetThemeColor(name string, defaultColor color.RGBA) color.RGBA
- func GetThemeFloat(name string, defaultValue float64) float64
- func GetThemeInt(name string, defaultValue int) int
- func GetThemeString(name string, defaultValue string) string
- func MaximizeMainForm()
- func MeasureText(fontFamily string, fontSize float64, text string) (int, int, error)
- func MouseCursorFromString(s string) nuimouse.MouseCursor
- func MouseCursorToString(c nuimouse.MouseCursor) string
- func NewComboBoxPopup() *comboBoxPopup
- func NewDialogHeader() *dialogHeader
- func NewId() string
- func NewTabWidgetButton(text string) *tabWidgetButton
- func PopEvent()
- func PushEvent(p any)
- func ShowAboutDialog(title string, line1 string, line2 string, line3 string, line4 string)
- func ShowEnterStringDialog(title string, messageText string, initialValue string, ...)
- func ShowMessageBox(title string, messageText string)
- func ShowQuestionMessageBox(title string, messageText string, onOk func(), onCancel func())
- func ThemeBackgroundColor(elevation int, role string) color.RGBA
- func ThemeBackgroundColorDarkTheme(elevation int, role string) color.RGBA
- func ThemeBackgroundColorLightTheme(elevation int, role string) color.RGBA
- func ThemeFontFamily() string
- func ThemeFontSize() float64
- func ThemeForegroundColor(role string) color.RGBA
- func UpdateMainForm()
- func UpdateMainFormLayout()
- type Button
- type ButtonImage
- type Canvas
- func (c *Canvas) ClipH() int
- func (c *Canvas) ClipW() int
- func (c *Canvas) ClipX() int
- func (c *Canvas) ClipY() int
- func (c *Canvas) DrawImage(x int, y int, img image.Image)
- func (c *Canvas) DrawLine(x1 int, y1 int, x2 int, y2 int, width int, color color.Color)
- func (c *Canvas) DrawRect(x int, y int, width int, height int)
- func (c *Canvas) DrawRoundedRect(x int, y int, width int, height int, radius int)
- func (c *Canvas) DrawText(x int, y int, width int, height int, text string)
- func (c *Canvas) FillRect(x int, y int, width int, height int, colr color.Color)
- func (c *Canvas) FillRoundedRect(x int, y int, width int, height int, radius int)
- func (c *Canvas) Height() int
- func (c *Canvas) MakeScriptLine(x1, y1, x2, y2, width float64) *DrawScript
- func (c *Canvas) MakeScriptLineBresenham(x1 float64, y1 float64, x2 float64, y2 float64) *DrawScript
- func (c *Canvas) MakeScriptLineWu(x1, y1, x2, y2 float64) *DrawScript
- func (c *Canvas) MixPixel(x int, y int, rgba color.Color)
- func (c *Canvas) RGBA() *image.RGBA
- func (c *Canvas) Restore()
- func (c *Canvas) Save()
- func (c *Canvas) SetColor(col color.Color)
- func (c *Canvas) SetDirectTranslateAndClip(x, y, w, h int)
- func (c *Canvas) SetFontFamily(fontFamily string)
- func (c *Canvas) SetFontSize(fontSize float64)
- func (c *Canvas) SetHAlign(hAlign HAlign)
- func (c *Canvas) SetPixel(x, y int)
- func (c *Canvas) SetUnderline(underline bool)
- func (c *Canvas) SetVAlign(vAlign VAlign)
- func (c *Canvas) TranslateAndClip(x, y int, w, h int)
- func (c *Canvas) TranslatedX() int
- func (c *Canvas) TranslatedY() int
- func (c *Canvas) Width() int
- type Checkbox
- type ComboBox
- type ComboBoxItem
- type ContainerGridColumnInfo
- type ContainerGridRowInfo
- type ContextMenu
- func (c *ContextMenu) AddItem(text string, onClick func()) *ContextMenuItem
- func (c *ContextMenu) AddItemWithSubmenu(text string, innerMenu *ContextMenu) *ContextMenuItem
- func (c *ContextMenu) ClosePopup()
- func (c *ContextMenu) OnInit()
- func (c *ContextMenu) RemoveAllItems()
- func (c *ContextMenu) ShowMenu(x int, y int)
- type ContextMenuItem
- func (c *ContextMenuItem) ControlType() string
- func (c *ContextMenuItem) Draw(ctx *Canvas)
- func (c *ContextMenuItem) MouseEnter()
- func (c *ContextMenuItem) MouseLeave()
- func (c *ContextMenuItem) MouseMove(x int, y int, mods nuikey.KeyModifiers) bool
- func (c *ContextMenuItem) SetInnerMenu(menu *ContextMenu)
- func (c *ContextMenuItem) SetText(text string)
- type Dialog
- func (c *Dialog) Accept()
- func (c *Dialog) Close()
- func (c *Dialog) ClosePopup()
- func (c *Dialog) ContentPanel() *Panel
- func (c *Dialog) Reject()
- func (c *Dialog) Resize(w, h int)
- func (c *Dialog) SetAcceptButton(acceptButton *Button)
- func (c *Dialog) SetRejectButton(rejectButton *Button)
- func (c *Dialog) SetTitle(title string)
- func (c *Dialog) ShowDialog()
- func (c *Dialog) ShowDialogAtPos(x, y int)
- type DrawScript
- type DrawScriptHorLine
- type DrawScriptPoint
- type Event
- type EventCheckboxStateChanged
- type EventTableCellMouseDblClick
- type EventTextboxKeyDown
- type Form
- func (c *Form) Close()
- func (c *Form) DrawWidgetDebugInfo(w Widgeter, cnv *Canvas)
- func (c *Form) Exec()
- func (c *Form) ExecMaximized()
- func (c *Form) FocusedWidget() Widgeter
- func (c *Form) LayoutingBlockPop()
- func (c *Form) LayoutingBlockPush()
- func (c *Form) Panel() *Panel
- func (c *Form) SetOnGlobalKeyDown(onGlobalKeyDown func(keyCode nuikey.Key, mods nuikey.KeyModifiers) bool)
- func (c *Form) SetSize(width, height int)
- func (c *Form) SetTitle(title string)
- func (c *Form) Update()
- func (c *Form) UpdateBlockPop()
- func (c *Form) UpdateBlockPush()
- type Frame
- type HAlign
- type HSpacer
- type ImageBox
- func (c *ImageBox) Image() image.Image
- func (c *ImageBox) MaxHeight() int
- func (c *ImageBox) MaxWidth() int
- func (c *ImageBox) MinHeight() int
- func (c *ImageBox) MinWidth() int
- func (c *ImageBox) Scaling() ImageBoxScale
- func (c *ImageBox) SetImage(img image.Image)
- func (c *ImageBox) SetScaling(scaling ImageBoxScale)
- type ImageBoxScale
- type Label
- type Panel
- type ProgressBar
- type RadioButton
- type ScrollArea
- type Space
- type TabWidget
- type Table
- func (c *Table) AddWidgetOnTable(widget Widgeter, posCellRow int, posCellCol int, widthInCells int, ...)
- func (c *Table) CellBorderColor() color.Color
- func (c *Table) CellBorderWidth() int
- func (c *Table) ColumnCount() int
- func (c *Table) ColumnName(col int) string
- func (c *Table) ColumnWidth(col int) int
- func (c *Table) CopySelectionToClipboard()
- func (c *Table) CurrentColumn() int
- func (c *Table) CurrentRow() int
- func (c *Table) EditCurrentCell(enteredText string)
- func (c *Table) GetCellData2(row int, col int) interface{}
- func (c *Table) GetCellText2(row int, col int) string
- func (c *Table) ProcessKeyDown(key nuikey.Key, mods nuikey.KeyModifiers) bool
- func (c *Table) RowCount() int
- func (c *Table) RowHeight() int
- func (c *Table) ScrollToCell2(row, col int)
- func (c *Table) SetCellBorderColor(col color.RGBA)
- func (c *Table) SetCellBorderWidth(width int)
- func (c *Table) SetCellColor(row int, col int, color color.Color)
- func (c *Table) SetCellData2(row int, col int, data interface{})
- func (c *Table) SetCellDisplayText(row int, col int, text string)
- func (c *Table) SetCellEditTriggerDoubleClick(row int, col int, enabled bool)
- func (c *Table) SetCellEditTriggerEnter(row int, col int, enabled bool)
- func (c *Table) SetCellEditTriggerF2(row int, col int, enabled bool)
- func (c *Table) SetCellEditTriggerKeyDown(row int, col int, enabled bool)
- func (c *Table) SetCellHAlign(row int, col int, align HAlign)
- func (c *Table) SetCellImage(row int, col int, img image.Image, imgWidth int)
- func (c *Table) SetCellOnDraw(row int, col int, onDraw func(cnv *Canvas))
- func (c *Table) SetCellSelectionDisabled(row int, col int, disabled bool)
- func (c *Table) SetCellText2(row int, col int, text string)
- func (c *Table) SetCellVAlign(row int, col int, align VAlign)
- func (c *Table) SetColumnCellName2(row int, col int, name string)
- func (c *Table) SetColumnCount(count int)
- func (c *Table) SetColumnName(col int, name string)
- func (c *Table) SetColumnWidth(col int, width int)
- func (c *Table) SetCurrentCell2(row int, col int)
- func (c *Table) SetEditTriggerDoubleClick(enabled bool)
- func (c *Table) SetEditTriggerEnter(enabled bool)
- func (c *Table) SetEditTriggerF2(enabled bool)
- func (c *Table) SetEditTriggerKeyDown(enabled bool)
- func (c *Table) SetHeaderCellSpan2(row int, col int, spanRow int, spanCol int)
- func (c *Table) SetHeaderRowCount(count int)
- func (c *Table) SetModeLoading(loading bool, text string)
- func (c *Table) SetOnCellChanged(callback func(row int, col int, text string, data interface{}) bool)
- func (c *Table) SetOnCellMouseDblClick(callback func())
- func (c *Table) SetOnColumnClick(callback func(col int))
- func (c *Table) SetOnColumnResize(callback func(col int, newWidth int))
- func (c *Table) SetOnSelectionChanged(callback func(x int, y int))
- func (c *Table) SetRowCount(count int)
- func (c *Table) SetRowHeight(height int)
- func (c *Table) SetSelectingCell(selecting bool)
- func (c *Table) SetSelectingRow(selecting bool)
- func (c *Table) SetShowSelection(show bool)
- type TextBox
- func (c *TextBox) AssemblyText(lines []string) string
- func (c *TextBox) Draw(ctx *Canvas, width, height int)
- func (c *TextBox) KeyChar(ch rune, mods nuikey.KeyModifiers)
- func (c *TextBox) KeyDown(key nuikey.Key, mods nuikey.KeyModifiers) bool
- func (c *TextBox) KeyUp(key nuikey.Key, mods nuikey.KeyModifiers)
- func (c *TextBox) Lines() []string
- func (c *TextBox) MouseDown(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers)
- func (c *TextBox) MouseMove(x int, y int, mods nuikey.KeyModifiers)
- func (c *TextBox) MouseUp(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers)
- func (c *TextBox) MoveCursorToEnd()
- func (c *TextBox) OneLineHeight() int
- func (c *TextBox) ScrollToBegin()
- func (c *TextBox) SelectAllText()
- func (c *TextBox) SelectedText() string
- func (c *TextBox) SetEmptyText(text string)
- func (c *TextBox) SetIsPassword(isPassword bool)
- func (c *TextBox) SetMultiline(multiline bool, w *Widget)
- func (c *TextBox) SetOnTextBoxKeyDown(onKeyDown func())
- func (c *TextBox) SetOnTextChanged(onTextChanged func())
- func (c *TextBox) SetProp(key string, value any)
- func (c *TextBox) SetReadOnly(readonly bool)
- func (c *TextBox) SetText(text string)
- func (c *TextBox) Text() string
- type TextBoxSelection
- type VAlign
- type VSpacer
- type Widget
- func (c *Widget) AddTimer(intervalMs int, callback func())
- func (c *Widget) AddWidget(w Widgeter)
- func (c *Widget) AddWidgetOnGrid(w Widgeter, gridRow int, gridColumn int)
- func (c *Widget) Anchors() (left, top, right, bottom bool)
- func (c *Widget) AppendPopupWidget(w Widgeter)
- func (c *Widget) BackgroundColor() color.Color
- func (c *Widget) BackgroundColorForRole(role string) color.Color
- func (c *Widget) BackgroundColorWithAddElevation(elevation int) color.Color
- func (c *Widget) ClearLayoutCache()
- func (c *Widget) CloseAfterPopupWidget(w Widgeter)
- func (c *Widget) CloseAllPopup()
- func (c *Widget) CloseTopPopup()
- func (c *Widget) ContextMenu() *ContextMenu
- func (c *Widget) CurrentElevation() int
- func (c *Widget) Elevation() int
- func (c *Widget) Enabled() bool
- func (c *Widget) FindWidgetByName(name string) Widgeter
- func (c *Widget) Focus()
- func (c *Widget) FontFamily() string
- func (c *Widget) FontSize() float64
- func (c *Widget) ForegroundColor() color.Color
- func (c *Widget) FullPath() []string
- func (c *Widget) GetHAlign(key string, defaultValue HAlign) HAlign
- func (c *Widget) GetProp(key string) any
- func (c *Widget) GetPropBool(key string, defaultValue bool) bool
- func (c *Widget) GetPropColor(key string, defaultValue string) color.Color
- func (c *Widget) GetPropFloat64(key string, defaultValue float64) float64
- func (c *Widget) GetPropFunction(key string) func()
- func (c *Widget) GetPropInt(key string, defaultValue int) int
- func (c *Widget) GetPropString(key string, defaultValue string) string
- func (c *Widget) GetVAlign(key string, defaultValue VAlign) VAlign
- func (c *Widget) GridX() int
- func (c *Widget) GridY() int
- func (c *Widget) Height() int
- func (c *Widget) Id() string
- func (c *Widget) InitWidget()
- func (c *Widget) InnerHeight() int
- func (c *Widget) InnerWidth() int
- func (c *Widget) IsCanBeFocused() bool
- func (c *Widget) IsFocused() bool
- func (c *Widget) IsHovered() bool
- func (c *Widget) IsRolePrimary() bool
- func (c *Widget) IsRoleSecondary() bool
- func (c *Widget) IsRoleSurface() bool
- func (c *Widget) IsVisible() bool
- func (c *Widget) MaxHeight() int
- func (c *Widget) MaxWidth() int
- func (c *Widget) MinHeight() int
- func (c *Widget) MinWidth() int
- func (c *Widget) MouseCursor() nuimouse.MouseCursor
- func (c *Widget) Name() string
- func (c *Widget) NextGridColumn() int
- func (c *Widget) NextGridRow() int
- func (c *Widget) ParentWidget() Widgeter
- func (c *Widget) ParentWidgetId() string
- func (c *Widget) ProcessChar(char rune, mods nuikey.KeyModifiers) bool
- func (c *Widget) ProcessClosePopup()
- func (c *Widget) ProcessFocusLost()
- func (c *Widget) ProcessFocused()
- func (c *Widget) ProcessKeyDown(key nuikey.Key, mods nuikey.KeyModifiers) bool
- func (c *Widget) ProcessKeyUp(key nuikey.Key, mods nuikey.KeyModifiers) bool
- func (c *Widget) ProcessMouseDblClick(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers) bool
- func (c *Widget) ProcessMouseDown(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers) bool
- func (c *Widget) ProcessMouseEnter() bool
- func (c *Widget) ProcessMouseLeave() bool
- func (c *Widget) ProcessMouseMove(x int, y int, mods nuikey.KeyModifiers) bool
- func (c *Widget) ProcessMouseUp(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers, ...) bool
- func (c *Widget) ProcessMouseWheel(deltaX, deltaY int) bool
- func (c *Widget) ProcessPaint(cnv *Canvas)
- func (c *Widget) ProcessPropChange(key string, value interface{})
- func (c *Widget) ProcessTimer()
- func (c *Widget) RectClientAreaOnWindow() (x, y int)
- func (c *Widget) RemoveAllWidgets()
- func (c *Widget) RemoveWidget(w Widgeter)
- func (c *Widget) Role() string
- func (c *Widget) ScrollEnsureVisible(x1, y1 int)
- func (c *Widget) ScrollX() int
- func (c *Widget) ScrollY() int
- func (c *Widget) SetAbsolutePositioning(absolute bool)
- func (c *Widget) SetAllowScroll(allowX bool, allowY bool)
- func (c *Widget) SetAnchors(left, top, right, bottom bool)
- func (c *Widget) SetAutoFillBackground(autoFill bool)
- func (c *Widget) SetBackgroundColor(col color.Color)
- func (c *Widget) SetCanBeFocused(canBeFocused bool)
- func (c *Widget) SetCellPadding(padding int)
- func (c *Widget) SetContextMenu(menu *ContextMenu)
- func (c *Widget) SetElevation(elevation int)
- func (c *Widget) SetEnabled(enabled bool)
- func (c *Widget) SetForegroundColor(col color.Color)
- func (c *Widget) SetGridPosition(row, column int)
- func (c *Widget) SetInnerSize(width, height int)
- func (c *Widget) SetLayout(layoutAsXml string, eventProcessor interface{}, widgets map[string]Widgeter) error
- func (c *Widget) SetMaxHeight(maxHeight int)
- func (c *Widget) SetMaxSize(maxWidth, maxHeight int)
- func (c *Widget) SetMaxWidth(maxWidth int)
- func (c *Widget) SetMinHeight(minHeight int)
- func (c *Widget) SetMinSize(minWidth, minHeight int)
- func (c *Widget) SetMinWidth(minWidth int)
- func (c *Widget) SetMouseCursor(cursor nuimouse.MouseCursor)
- func (c *Widget) SetName(name string)
- func (c *Widget) SetOnChar(f func(char rune, mods nuikey.KeyModifiers) bool)
- func (c *Widget) SetOnClick(f func(button nuimouse.MouseButton, x int, y int) bool)
- func (c *Widget) SetOnFocusLost(onFocusLost func())
- func (c *Widget) SetOnFocused(onFocused func())
- func (c *Widget) SetOnKeyDown(f func(key nuikey.Key, mods nuikey.KeyModifiers) bool)
- func (c *Widget) SetOnKeyUp(f func(key nuikey.Key, mods nuikey.KeyModifiers) bool)
- func (c *Widget) SetOnMouseDblClick(...)
- func (c *Widget) SetOnMouseDown(...)
- func (c *Widget) SetOnMouseEnter(f func())
- func (c *Widget) SetOnMouseLeave(f func())
- func (c *Widget) SetOnMouseMove(f func(x int, y int, mods nuikey.KeyModifiers) bool)
- func (c *Widget) SetOnMouseUp(...)
- func (c *Widget) SetOnMouseWheel(f func(deltaX, deltaY int) bool)
- func (c *Widget) SetOnPaint(f func(cnv *Canvas))
- func (c *Widget) SetOnPostPaint(f func(cnv *Canvas))
- func (c *Widget) SetOnScrollChanged(f func(scrollX, scrollY int))
- func (c *Widget) SetPanelPadding(padding int)
- func (c *Widget) SetParentWidgetId(id string)
- func (c *Widget) SetPosition(x, y int)
- func (c *Widget) SetProp(key string, value any)
- func (c *Widget) SetPropFunction(key string, f func())
- func (c *Widget) SetRole(role string)
- func (c *Widget) SetSize(w, h int)
- func (c *Widget) SetTypeName(typeName string)
- func (c *Widget) SetVisible(visible bool)
- func (c *Widget) SetXExpandable(expandable bool)
- func (c *Widget) SetYExpandable(expandable bool)
- func (c *Widget) TypeName() string
- func (c *Widget) Widgets() []Widgeter
- func (c *Widget) Width() int
- func (c *Widget) X() int
- func (c *Widget) XExpandable() bool
- func (c *Widget) Y() int
- func (c *Widget) YExpandable() bool
- type Widgeter
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 ClipboardSetText ¶ added in v0.0.2
func ClipboardSetText(text string)
func CohenSutherland ¶
func ColorFromHex ¶ added in v0.0.15
func ColorToHex ¶ added in v0.0.16
func GetCharPositions ¶ added in v0.0.2
func GetThemeFloat ¶ added in v0.0.7
func GetThemeInt ¶ added in v0.0.7
func GetThemeString ¶
func MaximizeMainForm ¶ added in v0.0.16
func MaximizeMainForm()
func MeasureText ¶
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 NewTabWidgetButton ¶ added in v0.0.2
func NewTabWidgetButton(text string) *tabWidgetButton
func ShowAboutDialog ¶ added in v0.0.15
func ShowEnterStringDialog ¶ added in v0.0.12
func ShowMessageBox ¶ added in v0.0.12
func ShowQuestionMessageBox ¶ added in v0.0.14
func ThemeBackgroundColor ¶ added in v0.0.7
func ThemeBackgroundColorDarkTheme ¶ added in v0.0.16
func ThemeBackgroundColorLightTheme ¶ added in v0.0.16
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 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 (*Button) ProcessPropChange ¶ added in v0.0.15
func (*Button) SetOnButtonClick ¶ added in v0.0.2
func (c *Button) SetOnButtonClick(fn func())
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 (*Canvas) DrawRoundedRect ¶ added in v0.0.14
func (*Canvas) FillRoundedRect ¶ added in v0.0.14
func (*Canvas) MakeScriptLine ¶
func (c *Canvas) MakeScriptLine(x1, y1, x2, y2, width float64) *DrawScript
func (*Canvas) MakeScriptLineBresenham ¶
func (*Canvas) MakeScriptLineWu ¶
func (c *Canvas) MakeScriptLineWu(x1, y1, x2, y2 float64) *DrawScript
func (*Canvas) SetDirectTranslateAndClip ¶ added in v0.0.2
func (*Canvas) SetFontFamily ¶ added in v0.0.7
func (*Canvas) SetFontSize ¶ added in v0.0.7
func (*Canvas) SetUnderline ¶ added in v0.0.7
func (*Canvas) TranslateAndClip ¶ added in v0.0.2
func (*Canvas) TranslatedX ¶
func (*Canvas) TranslatedY ¶
type Checkbox ¶ added in v0.0.8
type Checkbox struct {
Widget
}
func NewCheckbox ¶ added in v0.0.8
func (*Checkbox) SetChecked ¶ added in v0.0.8
func (*Checkbox) SetOnStateChanged ¶ added in v0.0.8
func (c *Checkbox) SetOnStateChanged(fn func())
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) SelectedItemData ¶ added in v0.0.7
func (c *ComboBox) SelectedItemData() interface{}
func (*ComboBox) SelectedItemText ¶ added in v0.0.7
func (*ComboBox) SetSelectedIndex ¶ added in v0.0.7
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 (*Dialog) ClosePopup ¶ added in v0.0.7
func (c *Dialog) ClosePopup()
func (*Dialog) ContentPanel ¶ added in v0.0.7
func (*Dialog) SetAcceptButton ¶ added in v0.0.7
func (*Dialog) SetRejectButton ¶ added in v0.0.7
func (*Dialog) ShowDialog ¶ added in v0.0.7
func (c *Dialog) ShowDialog()
func (*Dialog) ShowDialogAtPos ¶ added in v0.0.7
type DrawScript ¶
func NewDrawScript ¶
func NewDrawScript() *DrawScript
func (*DrawScript) DrawToRGBA ¶
func (c *DrawScript) DrawToRGBA(img *image.RGBA, col color.Color)
type DrawScriptPoint ¶
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 EventTableCellMouseDblClick ¶ added in v0.0.19
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 (*Form) DrawWidgetDebugInfo ¶ added in v0.0.2
func (*Form) ExecMaximized ¶ added in v0.0.16
func (c *Form) ExecMaximized()
func (*Form) FocusedWidget ¶ added in v0.0.16
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) SetOnGlobalKeyDown ¶ added in v0.0.2
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 HAlign ¶
type HAlign int
const HAlignCenter HAlign = 1
const HAlignLeft HAlign = 0
const HAlignRight HAlign = 2
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) Scaling ¶ added in v0.0.8
func (c *ImageBox) Scaling() ImageBoxScale
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
////////////////////////////////////////////////////////////////////////////////// NewLabel creates a new Label widget with the specified text.
func (*Label) IsUnderline ¶ added in v0.0.14
IsUnderline returns whether the Label's text is underlined.
func (*Label) ProcessPropChange ¶ added in v0.0.15
/////////////////////////////////////////////////////////////////////////////// Props
func (*Label) SetTextAlign ¶ added in v0.0.12
SetTextAlign sets the horizontal alignment of the Label's text.
func (*Label) SetUnderline ¶ added in v0.0.14
SetUnderline sets whether the Label's text is underlined.
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 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
type Table ¶ added in v0.0.2
type Table struct {
Widget
// contains filtered or unexported fields
}
func (*Table) AddWidgetOnTable ¶ added in v0.0.7
func (*Table) CellBorderColor ¶ added in v0.0.14
func (*Table) CellBorderWidth ¶ added in v0.0.14
func (*Table) ColumnCount ¶ added in v0.0.15
func (*Table) ColumnName ¶ added in v0.0.15
func (*Table) ColumnWidth ¶ added in v0.0.15
func (*Table) CopySelectionToClipboard ¶ added in v0.0.13
func (c *Table) CopySelectionToClipboard()
func (*Table) CurrentColumn ¶ added in v0.0.2
func (*Table) CurrentRow ¶ added in v0.0.2
func (*Table) EditCurrentCell ¶ added in v0.0.7
func (*Table) GetCellData2 ¶ added in v0.0.12
func (*Table) ProcessKeyDown ¶ added in v0.0.8
func (*Table) ScrollToCell2 ¶ added in v0.0.12
func (*Table) SetCellBorderColor ¶ added in v0.0.14
func (*Table) SetCellBorderWidth ¶ added in v0.0.14
func (*Table) SetCellColor ¶ added in v0.0.12
func (*Table) SetCellData2 ¶ added in v0.0.12
func (*Table) SetCellDisplayText ¶ added in v0.0.16
func (*Table) SetCellEditTriggerDoubleClick ¶ added in v0.0.16
func (*Table) SetCellEditTriggerEnter ¶ added in v0.0.16
func (*Table) SetCellEditTriggerF2 ¶ added in v0.0.16
func (*Table) SetCellEditTriggerKeyDown ¶ added in v0.0.16
func (*Table) SetCellHAlign ¶ added in v0.0.13
func (*Table) SetCellImage ¶ added in v0.0.15
func (*Table) SetCellOnDraw ¶ added in v0.0.18
func (*Table) SetCellSelectionDisabled ¶ added in v0.0.16
func (*Table) SetCellText2 ¶ added in v0.0.12
func (*Table) SetCellVAlign ¶ added in v0.0.13
func (*Table) SetColumnCellName2 ¶ added in v0.0.12
func (*Table) SetColumnCount ¶ added in v0.0.2
func (*Table) SetColumnName ¶ added in v0.0.2
func (*Table) SetColumnWidth ¶ added in v0.0.2
func (*Table) SetCurrentCell2 ¶ added in v0.0.12
func (*Table) SetEditTriggerDoubleClick ¶ added in v0.0.8
func (*Table) SetEditTriggerEnter ¶ added in v0.0.8
func (*Table) SetEditTriggerF2 ¶ added in v0.0.8
func (*Table) SetEditTriggerKeyDown ¶ added in v0.0.8
func (*Table) SetHeaderCellSpan2 ¶ added in v0.0.12
func (*Table) SetHeaderRowCount ¶ added in v0.0.8
func (*Table) SetModeLoading ¶ added in v0.0.13
func (*Table) SetOnCellChanged ¶ added in v0.0.16
func (*Table) SetOnCellMouseDblClick ¶ added in v0.0.19
func (c *Table) SetOnCellMouseDblClick(callback func())
func (*Table) SetOnColumnClick ¶ added in v0.0.15
func (*Table) SetOnColumnResize ¶ added in v0.0.8
func (*Table) SetOnSelectionChanged ¶ added in v0.0.2
func (*Table) SetRowCount ¶ added in v0.0.2
func (*Table) SetRowHeight ¶ added in v0.0.16
func (*Table) SetSelectingCell ¶ added in v0.0.2
func (*Table) SetSelectingRow ¶ added in v0.0.2
func (*Table) SetShowSelection ¶ added in v0.0.2
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 (*TextBox) KeyChar ¶ added in v0.0.2
func (c *TextBox) KeyChar(ch rune, mods nuikey.KeyModifiers)
func (*TextBox) KeyUp ¶ added in v0.0.2
func (c *TextBox) KeyUp(key nuikey.Key, mods nuikey.KeyModifiers)
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 (*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 (*TextBox) SetEmptyText ¶ added in v0.0.2
func (*TextBox) SetIsPassword ¶ added in v0.0.2
func (*TextBox) SetMultiline ¶ added in v0.0.2
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) SetReadOnly ¶ added in v0.0.2
type TextBoxSelection ¶ added in v0.0.2
type VAlign ¶
type VAlign int
const VAlignBottom VAlign = 2
const VAlignCenter VAlign = 1
const VAlignTop VAlign = 0
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) AddWidgetOnGrid ¶ added in v0.0.2
func (*Widget) AppendPopupWidget ¶ added in v0.0.7
func (*Widget) BackgroundColor ¶ added in v0.0.7
func (*Widget) BackgroundColorForRole ¶ added in v0.0.16
func (*Widget) BackgroundColorWithAddElevation ¶ added in v0.0.14
func (*Widget) ClearLayoutCache ¶ added in v0.0.12
func (c *Widget) ClearLayoutCache()
func (*Widget) CloseAfterPopupWidget ¶ added in v0.0.7
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 (*Widget) FindWidgetByName ¶ added in v0.0.14
func (*Widget) FontFamily ¶ added in v0.0.2
func (*Widget) ForegroundColor ¶ added in v0.0.14
func (*Widget) GetPropColor ¶ added in v0.0.14
func (*Widget) GetPropFloat64 ¶ added in v0.0.14
func (*Widget) GetPropFunction ¶ added in v0.0.14
func (*Widget) GetPropString ¶
func (*Widget) InitWidget ¶ added in v0.0.2
func (c *Widget) InitWidget()
func (*Widget) InnerHeight ¶ added in v0.0.2
func (*Widget) InnerWidth ¶ added in v0.0.2
func (*Widget) IsCanBeFocused ¶ added in v0.0.7
func (*Widget) IsRolePrimary ¶ added in v0.0.14
func (*Widget) IsRoleSecondary ¶ added in v0.0.14
func (*Widget) IsRoleSurface ¶ added in v0.0.14
func (*Widget) MouseCursor ¶ added in v0.0.2
func (c *Widget) MouseCursor() nuimouse.MouseCursor
func (*Widget) NextGridColumn ¶ added in v0.0.12
func (*Widget) NextGridRow ¶ added in v0.0.12
func (*Widget) ParentWidget ¶ added in v0.0.7
func (*Widget) ParentWidgetId ¶ added in v0.0.7
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 (*Widget) ProcessKeyUp ¶ added in v0.0.2
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 (*Widget) ProcessMouseLeave ¶ added in v0.0.2
func (*Widget) ProcessMouseMove ¶ added in v0.0.2
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 (*Widget) ProcessPaint ¶ added in v0.0.2
func (*Widget) ProcessPropChange ¶ added in v0.0.15
func (*Widget) ProcessTimer ¶ added in v0.0.2
func (c *Widget) ProcessTimer()
func (*Widget) RectClientAreaOnWindow ¶ added in v0.0.7
func (*Widget) RemoveAllWidgets ¶ added in v0.0.2
func (c *Widget) RemoveAllWidgets()
func (*Widget) RemoveWidget ¶ added in v0.0.2
func (*Widget) ScrollEnsureVisible ¶ added in v0.0.2
func (*Widget) SetAbsolutePositioning ¶ added in v0.0.2
func (*Widget) SetAllowScroll ¶ added in v0.0.2
func (*Widget) SetAnchors ¶
func (*Widget) SetAutoFillBackground ¶ added in v0.0.12
func (*Widget) SetBackgroundColor ¶ added in v0.0.2
func (*Widget) SetCanBeFocused ¶ added in v0.0.7
func (*Widget) SetCellPadding ¶ added in v0.0.7
func (*Widget) SetContextMenu ¶ added in v0.0.7
func (c *Widget) SetContextMenu(menu *ContextMenu)
func (*Widget) SetElevation ¶ added in v0.0.14
func (*Widget) SetEnabled ¶ added in v0.0.12
func (*Widget) SetForegroundColor ¶ added in v0.0.10
func (*Widget) SetGridPosition ¶ added in v0.0.2
func (*Widget) SetInnerSize ¶ added in v0.0.2
func (*Widget) SetMaxHeight ¶ added in v0.0.2
func (*Widget) SetMaxSize ¶ added in v0.0.2
func (*Widget) SetMaxWidth ¶ added in v0.0.2
func (*Widget) SetMinHeight ¶ added in v0.0.2
func (*Widget) SetMinSize ¶ added in v0.0.2
func (*Widget) SetMinWidth ¶ added in v0.0.2
func (*Widget) SetMouseCursor ¶
func (c *Widget) SetMouseCursor(cursor nuimouse.MouseCursor)
func (*Widget) SetOnChar ¶ added in v0.0.2
func (c *Widget) SetOnChar(f func(char rune, mods nuikey.KeyModifiers) bool)
func (*Widget) SetOnClick ¶
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 (*Widget) SetOnKeyUp ¶
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 (*Widget) SetOnMouseUp ¶
func (c *Widget) SetOnMouseUp(f func(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers) bool)
func (*Widget) SetOnMouseWheel ¶
func (*Widget) SetOnPaint ¶
func (*Widget) SetOnPostPaint ¶ added in v0.0.7
func (*Widget) SetOnScrollChanged ¶ added in v0.0.7
func (*Widget) SetPanelPadding ¶ added in v0.0.2
func (*Widget) SetParentWidgetId ¶ added in v0.0.7
func (*Widget) SetPosition ¶
func (*Widget) SetPropFunction ¶ added in v0.0.14
func (*Widget) SetTypeName ¶ added in v0.0.2
func (*Widget) SetVisible ¶ added in v0.0.2
func (*Widget) SetXExpandable ¶ added in v0.0.2
func (*Widget) SetYExpandable ¶ added in v0.0.2
func (*Widget) XExpandable ¶ added in v0.0.2
func (*Widget) YExpandable ¶ added in v0.0.2
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
Source Files
¶
- about_dialog.go
- button.go
- button_image.go
- canvas.go
- checkbox.go
- clipboard.go
- combobox.go
- context_menu.go
- context_menu_item.go
- dialog.go
- drawscript.go
- enter_string_dialog.go
- form.go
- frame.go
- hspacer.go
- imagebox.go
- label.go
- messagebox.go
- panel.go
- progressbar.go
- question_messagebox.go
- radiobutton.go
- scrollarea.go
- space.go
- table.go
- table_header.go
- tabwidget.go
- tabwidget_button.go
- text_renderer.go
- textbox.go
- theme.go
- timer.go
- vspacer.go
- widget.go
- widgeter.go
Click to show internal directories.
Click to hide internal directories.