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 MakeLinesFromStringWithWordWrapping(text string, maxChars int) []string
- 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 NewTabWidgetButton(text string) *tabWidgetButton
- func PopEvent()
- func PrintAllWidgets()
- func PushEvent(p any)
- func SetAppIcon(img image.Image)
- func ShowMessageBox(parentWidget Widgeter, title string, text string)
- func ShowQuestionMessageBoxOKCancel(parentWidget Widgeter, title string, text string, onOK func(), onCancel func())
- func ShowQuestionMessageBoxYesNo(parentWidget Widgeter, title string, text string, onYes func(), onNo 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 ThemeForegroundColorDisabled() color.RGBA
- type Button
- type ButtonImage
- func (c *ButtonImage) Image() image.Image
- func (c *ButtonImage) ImageHAlign() HAlign
- func (c *ButtonImage) ImageVAlign() VAlign
- func (c *ButtonImage) Press()
- func (c *ButtonImage) ProcessPropChange(key string, value interface{})
- func (c *ButtonImage) SetImage(img image.Image)
- func (c *ButtonImage) SetImageHAlign(align HAlign)
- func (c *ButtonImage) SetImageVAlign(align VAlign)
- func (c *ButtonImage) SetOnButtonClick(fn func(btn *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) FillTriangle(x1, y1, x2, y2, x3, y3 int, colr color.Color)
- 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 Chart
- type ChartPoint
- 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 DialogContent
- type DialogOld
- func (c *DialogOld) Accept()
- func (c *DialogOld) Close()
- func (c *DialogOld) ClosePopup()
- func (c *DialogOld) ContentPanel() *Panel
- func (c *DialogOld) Reject()
- func (c *DialogOld) Resize(w, h int)
- func (c *DialogOld) SetAcceptButton(acceptButton *Button)
- func (c *DialogOld) SetRejectButton(rejectButton *Button)
- func (c *DialogOld) SetTitle(title string)
- func (c *DialogOld) ShowDialog()
- func (c *DialogOld) ShowDialogAtPos(x, y int)
- type Dialoger
- type DrawScript
- type DrawScriptHorLine
- type DrawScriptPoint
- type Event
- type EventCheckboxStateChanged
- type EventNumBoxValueChanged
- type EventTableCellMouseDblClick
- type EventTextboxKeyDown
- type Form
- func (c *Form) Close()
- func (c *Form) CloseTopPopup()
- func (c *Form) DrawWidgetDebugInfo(w Widgeter, cnv *Canvas)
- func (c *Form) Exec()
- func (c *Form) FocusedWidget() Widgeter
- func (c *Form) IsMaximized() bool
- func (c *Form) LayoutingBlockPop()
- func (c *Form) LayoutingBlockPush()
- func (c *Form) Maximize()
- func (c *Form) Move(x, y int)
- func (c *Form) MoveToCenterOfParent()
- func (c *Form) OpenPopup(w Widgeter)
- func (c *Form) Panel() *Panel
- func (c *Form) Position() (int, int)
- func (c *Form) SetAcceptButton(button *Button)
- func (c *Form) SetAllowMaximize(allow bool)
- func (c *Form) SetAllowMinimize(allow bool)
- func (c *Form) SetCancelButton(button *Button)
- func (c *Form) SetIcon(img image.Image)
- func (c *Form) SetMainWidget(w Widgeter)
- 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) Show()
- func (c *Form) ShowMaximized()
- func (c *Form) ShowModal(parent *Form)
- func (c *Form) Size() (int, int)
- func (c *Form) SystemHandle() any
- func (c *Form) TopPopupWidget() Widgeter
- func (c *Form) Update()
- func (c *Form) UpdateBlockPop()
- func (c *Form) UpdateBlockPush()
- func (c *Form) UpdateLayout()
- func (c *Form) WidgetById(id string) Widgeter
- 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 NumBox
- func (c *NumBox) Decimals() int
- func (c *NumBox) GetValue() float64
- func (c *NumBox) Max() float64
- func (c *NumBox) Min() float64
- func (c *NumBox) ProcessPropChange(key string, value interface{})
- func (c *NumBox) SetDecimals(decimals int)
- func (c *NumBox) SetMax(max float64)
- func (c *NumBox) SetMin(min float64)
- func (c *NumBox) SetOnChanged(f func())
- func (c *NumBox) SetOnValueChanged(f func())
- func (c *NumBox) SetStep(step float64)
- func (c *NumBox) SetText(text string)
- func (c *NumBox) SetValue(v float64)
- func (c *NumBox) Step() float64
- func (c *NumBox) Text() string
- func (c *NumBox) Value() float64
- 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) IsCellSelected(row int, col int) bool
- func (c *Table) IsRowSelected(row int) bool
- func (c *Table) Multiselect() bool
- func (c *Table) PreviousCurrentCellX() int
- func (c *Table) PreviousCurrentCellY() int
- 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) SelectAll()
- func (c *Table) SelectedCells() []TableCellPos
- func (c *Table) SelectedRows() []int
- func (c *Table) SelectingRows() bool
- 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) SetCellContraction(row int, col int, contraction bool)
- 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) SetColumnImage(col int, img image.Image, imgWidth 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) SetMultiselect(enabled bool)
- func (c *Table) SetOnCellChanged(callback func(row int, col int, text string, data interface{}) bool)
- func (c *Table) SetOnCellMouseDblClick(callback func())
- func (c *Table) SetOnCellMouseDown(...)
- 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) SetSelectingRows(selectingRows bool)
- func (c *Table) SetShowSelection(show bool)
- func (c *Table) ShowSelection() bool
- func (c *Table) TableSetLayoutXml(n *uiNode)
- type TableCellPos
- type TextBox
- func (c *TextBox) AcceptsReturn() bool
- func (c *TextBox) AssemblyText(lines []string) string
- func (c *TextBox) Draw(ctx *Canvas, width, height int)
- func (c *TextBox) Hint() string
- 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) MinHeight() int
- 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) Multiline() bool
- func (c *TextBox) OneLineHeight() int
- func (c *TextBox) ProcessPropChange(key string, value interface{})
- func (c *TextBox) ReadOnly() bool
- func (c *TextBox) ScrollToBegin()
- func (c *TextBox) SelectAllText()
- func (c *TextBox) SelectedText() string
- func (c *TextBox) SetHint(text string)
- func (c *TextBox) SetIsPassword(isPassword bool)
- func (c *TextBox) SetMultiline(multiline bool)
- 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 TimeChart
- func (c *TimeChart) AddArea() *TimeChartArea
- func (c *TimeChart) Areas() []*TimeChartArea
- func (c *TimeChart) ClearSelection()
- func (c *TimeChart) DefaultTimeRange() (from, to time.Time)
- func (c *TimeChart) IsDefaultView() bool
- func (c *TimeChart) ProcessMouseUp(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers, ...) bool
- func (c *TimeChart) RemoveAllAreas()
- func (c *TimeChart) ResetTimeRange()
- func (c *TimeChart) ResetZoom()
- func (c *TimeChart) Selection() (from, to time.Time, ok bool)
- func (c *TimeChart) SetDefaultTimeRange(from, to time.Time)
- func (c *TimeChart) SetOnSelectionChanged(f func())
- func (c *TimeChart) SetOnTimeRangeChanged(f func())
- func (c *TimeChart) SetSelection(from, to time.Time)
- func (c *TimeChart) SetTimeRange(from, to time.Time)
- func (c *TimeChart) TimeRange() (from, to time.Time)
- func (c *TimeChart) ZoomBack()
- func (c *TimeChart) ZoomDepth() int
- type TimeChartArea
- func (c *TimeChartArea) AddMarker(m TimeChartMarker)
- func (c *TimeChartArea) AddSeries(name string, source TimeChartDataSource) *TimeChartSeries
- func (c *TimeChartArea) ClearMarkers()
- func (c *TimeChartArea) Markers() []TimeChartMarker
- func (c *TimeChartArea) ResetYRange()
- func (c *TimeChartArea) Series() []*TimeChartSeries
- func (c *TimeChartArea) SetMarkers(markers []TimeChartMarker)
- func (c *TimeChartArea) SetYRange(yMin, yMax float64)
- func (c *TimeChartArea) YRange() (yMin, yMax float64, ok bool)
- type TimeChartDataSource
- type TimeChartMarker
- type TimeChartMemorySource
- type TimeChartPoint
- type TimeChartSeries
- type TimeChartSeriesType
- type VAlign
- type VSpacer
- type Widget
- func (c *Widget) AddButton(row int, col int, text string, onPush func()) *Button
- func (c *Widget) AddHSpacer(row int, col int) *HSpacer
- func (c *Widget) AddLabel(row int, col int, text string) *Label
- func (c *Widget) AddPanel(row int, col int) *Panel
- func (c *Widget) AddTimer(intervalMs int, callback func())
- func (c *Widget) AddVSpacer(row int, col int) *VSpacer
- func (c *Widget) AddWidget(gridRow int, gridColumn int, w Widgeter)
- func (c *Widget) AllChildren() []Widgeter
- 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) ClearFocus()
- func (c *Widget) ClearLayoutCache()
- func (c *Widget) CloseAfterPopupWidget(w Widgeter)
- func (c *Widget) CloseAllPopup()
- func (c *Widget) CloseByClickOutside() bool
- 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) ForegroundColorDisabled() color.Color
- func (c *Widget) Form() *Form
- 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) SetCloseByClickOutside(close bool)
- func (c *Widget) SetContextMenu(menu *ContextMenu)
- func (c *Widget) SetElevation(elevation int)
- func (c *Widget) SetEnabled(enabled bool)
- func (c *Widget) SetFontSize(fontSize float64)
- 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())
- 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) SetTooltip(text string)
- 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) ShowDialog(centralWidget Widgeter)
- func (c *Widget) Tooltip() string
- 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 ¶
const ContextMenuItemHeight = 32
const (
DefaultButtonMinWidth = 100
)
const DefaultComboBoxMinWidth = 150
DefaultComboBoxMinWidth keeps a bare ComboBox (no width ever set by the caller) from collapsing to an unusably thin trigger.
const DefaultFontSize = 17.0
const (
DefaultUiLineHeight = 30
)
const MAX_HEIGHT = 100000
const MAX_WIDTH = 100000
const MaxInt = int(^uint(0) >> 1)
const MaxUint = ^uint(0)
const MinInt = -MaxInt - 1
const MinUint = 0
Variables ¶
var IsDarkTheme = true
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 MakeLinesFromStringWithWordWrapping ¶ added in v0.0.22
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 PrintAllWidgets ¶ added in v0.0.49
func PrintAllWidgets()
func SetAppIcon ¶ added in v0.0.56
SetAppIcon sets the default icon for all windows of the application. Call it at startup, before showing any form - forms that are already shown keep their current icon. A nil image is ignored.
func ShowMessageBox ¶ added in v0.0.12
func ShowQuestionMessageBoxOKCancel ¶ added in v0.0.50
func ShowQuestionMessageBoxYesNo ¶ added in v0.0.49
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 ThemeForegroundColorDisabled ¶ added in v0.0.25
Types ¶
type Button ¶ added in v0.0.2
type Button struct {
Widget
// contains filtered or unexported fields
}
func (*Button) ProcessKeyDown ¶ added in v0.0.43
func (*Button) ProcessPropChange ¶ added in v0.0.15
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) ImageHAlign ¶ added in v0.0.49
func (c *ButtonImage) ImageHAlign() HAlign
ImageHAlign returns the horizontal alignment of the image within the button.
func (*ButtonImage) ImageVAlign ¶ added in v0.0.49
func (c *ButtonImage) ImageVAlign() VAlign
ImageVAlign returns the vertical alignment of the image within the button.
func (*ButtonImage) Press ¶ added in v0.0.12
func (c *ButtonImage) Press()
func (*ButtonImage) ProcessPropChange ¶ added in v0.0.49
func (c *ButtonImage) ProcessPropChange(key string, value interface{})
ProcessPropChange repaints when an alignment prop (or any other prop) changes.
func (*ButtonImage) SetImage ¶ added in v0.0.12
func (c *ButtonImage) SetImage(img image.Image)
func (*ButtonImage) SetImageHAlign ¶ added in v0.0.49
func (c *ButtonImage) SetImageHAlign(align HAlign)
SetImageHAlign sets the horizontal alignment of the image within the button.
func (*ButtonImage) SetImageVAlign ¶ added in v0.0.49
func (c *ButtonImage) SetImageVAlign(align VAlign)
SetImageVAlign sets the vertical alignment of the image within the button.
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) FillTriangle ¶ added in v0.0.49
FillTriangle fills the triangle with corners (x1,y1), (x2,y2), (x3,y3).
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 Chart ¶ added in v0.0.23
type Chart struct {
Widget
// contains filtered or unexported fields
}
func (*Chart) Data ¶ added in v0.0.23
func (c *Chart) Data() []ChartPoint
func (*Chart) SetData ¶ added in v0.0.23
func (c *Chart) SetData(points []ChartPoint)
type ChartPoint ¶ added in v0.0.23
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 DialogContent ¶ added in v0.0.49
func (*DialogContent) InitWidget ¶ added in v0.0.49
func (c *DialogContent) InitWidget()
type DialogOld ¶ added in v0.0.49
type DialogOld struct {
Widget
CloseEvent func()
OnAccept func()
OnReject func() bool
TryAccept func() bool
OnShow func()
// contains filtered or unexported fields
}
func NewDialogOld ¶ added in v0.0.49
func (*DialogOld) ClosePopup ¶ added in v0.0.49
func (c *DialogOld) ClosePopup()
func (*DialogOld) ContentPanel ¶ added in v0.0.49
func (*DialogOld) SetAcceptButton ¶ added in v0.0.49
func (*DialogOld) SetRejectButton ¶ added in v0.0.49
func (*DialogOld) ShowDialog ¶ added in v0.0.49
func (c *DialogOld) ShowDialog()
func (*DialogOld) ShowDialogAtPos ¶ added in v0.0.49
type Dialoger ¶ added in v0.0.49
type Dialoger interface {
// contains filtered or unexported methods
}
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 EventNumBoxValueChanged ¶ added in v0.0.24
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 {
OnClose func() bool
// contains filtered or unexported fields
}
func (*Form) CloseTopPopup ¶ added in v0.0.43
func (c *Form) CloseTopPopup()
func (*Form) DrawWidgetDebugInfo ¶ added in v0.0.2
func (*Form) FocusedWidget ¶ added in v0.0.16
func (*Form) IsMaximized ¶ added in v0.0.27
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) MoveToCenterOfParent ¶ added in v0.0.49
func (c *Form) MoveToCenterOfParent()
MoveToCenterOfParent re-centers the window over the form it was shown modally over (see ShowModal). Useful when a dialog only knows its real size once it's building itself (e.g. from OnDialogShow, after SetSize), i.e. too late for ShowModal's own initial centering to use it. Does nothing if the form was not shown via ShowModal.
func (*Form) SetAcceptButton ¶ added in v0.0.50
func (*Form) SetAllowMaximize ¶ added in v0.0.49
func (*Form) SetAllowMinimize ¶ added in v0.0.49
func (*Form) SetCancelButton ¶ added in v0.0.50
func (*Form) SetIcon ¶ added in v0.0.56
SetIcon overrides the application icon (see SetAppIcon) for this form. Can be called before or after the window is shown. A nil image is ignored.
func (*Form) SetMainWidget ¶ added in v0.0.22
func (*Form) SetOnGlobalKeyDown ¶ added in v0.0.2
func (*Form) ShowMaximized ¶ added in v0.0.49
func (c *Form) ShowMaximized()
func (*Form) SystemHandle ¶ added in v0.0.33
func (*Form) TopPopupWidget ¶ added in v0.0.43
func (*Form) UpdateBlockPop ¶ added in v0.0.11
func (c *Form) UpdateBlockPop()
func (*Form) UpdateBlockPush ¶ added in v0.0.11
func (c *Form) UpdateBlockPush()
func (*Form) UpdateLayout ¶ added in v0.0.49
func (c *Form) UpdateLayout()
func (*Form) WidgetById ¶ added in v0.0.49
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 NumBox ¶ added in v0.0.24
type NumBox struct {
Widget
// contains filtered or unexported fields
}
NumBox is a single-line numeric input for float64 with min/max clamp, fixed decimals formatting and spin buttons (up/down).
func (*NumBox) ProcessPropChange ¶ added in v0.0.24
func (*NumBox) SetDecimals ¶ added in v0.0.24
func (*NumBox) SetOnChanged ¶ added in v0.0.24
func (c *NumBox) SetOnChanged(f func())
SetOnChanged is an alias for SetOnValueChanged, kept for consistency with other controls.
func (*NumBox) SetOnValueChanged ¶ added in v0.0.24
func (c *NumBox) SetOnValueChanged(f func())
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
func (*TabWidget) SetLayoutXml ¶ added in v0.0.25
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) IsCellSelected ¶ added in v0.0.54
IsCellSelected reports whether the given cell is selected. Only meaningful when SelectingRows() is false.
func (*Table) IsRowSelected ¶ added in v0.0.54
IsRowSelected reports whether the given row is selected. Only meaningful when SelectingRows() is true.
func (*Table) Multiselect ¶ added in v0.0.54
func (*Table) PreviousCurrentCellX ¶ added in v0.0.46
func (*Table) PreviousCurrentCellY ¶ added in v0.0.46
func (*Table) ProcessKeyDown ¶ added in v0.0.8
func (*Table) ScrollToCell2 ¶ added in v0.0.12
func (*Table) SelectAll ¶ added in v0.0.54
func (c *Table) SelectAll()
SelectAll selects every row (in row-selection mode) or every cell (in cell-selection mode). No-op unless multiselect is enabled.
func (*Table) SelectedCells ¶ added in v0.0.54
func (c *Table) SelectedCells() []TableCellPos
SelectedCells returns the sorted list of currently selected cells. Meaningful when SelectingRows() is false.
func (*Table) SelectedRows ¶ added in v0.0.54
SelectedRows returns the sorted list of currently selected row indices. Meaningful when SelectingRows() is true.
func (*Table) SelectingRows ¶ added in v0.0.54
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) SetCellContraction ¶ added in v0.0.36
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) SetColumnImage ¶ added in v0.0.33
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) SetMultiselect ¶ added in v0.0.54
SetMultiselect enables or disables selecting more than one row/cell at a time (drag, Shift+click, Ctrl+click, Ctrl+A). Disabling it collapses any existing multi-selection down to the current cell/row.
func (*Table) SetOnCellChanged ¶ added in v0.0.16
func (*Table) SetOnCellMouseDblClick ¶ added in v0.0.19
func (c *Table) SetOnCellMouseDblClick(callback func())
func (*Table) SetOnCellMouseDown ¶ added in v0.0.33
func (c *Table) SetOnCellMouseDown(callback func(button nuimouse.MouseButton, row int, col int, x int, y int, mods nuikey.KeyModifiers))
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) SetSelectingRows ¶ added in v0.0.54
SetSelectingRows chooses the selection unit: true selects whole rows, false selects individual cells.
func (*Table) SetShowSelection ¶ added in v0.0.2
func (*Table) ShowSelection ¶ added in v0.0.54
func (*Table) TableSetLayoutXml ¶ added in v0.0.25
func (c *Table) TableSetLayoutXml(n *uiNode)
type TableCellPos ¶ added in v0.0.54
TableCellPos identifies a single cell by row and column index.
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) AcceptsReturn ¶ added in v0.0.22
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) ProcessPropChange ¶ added in v0.0.22
/////////////////////////////////////////////////////////////////////////////// Props
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) 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 TimeChart ¶ added in v0.0.57
type TimeChart struct {
Widget
// contains filtered or unexported fields
}
TimeChart draws time series in one or more stacked areas.
Mouse: left drag pans horizontally, right drag to the right zooms into the dragged time range, Ctrl + right drag to the right zooms into the dragged rectangle (time and the Y range of that area). Zooms stack: each one saves the current view and right drag to the left (with or without Ctrl) goes back one level, or to the default view when there is nothing to go back to (see ZoomBack, SetDefaultTimeRange and ResetZoom). A double click also goes back one level, Esc resets the zoom and clears the stack. Shift + left drag selects a range; dragging its header moves it, dragging its edges resizes it and the close button in the header clears it. The wheel zooms time around the pointer.
func NewTimeChart ¶ added in v0.0.57
func NewTimeChart() *TimeChart
func (*TimeChart) AddArea ¶ added in v0.0.57
func (c *TimeChart) AddArea() *TimeChartArea
func (*TimeChart) Areas ¶ added in v0.0.57
func (c *TimeChart) Areas() []*TimeChartArea
func (*TimeChart) ClearSelection ¶ added in v0.0.57
func (c *TimeChart) ClearSelection()
func (*TimeChart) DefaultTimeRange ¶ added in v0.0.57
func (*TimeChart) IsDefaultView ¶ added in v0.0.57
IsDefaultView reports whether the chart shows the default range and follows SetDefaultTimeRange.
func (*TimeChart) ProcessMouseUp ¶ added in v0.0.57
func (c *TimeChart) ProcessMouseUp(button nuimouse.MouseButton, x int, y int, mods nuikey.KeyModifiers, onlyForWidgetId string) bool
ProcessMouseUp is overridden because the form routes onMouseUp only to the widget pressed with the left button; a right-button zoom must end here too. Every widget receives ProcessMouseUp, so the release is seen even when it happens outside the chart.
func (*TimeChart) RemoveAllAreas ¶ added in v0.0.57
func (c *TimeChart) RemoveAllAreas()
func (*TimeChart) ResetTimeRange ¶ added in v0.0.57
func (c *TimeChart) ResetTimeRange()
ResetTimeRange switches to the default view.
func (*TimeChart) ResetZoom ¶ added in v0.0.57
func (c *TimeChart) ResetZoom()
ResetZoom returns to the default time range, auto-scales Y in every area and clears the zoom stack.
func (*TimeChart) SetDefaultTimeRange ¶ added in v0.0.57
SetDefaultTimeRange sets the default range. The application owns it and may call this as often as it likes (for example on every new sample of a live feed): while the chart is in the default view the new range is shown at once; after the user has panned or zoomed it is only remembered, and returning to the default view (ResetZoom, ResetTimeRange or zooming all the way back) shows the default range as it is at that moment.
func (*TimeChart) SetOnSelectionChanged ¶ added in v0.0.57
func (c *TimeChart) SetOnSelectionChanged(f func())
func (*TimeChart) SetOnTimeRangeChanged ¶ added in v0.0.57
func (c *TimeChart) SetOnTimeRangeChanged(f func())
func (*TimeChart) SetSelection ¶ added in v0.0.57
func (*TimeChart) SetTimeRange ¶ added in v0.0.57
SetTimeRange shows the given range. The chart leaves the default view until ResetTimeRange, ResetZoom or zooming back to a level that was the default view.
type TimeChartArea ¶ added in v0.0.57
type TimeChartArea struct {
// contains filtered or unexported fields
}
TimeChartArea is one horizontal band of the chart with its own Y axis. All areas share the time axis.
func (*TimeChartArea) AddMarker ¶ added in v0.0.57
func (c *TimeChartArea) AddMarker(m TimeChartMarker)
AddMarker adds a marker to the area. Markers may be added in any order.
func (*TimeChartArea) AddSeries ¶ added in v0.0.57
func (c *TimeChartArea) AddSeries(name string, source TimeChartDataSource) *TimeChartSeries
func (*TimeChartArea) ClearMarkers ¶ added in v0.0.57
func (c *TimeChartArea) ClearMarkers()
func (*TimeChartArea) Markers ¶ added in v0.0.57
func (c *TimeChartArea) Markers() []TimeChartMarker
func (*TimeChartArea) ResetYRange ¶ added in v0.0.57
func (c *TimeChartArea) ResetYRange()
ResetYRange returns the area to auto-scaling over the visible data.
func (*TimeChartArea) Series ¶ added in v0.0.57
func (c *TimeChartArea) Series() []*TimeChartSeries
func (*TimeChartArea) SetMarkers ¶ added in v0.0.57
func (c *TimeChartArea) SetMarkers(markers []TimeChartMarker)
SetMarkers replaces all markers of the area.
func (*TimeChartArea) SetYRange ¶ added in v0.0.57
func (c *TimeChartArea) SetYRange(yMin, yMax float64)
func (*TimeChartArea) YRange ¶ added in v0.0.57
func (c *TimeChartArea) YRange() (yMin, yMax float64, ok bool)
YRange returns the manual Y range; ok is false while the area auto-scales.
type TimeChartDataSource ¶ added in v0.0.57
type TimeChartDataSource interface {
GetData(from, to time.Time, groupDuration time.Duration) []TimeChartPoint
}
TimeChartDataSource supplies the points of a series.
GetData is called on every paint for the visible range [from, to]. groupDuration is the time covered by one screen pixel: the source should aggregate its data into buckets of that size (see TimeChartDownsample) so that no more than about one point per pixel is returned. Points must be sorted by DT. Returning the nearest point on each side outside the range lets the line continue to the edges of the plot.
A source that loads data asynchronously should return what it has now and call Form().Update() on the chart when more data arrives.
type TimeChartMarker ¶ added in v0.0.57
TimeChartMarker is a text note pinned to a point of an area: DT on the time axis and Value on the area's Y axis (for example the top of a peak). A nil Color uses the theme's marker color.
type TimeChartMemorySource ¶ added in v0.0.57
type TimeChartMemorySource struct {
// contains filtered or unexported fields
}
TimeChartMemorySource is a TimeChartDataSource over an in-memory slice of points sorted by DT. It is safe to add points from another goroutine.
func NewTimeChartMemorySource ¶ added in v0.0.57
func NewTimeChartMemorySource() *TimeChartMemorySource
func (*TimeChartMemorySource) AddPoint ¶ added in v0.0.57
func (c *TimeChartMemorySource) AddPoint(p TimeChartPoint)
AddPoint appends a point. Its DT must not be earlier than the last one.
func (*TimeChartMemorySource) GetData ¶ added in v0.0.57
func (c *TimeChartMemorySource) GetData(from, to time.Time, groupDuration time.Duration) []TimeChartPoint
func (*TimeChartMemorySource) SetPoints ¶ added in v0.0.57
func (c *TimeChartMemorySource) SetPoints(points []TimeChartPoint)
SetPoints replaces the data. The points must be sorted by DT.
type TimeChartPoint ¶ added in v0.0.57
type TimeChartPoint struct {
DT time.Time
First float64
Last float64
High float64
Low float64
HasGood bool
HasBad bool
}
TimeChartPoint is one sample (or one aggregated bucket) of a time series. For a raw sample all four values are equal. For a downsampled bucket First/Last are the first and last values in the bucket and High/Low are its extremes, so a signal that jitters inside a bucket is still drawn as a vertical band instead of collapsing into a flat average. The same shape is an OHLC bar, so trading charts use it directly.
HasGood and HasBad describe data quality: HasBad means the point (or some sample in the bucket) is bad - e.g. the sensor was disconnected - and HasGood means at least one sample carries a valid value. First/Last/High/ Low only describe the good samples. A point without HasGood has no value: the line breaks there. Bad spans are drawn as a light hatch in the series color. A point with neither flag is a gap - no data at all, e.g. the acquisition was stopped: the line breaks without the hatch.
func NewTimeChartBad ¶ added in v0.0.57
func NewTimeChartBad(dt time.Time) TimeChartPoint
NewTimeChartBad returns a point with no value, marking bad quality at dt.
func NewTimeChartGap ¶ added in v0.0.58
func NewTimeChartGap(dt time.Time) TimeChartPoint
NewTimeChartGap returns a point that breaks the line at dt without marking bad quality - e.g. where data acquisition was stopped or started.
func NewTimeChartValue ¶ added in v0.0.57
func NewTimeChartValue(dt time.Time, value float64) TimeChartPoint
func TimeChartDownsample ¶ added in v0.0.57
func TimeChartDownsample(points []TimeChartPoint, from, to time.Time, groupDuration time.Duration) []TimeChartPoint
TimeChartDownsample returns the points of the sorted slice that fall into [from, to], plus the nearest point on each side, merged into buckets of groupDuration: First/Last of a bucket come from its first and last good point, High/Low are the extremes of the good points, HasGood is set when the bucket has any good point and HasBad when it has any bad one - so a short outage stays visible however far the chart is zoomed out. Gap points (neither flag) are never merged: each one is kept as a separate point and closes the current bucket, so a break stays visible at any zoom. Buckets are aligned to multiples of groupDuration since the Unix epoch, so panning does not change how points are grouped. It is the same aggregation a server should do before sending data to the chart.
func (TimeChartPoint) HasValue ¶ added in v0.0.57
func (p TimeChartPoint) HasValue() bool
HasValue reports whether First/Last/High/Low are meaningful.
func (TimeChartPoint) IsGap ¶ added in v0.0.58
func (p TimeChartPoint) IsGap() bool
IsGap reports whether the point marks a break in the data.
type TimeChartSeries ¶ added in v0.0.57
type TimeChartSeries struct {
// contains filtered or unexported fields
}
func (*TimeChartSeries) Name ¶ added in v0.0.57
func (c *TimeChartSeries) Name() string
func (*TimeChartSeries) SetColor ¶ added in v0.0.57
func (c *TimeChartSeries) SetColor(col color.Color)
SetColor fixes the series color regardless of the theme.
func (*TimeChartSeries) SetPaletteColor ¶ added in v0.0.57
func (c *TimeChartSeries) SetPaletteColor(index int)
SetPaletteColor uses color number index of the chart palette, which has a dark and a light variant, so the series stays readable in both themes.
func (*TimeChartSeries) SetType ¶ added in v0.0.57
func (c *TimeChartSeries) SetType(seriesType TimeChartSeriesType)
func (*TimeChartSeries) Source ¶ added in v0.0.57
func (c *TimeChartSeries) Source() TimeChartDataSource
type TimeChartSeriesType ¶ added in v0.0.57
type TimeChartSeriesType int
const ( TimeChartSeriesLine TimeChartSeriesType = iota TimeChartSeriesCandles )
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) AllChildren ¶ added in v0.0.26
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) ClearFocus ¶ added in v0.0.43
func (c *Widget) ClearFocus()
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) CloseByClickOutside ¶ added in v0.0.22
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) ForegroundColorDisabled ¶ added in v0.0.25
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) SetCloseByClickOutside ¶ added in v0.0.22
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) SetFontSize ¶ added in v0.0.30
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 (c *Widget) SetOnClick(f func())
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) SetTooltip ¶ added in v0.0.57
SetTooltip sets the text shown when the mouse rests on the widget. An empty string disables the tooltip.
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) ShowDialog ¶ added in v0.0.49
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
Form() *Form
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
SetCloseByClickOutside(close bool)
CloseByClickOutside() bool
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)
Focus()
ClearFocus()
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
AddWidget(gridX, gridY int, widget Widgeter)
RemoveWidget(widget Widgeter)
AllChildren() []Widgeter
IsCanBeFocused() bool
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
}
Source Files
¶
- button.go
- button_image.go
- canvas.go
- chart.go
- checkbox.go
- clipboard.go
- combobox.go
- context_menu.go
- context_menu_item.go
- dialog.go
- dialog_old.go
- drawscript.go
- form.go
- frame.go
- hspacer.go
- imagebox.go
- label.go
- messagebox.go
- numbox.go
- panel.go
- progressbar.go
- radiobutton.go
- scrollarea.go
- space.go
- table.go
- tabwidget.go
- tabwidget_button.go
- text_renderer.go
- text_utils.go
- textbox.go
- theme.go
- timechart.go
- timechart_marker.go
- timechart_source.go
- timechart_theme.go
- timer.go
- tooltip.go
- vspacer.go
- widget.go
- widget_add_widgets.go
- widgeter.go