ui

package
v0.0.58 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 25 Imported by: 6

Documentation

Index

Constants

View Source
const ContextMenuItemHeight = 32
View Source
const (
	DefaultButtonMinWidth = 100
)
View Source
const DefaultComboBoxMinWidth = 150

DefaultComboBoxMinWidth keeps a bare ComboBox (no width ever set by the caller) from collapsing to an unusably thin trigger.

View Source
const DefaultFontSize = 17.0
View Source
const (
	DefaultUiLineHeight = 30
)
View Source
const MAX_HEIGHT = 100000
View Source
const MAX_WIDTH = 100000
View Source
const MaxInt = int(^uint(0) >> 1)
View Source
const MaxUint = ^uint(0)
View Source
const MinInt = -MaxInt - 1
View Source
const MinUint = 0

Variables

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

Functions

func ApplyBaseFontSize added in v0.0.16

func ApplyBaseFontSize(fontSize float64)

func ApplyDarkTheme added in v0.0.16

func ApplyDarkTheme()

func ApplyLightTheme added in v0.0.16

func ApplyLightTheme()

func ClipboardGetText added in v0.0.2

func ClipboardGetText() (string, error)

func ClipboardSetText added in v0.0.2

func ClipboardSetText(text string)

func CohenSutherland

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

func ColorFromHex added in v0.0.15

func ColorFromHex(hexStr string) color.RGBA

func ColorToHex added in v0.0.16

func ColorToHex(col color.Color) string

func DrawText added in v0.0.2

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

func GetCharPositions added in v0.0.2

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

func GetThemeColor

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

func GetThemeFloat added in v0.0.7

func GetThemeFloat(name string, defaultValue float64) float64

func GetThemeInt added in v0.0.7

func GetThemeInt(name string, defaultValue int) int

func GetThemeString

func GetThemeString(name string, defaultValue string) string

func MakeLinesFromStringWithWordWrapping added in v0.0.22

func MakeLinesFromStringWithWordWrapping(text string, maxChars int) []string

func MeasureText

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

func MouseCursorFromString added in v0.0.14

func MouseCursorFromString(s string) nuimouse.MouseCursor

func MouseCursorToString added in v0.0.14

func MouseCursorToString(c nuimouse.MouseCursor) string

func NewComboBoxPopup added in v0.0.7

func NewComboBoxPopup() *comboBoxPopup

func NewDialogHeader added in v0.0.7

func NewDialogHeader() *dialogHeader

func NewTabWidgetButton added in v0.0.2

func NewTabWidgetButton(text string) *tabWidgetButton

func PopEvent added in v0.0.14

func PopEvent()

func PrintAllWidgets added in v0.0.49

func PrintAllWidgets()

func PushEvent added in v0.0.14

func PushEvent(p any)

func SetAppIcon added in v0.0.56

func SetAppIcon(img image.Image)

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 ShowMessageBox(parentWidget Widgeter, title string, text string)

func ShowQuestionMessageBoxOKCancel added in v0.0.50

func ShowQuestionMessageBoxOKCancel(parentWidget Widgeter, title string, text string, onOK func(), onCancel func())

func ShowQuestionMessageBoxYesNo added in v0.0.49

func ShowQuestionMessageBoxYesNo(parentWidget Widgeter, title string, text string, onYes func(), onNo func())

func ThemeBackgroundColor added in v0.0.7

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

func ThemeBackgroundColorDarkTheme added in v0.0.16

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

func ThemeBackgroundColorLightTheme added in v0.0.16

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

func ThemeFontFamily added in v0.0.7

func ThemeFontFamily() string

func ThemeFontSize added in v0.0.7

func ThemeFontSize() float64

func ThemeForegroundColor added in v0.0.7

func ThemeForegroundColor(role string) color.RGBA

func ThemeForegroundColorDisabled added in v0.0.25

func ThemeForegroundColorDisabled() color.RGBA

Types

type Button added in v0.0.2

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

func NewButton

func NewButton(text string) *Button

func (*Button) ProcessKeyDown added in v0.0.43

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

func (*Button) ProcessPropChange added in v0.0.15

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

func (*Button) Push added in v0.0.50

func (c *Button) Push()

Push simulates a click on the button, triggering the "onclick" handler programmatically (used e.g. by Form's accept/cancel buttons on Enter/Esc).

func (*Button) SetText added in v0.0.2

func (c *Button) SetText(text string)

func (*Button) Text added in v0.0.2

func (c *Button) Text() string

type ButtonImage added in v0.0.12

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

func NewButtonImage added in v0.0.12

func NewButtonImage(img image.Image) *ButtonImage

func (*ButtonImage) Image added in v0.0.12

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

func (*ButtonImage) 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 NewCanvas

func NewCanvas(rgba *image.RGBA) *Canvas

func (*Canvas) ClipH added in v0.0.17

func (c *Canvas) ClipH() int

func (*Canvas) ClipW added in v0.0.17

func (c *Canvas) ClipW() int

func (*Canvas) ClipX added in v0.0.17

func (c *Canvas) ClipX() int

func (*Canvas) ClipY added in v0.0.17

func (c *Canvas) ClipY() int

func (*Canvas) DrawImage added in v0.0.8

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

func (*Canvas) DrawLine

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

func (*Canvas) DrawRect added in v0.0.7

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

func (*Canvas) DrawRoundedRect added in v0.0.14

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

func (*Canvas) DrawText

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

func (*Canvas) FillRect

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

func (*Canvas) FillRoundedRect added in v0.0.14

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

func (*Canvas) FillTriangle added in v0.0.49

func (c *Canvas) FillTriangle(x1, y1, x2, y2, x3, y3 int, colr color.Color)

FillTriangle fills the triangle with corners (x1,y1), (x2,y2), (x3,y3).

func (*Canvas) Height added in v0.0.16

func (c *Canvas) Height() int

func (*Canvas) MakeScriptLine

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

func (*Canvas) MakeScriptLineBresenham

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

func (*Canvas) MakeScriptLineWu

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

func (*Canvas) MixPixel

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

func (*Canvas) RGBA added in v0.0.2

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

func (*Canvas) Restore

func (c *Canvas) Restore()

func (*Canvas) Save

func (c *Canvas) Save()

func (*Canvas) SetColor

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

func (*Canvas) SetDirectTranslateAndClip added in v0.0.2

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

func (*Canvas) SetFontFamily added in v0.0.7

func (c *Canvas) SetFontFamily(fontFamily string)

func (*Canvas) SetFontSize added in v0.0.7

func (c *Canvas) SetFontSize(fontSize float64)

func (*Canvas) SetHAlign added in v0.0.7

func (c *Canvas) SetHAlign(hAlign HAlign)

func (*Canvas) SetPixel

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

func (*Canvas) SetUnderline added in v0.0.7

func (c *Canvas) SetUnderline(underline bool)

func (*Canvas) SetVAlign added in v0.0.7

func (c *Canvas) SetVAlign(vAlign VAlign)

func (*Canvas) TranslateAndClip added in v0.0.2

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

func (*Canvas) TranslatedX

func (c *Canvas) TranslatedX() int

func (*Canvas) TranslatedY

func (c *Canvas) TranslatedY() int

func (*Canvas) Width added in v0.0.16

func (c *Canvas) Width() int

type Chart added in v0.0.23

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

func NewChart added in v0.0.23

func NewChart() *Chart

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 ChartPoint struct {
	X float64
	Y float64
}

type Checkbox added in v0.0.8

type Checkbox struct {
	Widget
}

func NewCheckbox added in v0.0.8

func NewCheckbox(text string) *Checkbox

func (*Checkbox) Checked added in v0.0.8

func (c *Checkbox) Checked() bool

func (*Checkbox) SetChecked added in v0.0.8

func (c *Checkbox) SetChecked(checked bool)

func (*Checkbox) SetOnStateChanged added in v0.0.8

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

func (*Checkbox) SetText added in v0.0.8

func (c *Checkbox) SetText(text string)

func (*Checkbox) Text added in v0.0.8

func (c *Checkbox) Text() string

type ComboBox added in v0.0.7

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

func NewComboBox added in v0.0.7

func NewComboBox() *ComboBox

func (*ComboBox) AddItem added in v0.0.7

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

func (*ComboBox) OpenPopup added in v0.0.7

func (c *ComboBox) OpenPopup()

func (*ComboBox) SelectedItemData added in v0.0.7

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

func (*ComboBox) SelectedItemText added in v0.0.7

func (c *ComboBox) SelectedItemText() string

func (*ComboBox) SetSelectedIndex added in v0.0.7

func (c *ComboBox) SetSelectedIndex(index int)

type ComboBoxItem added in v0.0.7

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

type ContainerGridColumnInfo added in v0.0.2

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

type ContainerGridRowInfo added in v0.0.2

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

type ContextMenu added in v0.0.7

type ContextMenu struct {
	Widget

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

func NewContextMenu added in v0.0.7

func NewContextMenu(parent Widgeter) *ContextMenu

func (*ContextMenu) AddItem added in v0.0.7

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

func (*ContextMenu) AddItemWithSubmenu added in v0.0.7

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

func (*ContextMenu) ClosePopup added in v0.0.7

func (c *ContextMenu) ClosePopup()

func (*ContextMenu) OnInit added in v0.0.7

func (c *ContextMenu) OnInit()

func (*ContextMenu) RemoveAllItems added in v0.0.7

func (c *ContextMenu) RemoveAllItems()

func (*ContextMenu) ShowMenu added in v0.0.7

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

type ContextMenuItem added in v0.0.7

type ContextMenuItem struct {
	Widget

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

func NewContextMenuItem added in v0.0.7

func NewContextMenuItem() *ContextMenuItem

func (*ContextMenuItem) ControlType added in v0.0.7

func (c *ContextMenuItem) ControlType() string

func (*ContextMenuItem) Draw added in v0.0.7

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

func (*ContextMenuItem) MouseEnter added in v0.0.7

func (c *ContextMenuItem) MouseEnter()

func (*ContextMenuItem) MouseLeave added in v0.0.7

func (c *ContextMenuItem) MouseLeave()

func (*ContextMenuItem) MouseMove added in v0.0.7

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

func (*ContextMenuItem) SetInnerMenu added in v0.0.7

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

func (*ContextMenuItem) SetText added in v0.0.7

func (c *ContextMenuItem) SetText(text string)

type DialogContent added in v0.0.49

type DialogContent struct {
	Widget

	OnDialogShow   func()
	OnDialogReject func() bool
}

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 NewDialogOld(title string, width, height int) *DialogOld

func (*DialogOld) Accept added in v0.0.49

func (c *DialogOld) Accept()

func (*DialogOld) Close added in v0.0.49

func (c *DialogOld) Close()

func (*DialogOld) ClosePopup added in v0.0.49

func (c *DialogOld) ClosePopup()

func (*DialogOld) ContentPanel added in v0.0.49

func (c *DialogOld) ContentPanel() *Panel

func (*DialogOld) Reject added in v0.0.49

func (c *DialogOld) Reject()

func (*DialogOld) Resize added in v0.0.49

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

func (*DialogOld) SetAcceptButton added in v0.0.49

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

func (*DialogOld) SetRejectButton added in v0.0.49

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

func (*DialogOld) SetTitle added in v0.0.49

func (c *DialogOld) SetTitle(title string)

func (*DialogOld) ShowDialog added in v0.0.49

func (c *DialogOld) ShowDialog()

func (*DialogOld) ShowDialogAtPos added in v0.0.49

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

type Dialoger added in v0.0.49

type Dialoger interface {
	// contains filtered or unexported methods
}

type DrawScript

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

func NewDrawScript

func NewDrawScript() *DrawScript

func (*DrawScript) DrawToRGBA

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

func (*DrawScript) MixPixel

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

type DrawScriptHorLine

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

type DrawScriptPoint

type DrawScriptPoint struct {
	X int
	Y int
	C float64
}

type Event added in v0.0.14

type Event struct {
	Parameter any
}

func CurrentEvent added in v0.0.14

func CurrentEvent() *Event

type EventCheckboxStateChanged added in v0.0.14

type EventCheckboxStateChanged struct {
	Checkbox *Checkbox
	Checked  bool
}

type EventNumBoxValueChanged added in v0.0.24

type EventNumBoxValueChanged struct {
	NumBox *NumBox
	Value  float64
}

type EventTableCellMouseDblClick added in v0.0.19

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

type EventTextboxKeyDown added in v0.0.14

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

type Form

type Form struct {
	OnClose func() bool
	// contains filtered or unexported fields
}

func NewForm

func NewForm() *Form

func (*Form) Close added in v0.0.2

func (c *Form) Close()

func (*Form) CloseTopPopup added in v0.0.43

func (c *Form) CloseTopPopup()

func (*Form) DrawWidgetDebugInfo added in v0.0.2

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

func (*Form) Exec

func (c *Form) Exec()

func (*Form) FocusedWidget added in v0.0.16

func (c *Form) FocusedWidget() Widgeter

func (*Form) IsMaximized added in v0.0.27

func (c *Form) IsMaximized() bool

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) Maximize added in v0.0.49

func (c *Form) Maximize()

func (*Form) Move added in v0.0.27

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

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) OpenPopup added in v0.0.43

func (c *Form) OpenPopup(w Widgeter)

func (*Form) Panel

func (c *Form) Panel() *Panel

func (*Form) Position added in v0.0.27

func (c *Form) Position() (int, int)

func (*Form) SetAcceptButton added in v0.0.50

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

func (*Form) SetAllowMaximize added in v0.0.49

func (c *Form) SetAllowMaximize(allow bool)

func (*Form) SetAllowMinimize added in v0.0.49

func (c *Form) SetAllowMinimize(allow bool)

func (*Form) SetCancelButton added in v0.0.50

func (c *Form) SetCancelButton(button *Button)

func (*Form) SetIcon added in v0.0.56

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

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 (c *Form) SetMainWidget(w Widgeter)

func (*Form) SetOnGlobalKeyDown added in v0.0.2

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

func (*Form) SetSize

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

func (*Form) SetTitle

func (c *Form) SetTitle(title string)

func (*Form) Show added in v0.0.49

func (c *Form) Show()

func (*Form) ShowMaximized added in v0.0.49

func (c *Form) ShowMaximized()

func (*Form) ShowModal added in v0.0.49

func (c *Form) ShowModal(parent *Form)

func (*Form) Size added in v0.0.27

func (c *Form) Size() (int, int)

func (*Form) SystemHandle added in v0.0.33

func (c *Form) SystemHandle() any

func (*Form) TopPopupWidget added in v0.0.43

func (c *Form) TopPopupWidget() Widgeter

func (*Form) Update

func (c *Form) Update()

func (*Form) UpdateBlockPop added in v0.0.11

func (c *Form) UpdateBlockPop()

func (*Form) UpdateBlockPush added in v0.0.11

func (c *Form) UpdateBlockPush()

func (*Form) UpdateLayout added in v0.0.49

func (c *Form) UpdateLayout()

func (*Form) WidgetById added in v0.0.49

func (c *Form) WidgetById(id string) Widgeter

type Frame added in v0.0.14

type Frame struct {
	Widget
}

func NewFrame added in v0.0.14

func NewFrame() *Frame

type HAlign

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

func (*HAlign) String added in v0.0.14

func (c *HAlign) String() string

type HSpacer added in v0.0.2

type HSpacer struct {
	Widget
}

func NewHSpacer added in v0.0.2

func NewHSpacer() *HSpacer

type ImageBox added in v0.0.8

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

func NewImageBox added in v0.0.8

func NewImageBox() *ImageBox

func (*ImageBox) Image added in v0.0.8

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

func (*ImageBox) MaxHeight added in v0.0.12

func (c *ImageBox) MaxHeight() int

func (*ImageBox) MaxWidth added in v0.0.12

func (c *ImageBox) MaxWidth() int

func (*ImageBox) MinHeight added in v0.0.12

func (c *ImageBox) MinHeight() int

func (*ImageBox) MinWidth added in v0.0.12

func (c *ImageBox) MinWidth() int

func (*ImageBox) Scaling added in v0.0.8

func (c *ImageBox) Scaling() ImageBoxScale

func (*ImageBox) SetImage added in v0.0.8

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

func (*ImageBox) SetScaling added in v0.0.8

func (c *ImageBox) SetScaling(scaling ImageBoxScale)

type ImageBoxScale added in v0.0.8

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

type Label added in v0.0.2

type Label struct {
	Widget
}

func NewLabel added in v0.0.2

func NewLabel(text string) *Label

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

func (*Label) IsUnderline added in v0.0.14

func (c *Label) IsUnderline() bool

IsUnderline returns whether the Label's text is underlined.

func (*Label) ProcessPropChange added in v0.0.15

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

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

func (*Label) SetText added in v0.0.2

func (c *Label) SetText(text string)

SetText sets the text of the Label.

func (*Label) SetTextAlign added in v0.0.12

func (c *Label) SetTextAlign(align HAlign)

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

func (*Label) SetUnderline added in v0.0.14

func (c *Label) SetUnderline(underline bool)

SetUnderline sets whether the Label's text is underlined.

func (*Label) Text added in v0.0.2

func (c *Label) Text() string

Text returns the text of the Label.

func (*Label) TextAlign added in v0.0.12

func (c *Label) TextAlign() HAlign

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

type 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 NewNumBox added in v0.0.24

func NewNumBox() *NumBox

func (*NumBox) Decimals added in v0.0.24

func (c *NumBox) Decimals() int

func (*NumBox) GetValue added in v0.0.24

func (c *NumBox) GetValue() float64

func (*NumBox) Max added in v0.0.24

func (c *NumBox) Max() float64

func (*NumBox) Min added in v0.0.24

func (c *NumBox) Min() float64

func (*NumBox) ProcessPropChange added in v0.0.24

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

func (*NumBox) SetDecimals added in v0.0.24

func (c *NumBox) SetDecimals(decimals int)

func (*NumBox) SetMax added in v0.0.24

func (c *NumBox) SetMax(max float64)

func (*NumBox) SetMin added in v0.0.24

func (c *NumBox) SetMin(min float64)

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())

func (*NumBox) SetStep added in v0.0.24

func (c *NumBox) SetStep(step float64)

func (*NumBox) SetText added in v0.0.24

func (c *NumBox) SetText(text string)

func (*NumBox) SetValue added in v0.0.24

func (c *NumBox) SetValue(v float64)

func (*NumBox) Step added in v0.0.24

func (c *NumBox) Step() float64

func (*NumBox) Text added in v0.0.24

func (c *NumBox) Text() string

func (*NumBox) Value added in v0.0.24

func (c *NumBox) Value() float64

type Panel added in v0.0.2

type Panel struct {
	Widget
}

func NewPanel added in v0.0.2

func NewPanel() *Panel

type ProgressBar added in v0.0.8

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

func NewProgressBar added in v0.0.8

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

func (*ProgressBar) SetMaxValue added in v0.0.8

func (c *ProgressBar) SetMaxValue(maxValue float64)

func (*ProgressBar) SetMinValue added in v0.0.8

func (c *ProgressBar) SetMinValue(minValue float64)

func (*ProgressBar) SetText added in v0.0.8

func (c *ProgressBar) SetText(text string)

func (*ProgressBar) SetValue added in v0.0.8

func (c *ProgressBar) SetValue(value float64)

func (*ProgressBar) Text added in v0.0.8

func (c *ProgressBar) Text() string

func (*ProgressBar) Value added in v0.0.8

func (c *ProgressBar) Value() float64

type RadioButton added in v0.0.8

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

func NewRadioButton added in v0.0.8

func NewRadioButton(text string) *RadioButton

func (*RadioButton) Checked added in v0.0.8

func (c *RadioButton) Checked() bool

func (*RadioButton) SetChecked added in v0.0.8

func (c *RadioButton) SetChecked(checked bool)

func (*RadioButton) SetOnStateChanged added in v0.0.8

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

func (*RadioButton) SetText added in v0.0.8

func (c *RadioButton) SetText(text string)

func (*RadioButton) Text added in v0.0.8

func (c *RadioButton) Text() string

type ScrollArea added in v0.0.14

type ScrollArea struct {
	Widget
}

func NewScrollArea added in v0.0.14

func NewScrollArea() *ScrollArea

type Space added in v0.0.15

type Space struct {
	Widget
}

func NewSpace added in v0.0.15

func NewSpace() *Space

func (*Space) MaxHeight added in v0.0.15

func (c *Space) MaxHeight() int

func (*Space) MaxWidth added in v0.0.15

func (c *Space) MaxWidth() int

func (*Space) MinHeight added in v0.0.15

func (c *Space) MinHeight() int

func (*Space) MinWidth added in v0.0.15

func (c *Space) MinWidth() int

func (*Space) SetSize added in v0.0.15

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

type TabWidget added in v0.0.2

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

func NewTabWidget added in v0.0.2

func NewTabWidget() *TabWidget

func (*TabWidget) AddPage added in v0.0.2

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

func (*TabWidget) SetLayoutXml added in v0.0.25

func (c *TabWidget) SetLayoutXml(n *uiNode, eventProcessor interface{}, widgets map[string]Widgeter)

type Table added in v0.0.2

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

func NewTable added in v0.0.2

func NewTable() *Table

func (*Table) AddWidgetOnTable added in v0.0.7

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

func (*Table) CellBorderColor added in v0.0.14

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

func (*Table) CellBorderWidth added in v0.0.14

func (c *Table) CellBorderWidth() int

func (*Table) ColumnCount added in v0.0.15

func (c *Table) ColumnCount() int

func (*Table) ColumnName added in v0.0.15

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

func (*Table) ColumnWidth added in v0.0.15

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

func (*Table) CopySelectionToClipboard added in v0.0.13

func (c *Table) CopySelectionToClipboard()

func (*Table) CurrentColumn added in v0.0.2

func (c *Table) CurrentColumn() int

func (*Table) CurrentRow added in v0.0.2

func (c *Table) CurrentRow() int

func (*Table) EditCurrentCell added in v0.0.7

func (c *Table) EditCurrentCell(enteredText string)

func (*Table) GetCellData2 added in v0.0.12

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

func (*Table) GetCellText2 added in v0.0.12

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

func (*Table) IsCellSelected added in v0.0.54

func (c *Table) IsCellSelected(row int, col int) bool

IsCellSelected reports whether the given cell is selected. Only meaningful when SelectingRows() is false.

func (*Table) IsRowSelected added in v0.0.54

func (c *Table) IsRowSelected(row int) bool

IsRowSelected reports whether the given row is selected. Only meaningful when SelectingRows() is true.

func (*Table) Multiselect added in v0.0.54

func (c *Table) Multiselect() bool

func (*Table) PreviousCurrentCellX added in v0.0.46

func (c *Table) PreviousCurrentCellX() int

func (*Table) PreviousCurrentCellY added in v0.0.46

func (c *Table) PreviousCurrentCellY() int

func (*Table) ProcessKeyDown added in v0.0.8

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

func (*Table) RowCount added in v0.0.2

func (c *Table) RowCount() int

func (*Table) RowHeight added in v0.0.18

func (c *Table) RowHeight() int

func (*Table) ScrollToCell2 added in v0.0.12

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

func (*Table) 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

func (c *Table) SelectedRows() []int

SelectedRows returns the sorted list of currently selected row indices. Meaningful when SelectingRows() is true.

func (*Table) SelectingRows added in v0.0.54

func (c *Table) SelectingRows() bool

func (*Table) SetCellBorderColor added in v0.0.14

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

func (*Table) SetCellBorderWidth added in v0.0.14

func (c *Table) SetCellBorderWidth(width int)

func (*Table) SetCellColor added in v0.0.12

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

func (*Table) SetCellContraction added in v0.0.36

func (c *Table) SetCellContraction(row int, col int, contraction bool)

func (*Table) SetCellData2 added in v0.0.12

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

func (*Table) SetCellDisplayText added in v0.0.16

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

func (*Table) SetCellEditTriggerDoubleClick added in v0.0.16

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

func (*Table) SetCellEditTriggerEnter added in v0.0.16

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

func (*Table) SetCellEditTriggerF2 added in v0.0.16

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

func (*Table) SetCellEditTriggerKeyDown added in v0.0.16

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

func (*Table) SetCellHAlign added in v0.0.13

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

func (*Table) SetCellImage added in v0.0.15

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

func (*Table) SetCellOnDraw added in v0.0.18

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

func (*Table) SetCellSelectionDisabled added in v0.0.16

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

func (*Table) SetCellText2 added in v0.0.12

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

func (*Table) SetCellVAlign added in v0.0.13

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

func (*Table) SetColumnCellName2 added in v0.0.12

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

func (*Table) SetColumnCount added in v0.0.2

func (c *Table) SetColumnCount(count int)

func (*Table) SetColumnImage added in v0.0.33

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

func (*Table) SetColumnName added in v0.0.2

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

func (*Table) SetColumnWidth added in v0.0.2

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

func (*Table) SetCurrentCell2 added in v0.0.12

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

func (*Table) SetEditTriggerDoubleClick added in v0.0.8

func (c *Table) SetEditTriggerDoubleClick(enabled bool)

func (*Table) SetEditTriggerEnter added in v0.0.8

func (c *Table) SetEditTriggerEnter(enabled bool)

func (*Table) SetEditTriggerF2 added in v0.0.8

func (c *Table) SetEditTriggerF2(enabled bool)

func (*Table) SetEditTriggerKeyDown added in v0.0.8

func (c *Table) SetEditTriggerKeyDown(enabled bool)

func (*Table) SetHeaderCellSpan2 added in v0.0.12

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

func (*Table) SetHeaderRowCount added in v0.0.8

func (c *Table) SetHeaderRowCount(count int)

func (*Table) SetModeLoading added in v0.0.13

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

func (*Table) SetMultiselect added in v0.0.54

func (c *Table) SetMultiselect(enabled bool)

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 (c *Table) SetOnCellChanged(callback func(row int, col int, text string, data interface{}) bool)

func (*Table) SetOnCellMouseDblClick added in v0.0.19

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

func (*Table) 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 (c *Table) SetOnColumnClick(callback func(col int))

func (*Table) SetOnColumnResize added in v0.0.8

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

func (*Table) SetOnSelectionChanged added in v0.0.2

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

func (*Table) SetRowCount added in v0.0.2

func (c *Table) SetRowCount(count int)

func (*Table) SetRowHeight added in v0.0.16

func (c *Table) SetRowHeight(height int)

func (*Table) SetSelectingRows added in v0.0.54

func (c *Table) SetSelectingRows(selectingRows bool)

SetSelectingRows chooses the selection unit: true selects whole rows, false selects individual cells.

func (*Table) SetShowSelection added in v0.0.2

func (c *Table) SetShowSelection(show bool)

func (*Table) ShowSelection added in v0.0.54

func (c *Table) ShowSelection() bool

func (*Table) TableSetLayoutXml added in v0.0.25

func (c *Table) TableSetLayoutXml(n *uiNode)

type TableCellPos added in v0.0.54

type TableCellPos struct {
	Row int
	Col int
}

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 (c *TextBox) AcceptsReturn() bool

func (*TextBox) AssemblyText added in v0.0.2

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

func (*TextBox) Draw added in v0.0.2

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

func (*TextBox) Hint added in v0.0.22

func (c *TextBox) Hint() string

func (*TextBox) KeyChar added in v0.0.2

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

func (*TextBox) KeyDown added in v0.0.2

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

func (*TextBox) KeyUp added in v0.0.2

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

func (*TextBox) Lines added in v0.0.14

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

func (*TextBox) MinHeight added in v0.0.22

func (c *TextBox) MinHeight() int

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) Multiline added in v0.0.22

func (c *TextBox) Multiline() bool

func (*TextBox) OneLineHeight added in v0.0.2

func (c *TextBox) OneLineHeight() int

func (*TextBox) ProcessPropChange added in v0.0.22

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

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

func (*TextBox) ReadOnly added in v0.0.22

func (c *TextBox) ReadOnly() bool

func (*TextBox) ScrollToBegin added in v0.0.2

func (c *TextBox) ScrollToBegin()

func (*TextBox) SelectAllText added in v0.0.2

func (c *TextBox) SelectAllText()

func (*TextBox) SelectedText added in v0.0.2

func (c *TextBox) SelectedText() string

func (*TextBox) SetHint added in v0.0.22

func (c *TextBox) SetHint(text string)

func (*TextBox) SetIsPassword added in v0.0.2

func (c *TextBox) SetIsPassword(isPassword bool)

func (*TextBox) SetMultiline added in v0.0.2

func (c *TextBox) SetMultiline(multiline bool)

func (*TextBox) SetOnTextBoxKeyDown added in v0.0.2

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

func (*TextBox) SetOnTextChanged added in v0.0.2

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

func (*TextBox) SetProp added in v0.0.14

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

func (*TextBox) SetReadOnly added in v0.0.2

func (c *TextBox) SetReadOnly(readonly bool)

func (*TextBox) SetText added in v0.0.2

func (c *TextBox) SetText(text string)

func (*TextBox) Text added in v0.0.2

func (c *TextBox) Text() string

type TextBoxSelection added in v0.0.2

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

type 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 (c *TimeChart) DefaultTimeRange() (from, to time.Time)

func (*TimeChart) IsDefaultView added in v0.0.57

func (c *TimeChart) IsDefaultView() bool

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) Selection added in v0.0.57

func (c *TimeChart) Selection() (from, to time.Time, ok bool)

func (*TimeChart) SetDefaultTimeRange added in v0.0.57

func (c *TimeChart) SetDefaultTimeRange(from, to time.Time)

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 (c *TimeChart) SetSelection(from, to time.Time)

func (*TimeChart) SetTimeRange added in v0.0.57

func (c *TimeChart) SetTimeRange(from, to time.Time)

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.

func (*TimeChart) TimeRange added in v0.0.57

func (c *TimeChart) TimeRange() (from, to time.Time)

func (*TimeChart) ZoomBack added in v0.0.57

func (c *TimeChart) ZoomBack()

ZoomBack restores the view saved by the last zoom-in. With an empty stack it resets to the default view.

func (*TimeChart) ZoomDepth added in v0.0.57

func (c *TimeChart) ZoomDepth() int

ZoomDepth returns how many zoom levels ZoomBack can go back.

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

type TimeChartMarker struct {
	DT    time.Time
	Value float64
	Text  string
	Color color.Color
}

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

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

func (*VAlign) String added in v0.0.14

func (c *VAlign) String() string

type VSpacer added in v0.0.2

type VSpacer struct {
	Widget
}

func NewVSpacer added in v0.0.2

func NewVSpacer() *VSpacer

type Widget

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

func (*Widget) AddButton added in v0.0.49

func (c *Widget) AddButton(row int, col int, text string, onPush func()) *Button

func (*Widget) AddHSpacer added in v0.0.49

func (c *Widget) AddHSpacer(row int, col int) *HSpacer

func (*Widget) AddLabel added in v0.0.49

func (c *Widget) AddLabel(row int, col int, text string) *Label

func (*Widget) AddPanel added in v0.0.49

func (c *Widget) AddPanel(row int, col int) *Panel

func (*Widget) AddTimer added in v0.0.2

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

func (*Widget) AddVSpacer added in v0.0.49

func (c *Widget) AddVSpacer(row int, col int) *VSpacer

func (*Widget) AddWidget

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

func (*Widget) AllChildren added in v0.0.26

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

func (*Widget) AppendPopupWidget added in v0.0.7

func (c *Widget) AppendPopupWidget(w Widgeter)

func (*Widget) BackgroundColor added in v0.0.7

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

func (*Widget) BackgroundColorForRole added in v0.0.16

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

func (*Widget) BackgroundColorWithAddElevation added in v0.0.14

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

func (*Widget) 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 (c *Widget) CloseAfterPopupWidget(w Widgeter)

func (*Widget) CloseAllPopup added in v0.0.7

func (c *Widget) CloseAllPopup()

func (*Widget) CloseByClickOutside added in v0.0.22

func (c *Widget) CloseByClickOutside() bool

func (*Widget) CloseTopPopup added in v0.0.7

func (c *Widget) CloseTopPopup()

func (*Widget) ContextMenu added in v0.0.7

func (c *Widget) ContextMenu() *ContextMenu

func (*Widget) CurrentElevation added in v0.0.14

func (c *Widget) CurrentElevation() int

func (*Widget) Elevation added in v0.0.14

func (c *Widget) Elevation() int

func (*Widget) Enabled added in v0.0.12

func (c *Widget) Enabled() bool

func (*Widget) FindWidgetByName added in v0.0.14

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

func (*Widget) Focus

func (c *Widget) Focus()

func (*Widget) FontFamily added in v0.0.2

func (c *Widget) FontFamily() string

func (*Widget) FontSize added in v0.0.2

func (c *Widget) FontSize() float64

func (*Widget) ForegroundColor added in v0.0.14

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

func (*Widget) ForegroundColorDisabled added in v0.0.25

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

func (*Widget) Form added in v0.0.49

func (c *Widget) Form() *Form

func (*Widget) FullPath added in v0.0.7

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

func (*Widget) GetHAlign added in v0.0.14

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

func (*Widget) GetProp

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

func (*Widget) GetPropBool

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

func (*Widget) GetPropColor added in v0.0.14

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

func (*Widget) GetPropFloat64 added in v0.0.14

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

func (*Widget) GetPropFunction added in v0.0.14

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

func (*Widget) GetPropInt

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

func (*Widget) GetPropString

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

func (*Widget) GetVAlign added in v0.0.14

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

func (*Widget) GridX added in v0.0.2

func (c *Widget) GridX() int

func (*Widget) GridY added in v0.0.2

func (c *Widget) GridY() int

func (*Widget) Height added in v0.0.2

func (c *Widget) Height() int

func (*Widget) Id added in v0.0.2

func (c *Widget) Id() string

func (*Widget) InitWidget added in v0.0.2

func (c *Widget) InitWidget()

func (*Widget) InnerHeight added in v0.0.2

func (c *Widget) InnerHeight() int

func (*Widget) InnerWidth added in v0.0.2

func (c *Widget) InnerWidth() int

func (*Widget) IsCanBeFocused added in v0.0.7

func (c *Widget) IsCanBeFocused() bool

func (*Widget) IsFocused

func (c *Widget) IsFocused() bool

func (*Widget) IsHovered

func (c *Widget) IsHovered() bool

func (*Widget) IsRolePrimary added in v0.0.14

func (c *Widget) IsRolePrimary() bool

func (*Widget) IsRoleSecondary added in v0.0.14

func (c *Widget) IsRoleSecondary() bool

func (*Widget) IsRoleSurface added in v0.0.14

func (c *Widget) IsRoleSurface() bool

func (*Widget) IsVisible added in v0.0.2

func (c *Widget) IsVisible() bool

func (*Widget) MaxHeight added in v0.0.2

func (c *Widget) MaxHeight() int

func (*Widget) MaxWidth added in v0.0.2

func (c *Widget) MaxWidth() int

func (*Widget) MinHeight added in v0.0.2

func (c *Widget) MinHeight() int

func (*Widget) MinWidth added in v0.0.2

func (c *Widget) MinWidth() int

func (*Widget) MouseCursor added in v0.0.2

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

func (*Widget) Name

func (c *Widget) Name() string

func (*Widget) NextGridColumn added in v0.0.12

func (c *Widget) NextGridColumn() int

func (*Widget) NextGridRow added in v0.0.12

func (c *Widget) NextGridRow() int

func (*Widget) ParentWidget added in v0.0.7

func (c *Widget) ParentWidget() Widgeter

func (*Widget) ParentWidgetId added in v0.0.7

func (c *Widget) ParentWidgetId() string

func (*Widget) ProcessChar added in v0.0.2

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

func (*Widget) ProcessClosePopup added in v0.0.7

func (c *Widget) ProcessClosePopup()

func (*Widget) ProcessFocusLost added in v0.0.7

func (c *Widget) ProcessFocusLost()

func (*Widget) ProcessFocused added in v0.0.7

func (c *Widget) ProcessFocused()

func (*Widget) ProcessKeyDown added in v0.0.2

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

func (*Widget) ProcessKeyUp added in v0.0.2

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

func (*Widget) ProcessMouseDblClick added in v0.0.2

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

func (*Widget) ProcessMouseDown added in v0.0.2

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

func (*Widget) ProcessMouseEnter added in v0.0.2

func (c *Widget) ProcessMouseEnter() bool

func (*Widget) ProcessMouseLeave added in v0.0.2

func (c *Widget) ProcessMouseLeave() bool

func (*Widget) ProcessMouseMove added in v0.0.2

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

func (*Widget) ProcessMouseUp added in v0.0.2

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

func (*Widget) ProcessMouseWheel added in v0.0.2

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

func (*Widget) ProcessPaint added in v0.0.2

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

func (*Widget) ProcessPropChange added in v0.0.15

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

func (*Widget) ProcessTimer added in v0.0.2

func (c *Widget) ProcessTimer()

func (*Widget) RectClientAreaOnWindow added in v0.0.7

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

func (*Widget) RemoveAllWidgets added in v0.0.2

func (c *Widget) RemoveAllWidgets()

func (*Widget) RemoveWidget added in v0.0.2

func (c *Widget) RemoveWidget(w Widgeter)

func (*Widget) Role added in v0.0.14

func (c *Widget) Role() string

func (*Widget) ScrollEnsureVisible added in v0.0.2

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

func (*Widget) ScrollX added in v0.0.7

func (c *Widget) ScrollX() int

func (*Widget) ScrollY added in v0.0.7

func (c *Widget) ScrollY() int

func (*Widget) SetAbsolutePositioning added in v0.0.2

func (c *Widget) SetAbsolutePositioning(absolute bool)

func (*Widget) SetAllowScroll added in v0.0.2

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

func (*Widget) SetAnchors

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

func (*Widget) SetAutoFillBackground added in v0.0.12

func (c *Widget) SetAutoFillBackground(autoFill bool)

func (*Widget) SetBackgroundColor added in v0.0.2

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

func (*Widget) SetCanBeFocused added in v0.0.7

func (c *Widget) SetCanBeFocused(canBeFocused bool)

func (*Widget) SetCellPadding added in v0.0.7

func (c *Widget) SetCellPadding(padding int)

func (*Widget) SetCloseByClickOutside added in v0.0.22

func (c *Widget) SetCloseByClickOutside(close bool)

func (*Widget) SetContextMenu added in v0.0.7

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

func (*Widget) SetElevation added in v0.0.14

func (c *Widget) SetElevation(elevation int)

func (*Widget) SetEnabled added in v0.0.12

func (c *Widget) SetEnabled(enabled bool)

func (*Widget) SetFontSize added in v0.0.30

func (c *Widget) SetFontSize(fontSize float64)

func (*Widget) SetForegroundColor added in v0.0.10

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

func (*Widget) SetGridPosition added in v0.0.2

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

func (*Widget) SetInnerSize added in v0.0.2

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

func (*Widget) SetLayout added in v0.0.14

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

func (*Widget) SetMaxHeight added in v0.0.2

func (c *Widget) SetMaxHeight(maxHeight int)

func (*Widget) SetMaxSize added in v0.0.2

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

func (*Widget) SetMaxWidth added in v0.0.2

func (c *Widget) SetMaxWidth(maxWidth int)

func (*Widget) SetMinHeight added in v0.0.2

func (c *Widget) SetMinHeight(minHeight int)

func (*Widget) SetMinSize added in v0.0.2

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

func (*Widget) SetMinWidth added in v0.0.2

func (c *Widget) SetMinWidth(minWidth int)

func (*Widget) SetMouseCursor

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

func (*Widget) SetName

func (c *Widget) SetName(name string)

func (*Widget) SetOnChar added in v0.0.2

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

func (*Widget) SetOnClick

func (c *Widget) SetOnClick(f func())

func (*Widget) SetOnFocusLost added in v0.0.7

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

func (*Widget) SetOnFocused added in v0.0.2

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

func (*Widget) SetOnKeyDown

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

func (*Widget) SetOnKeyUp

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

func (*Widget) SetOnMouseDblClick added in v0.0.7

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

func (*Widget) SetOnMouseDown

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

func (*Widget) SetOnMouseEnter

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

func (*Widget) SetOnMouseLeave

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

func (*Widget) SetOnMouseMove

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

func (*Widget) SetOnMouseUp

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

func (*Widget) SetOnMouseWheel

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

func (*Widget) SetOnPaint

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

func (*Widget) SetOnPostPaint added in v0.0.7

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

func (*Widget) SetOnScrollChanged added in v0.0.7

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

func (*Widget) SetPanelPadding added in v0.0.2

func (c *Widget) SetPanelPadding(padding int)

func (*Widget) SetParentWidgetId added in v0.0.7

func (c *Widget) SetParentWidgetId(id string)

func (*Widget) SetPosition

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

func (*Widget) SetProp

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

func (*Widget) SetPropFunction added in v0.0.14

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

func (*Widget) SetRole added in v0.0.14

func (c *Widget) SetRole(role string)

func (*Widget) SetSize

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

func (*Widget) SetTooltip added in v0.0.57

func (c *Widget) SetTooltip(text string)

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 (c *Widget) SetTypeName(typeName string)

func (*Widget) SetVisible added in v0.0.2

func (c *Widget) SetVisible(visible bool)

func (*Widget) SetXExpandable added in v0.0.2

func (c *Widget) SetXExpandable(expandable bool)

func (*Widget) SetYExpandable added in v0.0.2

func (c *Widget) SetYExpandable(expandable bool)

func (*Widget) ShowDialog added in v0.0.49

func (c *Widget) ShowDialog(centralWidget Widgeter)

func (*Widget) Tooltip added in v0.0.57

func (c *Widget) Tooltip() string

func (*Widget) TypeName added in v0.0.2

func (c *Widget) TypeName() string

func (*Widget) Widgets added in v0.0.4

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

func (*Widget) Width added in v0.0.2

func (c *Widget) Width() int

func (*Widget) X

func (c *Widget) X() int

func (*Widget) XExpandable added in v0.0.2

func (c *Widget) XExpandable() bool

func (*Widget) Y

func (c *Widget) Y() int

func (*Widget) YExpandable added in v0.0.2

func (c *Widget) YExpandable() bool

type Widgeter added in v0.0.2

type Widgeter interface {
	Id() string
	ParentWidgetId() string
	SetParentWidgetId(id string)

	FullPath() []string
	TypeName() string
	Name() string
	X() int
	Y() int
	Width() int
	Height() int
	InnerWidth() int
	InnerHeight() int
	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
}

Jump to

Keyboard shortcuts

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