Documentation ¶
Index ¶
- func MessageBox(caption, text string)
- func MessageBoxCustom(caption, text string, flags uint) int
- func MessageBoxError(caption, text string)
- func MessageBoxInfo(caption, text string)
- func MessageBoxOKCancel(caption, text string) bool
- func MessageBoxQuestion(caption, text string)
- func MessageBoxWarning(caption, text string)
- func MessageBoxYesNo(caption, text string) bool
- type Button
- func (c *Button) CursorPosition() (start, end int)
- func (c *Button) Focus()
- func (c *Button) Font() *Font
- func (c *Button) HasFocus() bool
- func (b *Button) OnClick() func()
- func (c *Button) SelectAll()
- func (c *Button) SetCursorPosition(pos int)
- func (c *Button) SetFont(font *Font)
- func (b *Button) SetOnClick(f func())
- func (c *Button) SetSelection(start, end int)
- func (c *Button) SetText(text string)
- func (c *Button) Text() string
- type Canvas
- func (c *Canvas) Arc(x, y, width, height int, fromClockAngle, dAngle float64, color Color)
- func (c *Canvas) DrawEllipse(x, y, width, height int, color Color)
- func (c *Canvas) DrawImage(img *Image, src Rectangle, destX, destY int)
- func (c *Canvas) DrawPie(x, y, width, height int, fromClockAngle, dAngle float64, color Color)
- func (c *Canvas) DrawRect(x, y, width, height int, color Color)
- func (c *Canvas) FillEllipse(x, y, width, height int, color Color)
- func (c *Canvas) FillPie(x, y, width, height int, fromClockAngle, dAngle float64, color Color)
- func (c *Canvas) FillRect(x, y, width, height int, color Color)
- func (c *Canvas) Height() int
- func (c *Canvas) Line(x1, y1, x2, y2 int, color Color)
- func (c *Canvas) Polygon(p []w32.POINT, color Color)
- func (c *Canvas) Polyline(p []w32.POINT, color Color)
- func (c *Canvas) SetFont(font *Font)
- func (c *Canvas) Size() (width, height int)
- func (c *Canvas) TextExtent(s string) (width, height int)
- func (c *Canvas) TextOut(x, y int, s string, color Color)
- func (c *Canvas) TextRect(x, y, w, h int, s string, color Color)
- func (c *Canvas) TextRectExtent(s string, givenWidth int) (width, height int)
- func (c *Canvas) TextRectFormat(x, y, w, h int, s string, format Format, color Color)
- func (c *Canvas) Width() int
- type Checkbox
- func (c *Checkbox) Checked() bool
- func (c *Checkbox) CursorPosition() (start, end int)
- func (c *Checkbox) Focus()
- func (c *Checkbox) Font() *Font
- func (c *Checkbox) HasFocus() bool
- func (c *Checkbox) SelectAll()
- func (c *Checkbox) SetChecked(checked bool)
- func (c *Checkbox) SetCursorPosition(pos int)
- func (c *Checkbox) SetFont(font *Font)
- func (c *Checkbox) SetOnChange(f func(checked bool))
- func (c *Checkbox) SetSelection(start, end int)
- func (c *Checkbox) SetText(text string)
- func (c *Checkbox) Text() string
- type Color
- type Combobox
- func (e *Combobox) Add(s string)
- func (e *Combobox) Clear()
- func (c *Combobox) CursorPosition() (start, end int)
- func (c *Combobox) Focus()
- func (c *Combobox) Font() *Font
- func (c *Combobox) HasFocus() bool
- func (e *Combobox) Items() []string
- func (c *Combobox) SelectAll()
- func (e *Combobox) SelectedIndex() int
- func (c *Combobox) SetCursorPosition(pos int)
- func (c *Combobox) SetFont(font *Font)
- func (e *Combobox) SetOnChange(f func(newIndex int))
- func (e *Combobox) SetSelectedIndex(i int)
- func (c *Combobox) SetSelection(start, end int)
- func (c *Combobox) SetText(text string)
- func (c *Combobox) Text() string
- type Container
- type Control
- type EditLine
- func (e *EditLine) CharacterLimit() int
- func (c *EditLine) CursorPosition() (start, end int)
- func (c *EditLine) Focus()
- func (c *EditLine) Font() *Font
- func (c *EditLine) HasFocus() bool
- func (e *EditLine) IsPassword() bool
- func (e *EditLine) OnTextChange() func()
- func (c *EditLine) SelectAll()
- func (e *EditLine) SetCharacterLimit(count int)
- func (c *EditLine) SetCursorPosition(pos int)
- func (c *EditLine) SetFont(font *Font)
- func (e *EditLine) SetOnTextChange(f func())
- func (e *EditLine) SetPassword(isPass bool)
- func (c *EditLine) SetSelection(start, end int)
- func (c *EditLine) SetText(text string)
- func (c *EditLine) Text() string
- type FileOpenDialog
- func (dlg *FileOpenDialog) AddFilter(text, ext1 string, exts ...string)
- func (dlg *FileOpenDialog) ExecuteMultiSelection(parent *Window) (bool, []string)
- func (dlg *FileOpenDialog) ExecuteSingleSelection(parent *Window) (bool, string)
- func (dlg *FileOpenDialog) SetFilterIndex(i int)
- func (dlg *FileOpenDialog) SetInitialPath(path string)
- func (dlg *FileOpenDialog) SetTitle(title string)
- type FileSaveDialog
- func (dlg *FileSaveDialog) AddFilter(text, ext1 string, exts ...string)
- func (dlg *FileSaveDialog) Execute(parent *Window) (bool, string)
- func (dlg *FileSaveDialog) SetAppendExt(ext bool)
- func (dlg *FileSaveDialog) SetFilterIndex(i int)
- func (dlg *FileSaveDialog) SetInitialPath(path string)
- func (dlg *FileSaveDialog) SetTitle(title string)
- type FloatUpDown
- func (c *FloatUpDown) CursorPosition() (start, end int)
- func (c *FloatUpDown) Focus()
- func (c *FloatUpDown) Font() *Font
- func (c *FloatUpDown) HasFocus() bool
- func (n *FloatUpDown) MaxValue() float64
- func (n *FloatUpDown) MinMaxValues() (min, max int)
- func (n *FloatUpDown) MinValue() float64
- func (n *FloatUpDown) Precision() int
- func (c *FloatUpDown) SelectAll()
- func (n *FloatUpDown) SetBounds(x, y, width, height int)
- func (c *FloatUpDown) SetCursorPosition(pos int)
- func (c *FloatUpDown) SetFont(font *Font)
- func (n *FloatUpDown) SetHeight(height int)
- func (n *FloatUpDown) SetMaxValue(max float64)
- func (n *FloatUpDown) SetMinMaxValues(min, max float64)
- func (n *FloatUpDown) SetMinValue(min float64)
- func (n *FloatUpDown) SetPos(x, y int)
- func (n *FloatUpDown) SetPrecision(p int)
- func (c *FloatUpDown) SetSelection(start, end int)
- func (n *FloatUpDown) SetSize(width, height int)
- func (c *FloatUpDown) SetText(text string)
- func (n *FloatUpDown) SetValue(f float64)
- func (n *FloatUpDown) SetWidth(width int)
- func (n *FloatUpDown) SetX(x int)
- func (n *FloatUpDown) SetY(y int)
- func (c *FloatUpDown) Text() string
- func (n *FloatUpDown) Value() float64
- type FolderSelectDialog
- type Font
- type FontDesc
- type Format
- type Image
- type IntUpDown
- func (c *IntUpDown) CursorPosition() (start, end int)
- func (c *IntUpDown) Focus()
- func (c *IntUpDown) Font() *Font
- func (c *IntUpDown) HasFocus() bool
- func (n *IntUpDown) MaxValue() int
- func (n *IntUpDown) MinMaxValues() (min, max int)
- func (n *IntUpDown) MinValue() int
- func (c *IntUpDown) SelectAll()
- func (n *IntUpDown) SetBounds(x, y, width, height int)
- func (c *IntUpDown) SetCursorPosition(pos int)
- func (c *IntUpDown) SetFont(font *Font)
- func (n *IntUpDown) SetHeight(height int)
- func (n *IntUpDown) SetMaxValue(max int)
- func (n *IntUpDown) SetMinMaxValues(min, max int)
- func (n *IntUpDown) SetMinValue(min int)
- func (n *IntUpDown) SetOnValueChange(f func(value int))
- func (n *IntUpDown) SetPos(x, y int)
- func (c *IntUpDown) SetSelection(start, end int)
- func (n *IntUpDown) SetSize(width, height int)
- func (c *IntUpDown) SetText(text string)
- func (n *IntUpDown) SetValue(v int)
- func (n *IntUpDown) SetWidth(width int)
- func (n *IntUpDown) SetX(x int)
- func (n *IntUpDown) SetY(y int)
- func (c *IntUpDown) Text() string
- func (n *IntUpDown) Value() int
- type KeyMod
- type Label
- func (c *Label) CursorPosition() (start, end int)
- func (c *Label) Focus()
- func (c *Label) Font() *Font
- func (c *Label) HasFocus() bool
- func (c *Label) SelectAll()
- func (l *Label) SetCenterAlign() *Label
- func (c *Label) SetCursorPosition(pos int)
- func (c *Label) SetFont(font *Font)
- func (l *Label) SetLeftAlign() *Label
- func (l *Label) SetRightAlign() *Label
- func (c *Label) SetSelection(start, end int)
- func (c *Label) SetText(text string)
- func (c *Label) Text() string
- type Menu
- type MenuItem
- type MenuString
- type MouseButton
- type Paintbox
- func (c *Paintbox) Bounds() (x, y, width, height int)
- func (c *Paintbox) Enabled() bool
- func (c *Paintbox) Height() int
- func (c *Paintbox) OnResize() func()
- func (p *Paintbox) Paint()
- func (c *Paintbox) Pos() (x, y int)
- func (c *Paintbox) SetBounds(x, y, width, height int)
- func (c *Paintbox) SetEnabled(e bool)
- func (c *Paintbox) SetHeight(height int)
- func (p *Paintbox) SetOnPaint(f func(*Canvas))
- func (c *Paintbox) SetOnResize(f func())
- func (c *Paintbox) SetPos(x, y int)
- func (c *Paintbox) SetSize(width, height int)
- func (c *Paintbox) SetVisible(v bool)
- func (c *Paintbox) SetWidth(width int)
- func (c *Paintbox) SetX(x int)
- func (c *Paintbox) SetY(y int)
- func (c *Paintbox) Size() (width, height int)
- func (c *Paintbox) Visible() bool
- func (c *Paintbox) Width() int
- func (c *Paintbox) X() int
- func (c *Paintbox) Y() int
- type Panel
- func (p *Panel) Add(c Control)
- func (c *Panel) Bounds() (x, y, width, height int)
- func (c *Panel) Enabled() bool
- func (p *Panel) Font() *Font
- func (c *Panel) Height() int
- func (c *Panel) OnResize() func()
- func (c *Panel) Pos() (x, y int)
- func (c *Panel) SetBounds(x, y, width, height int)
- func (c *Panel) SetEnabled(e bool)
- func (p *Panel) SetFont(f *Font)
- func (c *Panel) SetHeight(height int)
- func (p *Panel) SetNoBorder()
- func (c *Panel) SetOnResize(f func())
- func (c *Panel) SetPos(x, y int)
- func (p *Panel) SetRaisedBorder()
- func (p *Panel) SetSingleLineBorder()
- func (c *Panel) SetSize(width, height int)
- func (p *Panel) SetSunkenBorder()
- func (p *Panel) SetSunkenThickBorder()
- func (c *Panel) SetVisible(v bool)
- func (c *Panel) SetWidth(width int)
- func (c *Panel) SetX(x int)
- func (c *Panel) SetY(y int)
- func (c *Panel) Size() (width, height int)
- func (c *Panel) Visible() bool
- func (c *Panel) Width() int
- func (c *Panel) X() int
- func (c *Panel) Y() int
- type ProgressBar
- func (c *ProgressBar) Bounds() (x, y, width, height int)
- func (c *ProgressBar) Enabled() bool
- func (c *ProgressBar) Height() int
- func (c *ProgressBar) OnResize() func()
- func (c *ProgressBar) Pos() (x, y int)
- func (c *ProgressBar) SetBounds(x, y, width, height int)
- func (c *ProgressBar) SetEnabled(e bool)
- func (c *ProgressBar) SetHeight(height int)
- func (c *ProgressBar) SetOnResize(f func())
- func (c *ProgressBar) SetPos(x, y int)
- func (c *ProgressBar) SetSize(width, height int)
- func (p *ProgressBar) SetValue(v float64)
- func (c *ProgressBar) SetVisible(v bool)
- func (c *ProgressBar) SetWidth(width int)
- func (c *ProgressBar) SetX(x int)
- func (c *ProgressBar) SetY(y int)
- func (c *ProgressBar) Size() (width, height int)
- func (p *ProgressBar) Value() float64
- func (c *ProgressBar) Visible() bool
- func (c *ProgressBar) Width() int
- func (c *ProgressBar) X() int
- func (c *ProgressBar) Y() int
- type RadioButton
- func (r *RadioButton) Checked() bool
- func (c *RadioButton) CursorPosition() (start, end int)
- func (c *RadioButton) Focus()
- func (c *RadioButton) Font() *Font
- func (c *RadioButton) HasFocus() bool
- func (c *RadioButton) SelectAll()
- func (r *RadioButton) SetChecked(checked bool)
- func (c *RadioButton) SetCursorPosition(pos int)
- func (c *RadioButton) SetFont(font *Font)
- func (r *RadioButton) SetOnChange(f func(checked bool))
- func (c *RadioButton) SetSelection(start, end int)
- func (c *RadioButton) SetText(text string)
- func (c *RadioButton) Text() string
- type Rectangle
- type ShortcutKeys
- type StringTable
- func (c *StringTable) Clear()
- func (c *StringTable) ColCount() int
- func (c *StringTable) CursorPosition() (start, end int)
- func (c *StringTable) DeleteRow(row int)
- func (c *StringTable) Focus()
- func (c *StringTable) Font() *Font
- func (c *StringTable) HasFocus() bool
- func (c *StringTable) OnSelectionChange() func()
- func (c *StringTable) RowCount() int
- func (c *StringTable) SelectAll()
- func (c *StringTable) SelectedRow() int
- func (c *StringTable) SetCell(col, row int, s string)
- func (c *StringTable) SetCursorPosition(pos int)
- func (c *StringTable) SetFont(font *Font)
- func (c *StringTable) SetOnSelectionChange(f func())
- func (c *StringTable) SetSelection(start, end int)
- func (c *StringTable) SetText(text string)
- func (c *StringTable) Text() string
- type TextEdit
- func (e *TextEdit) CharacterLimit() int
- func (c *TextEdit) CursorPosition() (start, end int)
- func (c *TextEdit) Focus()
- func (c *TextEdit) Font() *Font
- func (c *TextEdit) HasFocus() bool
- func (c *TextEdit) SelectAll()
- func (e *TextEdit) SetCharacterLimit(count int)
- func (c *TextEdit) SetCursorPosition(pos int)
- func (c *TextEdit) SetFont(font *Font)
- func (c *TextEdit) SetSelection(start, end int)
- func (c *TextEdit) SetText(text string)
- func (e *TextEdit) SetWordWrap(wrap bool)
- func (c *TextEdit) Text() string
- func (e *TextEdit) WordWrap() bool
- type Window
- func (w *Window) Add(c Control)
- func (w *Window) Bounds() (x, y, width, height int)
- func (w *Window) ClassName() string
- func (w *Window) ClassStyle() uint32
- func (w *Window) ClientBounds() (x, y, width, height int)
- func (w *Window) ClientHeight() int
- func (w *Window) ClientPos() (x, y int)
- func (w *Window) ClientSize() (width, height int)
- func (w *Window) ClientWidth() int
- func (w *Window) ClientX() int
- func (w *Window) ClientY() int
- func (w *Window) Close()
- func (w *Window) Cursor() w32.HCURSOR
- func (w *Window) Destroy()
- func (w *Window) DisableAltF4()
- func (w *Window) EnableAltF4()
- func (w *Window) ExtendedStyle() uint
- func (w *Window) Font() *Font
- func (w *Window) GetBackground() w32.HBRUSH
- func (w *Window) Height() int
- func (w *Window) HideConsoleOnStart()
- func (w *Window) Maximize()
- func (w *Window) Maximized() bool
- func (w *Window) Menu() *Menu
- func (w *Window) Minimize()
- func (w *Window) Minimized() bool
- func (w *Window) Monitor() w32.HMONITOR
- func (w *Window) OnResize() func()
- func (w *Window) Parent() *Window
- func (w *Window) Pos() (x, y int)
- func (w *Window) Repaint()
- func (w *Window) Restore()
- func (w *Window) Scroll(dx, dy int)
- func (w *Window) SetBackground(b w32.HBRUSH)
- func (w *Window) SetBounds(x, y, width, height int)
- func (w *Window) SetClassName(name string)
- func (w *Window) SetClassStyle(style uint32)
- func (w *Window) SetClientHeight(height int)
- func (w *Window) SetClientSize(width, height int)
- func (w *Window) SetClientWidth(width int)
- func (w *Window) SetCursor(c w32.HCURSOR)
- func (w *Window) SetExtendedStyle(x uint)
- func (w *Window) SetFont(f *Font)
- func (w *Window) SetHeight(height int)
- func (w *Window) SetIconFromExeResource(resourceID uint16)
- func (w *Window) SetIconFromFile(path string)
- func (w *Window) SetIconFromMem(mem []byte)
- func (w *Window) SetMenu(m *Menu)
- func (w *Window) SetOnCanClose(f func() bool)
- func (w *Window) SetOnClose(f func())
- func (w *Window) SetOnKeyDown(f func(key int))
- func (w *Window) SetOnKeyUp(f func(key int))
- func (w *Window) SetOnMouseDown(f func(button MouseButton, x, y int))
- func (w *Window) SetOnMouseMove(f func(x, y int))
- func (w *Window) SetOnMouseUp(f func(button MouseButton, x, y int))
- func (w *Window) SetOnMouseWheel(f func(x, y int, delta float64))
- func (w *Window) SetOnResize(f func())
- func (w *Window) SetOnShow(f func())
- func (w *Window) SetPos(x, y int)
- func (w *Window) SetShortcut(keys ShortcutKeys, f func())
- func (w *Window) SetSize(width, height int)
- func (w *Window) SetStyle(ws uint)
- func (w *Window) SetTitle(title string)
- func (w *Window) SetWidth(width int)
- func (w *Window) SetX(x int)
- func (w *Window) SetY(y int)
- func (w *Window) Show() error
- func (w *Window) ShowConsoleOnStart()
- func (w *Window) ShowModal() error
- func (w *Window) Size() (width, height int)
- func (w *Window) Style() uint
- func (w *Window) Title() string
- func (w *Window) Width() int
- func (w *Window) X() int
- func (w *Window) Y() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MessageBox ¶
func MessageBox(caption, text string)
func MessageBoxCustom ¶
func MessageBoxError ¶
func MessageBoxError(caption, text string)
func MessageBoxInfo ¶
func MessageBoxInfo(caption, text string)
func MessageBoxOKCancel ¶
func MessageBoxQuestion ¶
func MessageBoxQuestion(caption, text string)
func MessageBoxWarning ¶
func MessageBoxWarning(caption, text string)
func MessageBoxYesNo ¶
Types ¶
type Button ¶
type Button struct {
// contains filtered or unexported fields
}
func (*Button) CursorPosition ¶
func (c *Button) CursorPosition() (start, end int)
If a selection is active, start is the index of the first selected UTF-8 character in Text() and end is the position one character after the end of the selection. The selected text is thus
c.Text()[start:end]
func (*Button) SetCursorPosition ¶
func (c *Button) SetCursorPosition(pos int)
func (*Button) SetOnClick ¶
func (b *Button) SetOnClick(f func())
func (*Button) SetSelection ¶
func (c *Button) SetSelection(start, end int)
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
func (*Canvas) DrawEllipse ¶
func (*Canvas) FillEllipse ¶
func (*Canvas) TextExtent ¶
func (*Canvas) TextRectExtent ¶
TextRectExtent returns the size of the text when drawn in a rectangle of the given width. The given width is necessary because text rects use word breaks and thus given a smaller width might produce a higher text height.
func (*Canvas) TextRectFormat ¶
type Checkbox ¶
type Checkbox struct {
// contains filtered or unexported fields
}
func NewCheckbox ¶
func NewCheckbox() *Checkbox
func (*Checkbox) CursorPosition ¶
func (c *Checkbox) CursorPosition() (start, end int)
If a selection is active, start is the index of the first selected UTF-8 character in Text() and end is the position one character after the end of the selection. The selected text is thus
c.Text()[start:end]
func (*Checkbox) SetChecked ¶
func (*Checkbox) SetCursorPosition ¶
func (c *Checkbox) SetCursorPosition(pos int)
func (*Checkbox) SetOnChange ¶
func (*Checkbox) SetSelection ¶
func (c *Checkbox) SetSelection(start, end int)
type Combobox ¶
type Combobox struct {
// contains filtered or unexported fields
}
func NewCombobox ¶
func NewCombobox() *Combobox
func (*Combobox) CursorPosition ¶
func (c *Combobox) CursorPosition() (start, end int)
If a selection is active, start is the index of the first selected UTF-8 character in Text() and end is the position one character after the end of the selection. The selected text is thus
c.Text()[start:end]
func (*Combobox) SelectedIndex ¶
func (*Combobox) SetCursorPosition ¶
func (c *Combobox) SetCursorPosition(pos int)
func (*Combobox) SetOnChange ¶
func (*Combobox) SetSelectedIndex ¶
func (*Combobox) SetSelection ¶
func (c *Combobox) SetSelection(start, end int)
type EditLine ¶
type EditLine struct {
// contains filtered or unexported fields
}
func NewEditLine ¶
func NewEditLine() *EditLine
func (*EditLine) CharacterLimit ¶
func (*EditLine) CursorPosition ¶
func (c *EditLine) CursorPosition() (start, end int)
If a selection is active, start is the index of the first selected UTF-8 character in Text() and end is the position one character after the end of the selection. The selected text is thus
c.Text()[start:end]
func (*EditLine) IsPassword ¶
func (*EditLine) OnTextChange ¶
func (e *EditLine) OnTextChange() func()
func (*EditLine) SetCharacterLimit ¶
func (*EditLine) SetCursorPosition ¶
func (c *EditLine) SetCursorPosition(pos int)
func (*EditLine) SetOnTextChange ¶
func (e *EditLine) SetOnTextChange(f func())
func (*EditLine) SetPassword ¶
func (*EditLine) SetSelection ¶
func (c *EditLine) SetSelection(start, end int)
type FileOpenDialog ¶
type FileOpenDialog struct {
// contains filtered or unexported fields
}
func NewFileOpenDialog ¶
func NewFileOpenDialog() *FileOpenDialog
func (*FileOpenDialog) AddFilter ¶
func (dlg *FileOpenDialog) AddFilter(text, ext1 string, exts ...string)
func (*FileOpenDialog) ExecuteMultiSelection ¶
func (dlg *FileOpenDialog) ExecuteMultiSelection(parent *Window) (bool, []string)
func (*FileOpenDialog) ExecuteSingleSelection ¶
func (dlg *FileOpenDialog) ExecuteSingleSelection(parent *Window) (bool, string)
func (*FileOpenDialog) SetFilterIndex ¶
func (dlg *FileOpenDialog) SetFilterIndex(i int)
SetFilterIndex sets the active filter, 0-indexed.
func (*FileOpenDialog) SetInitialPath ¶
func (dlg *FileOpenDialog) SetInitialPath(path string)
func (*FileOpenDialog) SetTitle ¶
func (dlg *FileOpenDialog) SetTitle(title string)
type FileSaveDialog ¶
type FileSaveDialog struct {
// contains filtered or unexported fields
}
func NewFileSaveDialog ¶
func NewFileSaveDialog() *FileSaveDialog
func (*FileSaveDialog) AddFilter ¶
func (dlg *FileSaveDialog) AddFilter(text, ext1 string, exts ...string)
func (*FileSaveDialog) SetAppendExt ¶
func (dlg *FileSaveDialog) SetAppendExt(ext bool)
func (*FileSaveDialog) SetFilterIndex ¶
func (dlg *FileSaveDialog) SetFilterIndex(i int)
SetFilterIndex sets the active filter, 0-indexed.
func (*FileSaveDialog) SetInitialPath ¶
func (dlg *FileSaveDialog) SetInitialPath(path string)
func (*FileSaveDialog) SetTitle ¶
func (dlg *FileSaveDialog) SetTitle(title string)
type FloatUpDown ¶
type FloatUpDown struct {
// contains filtered or unexported fields
}
func NewFloatUpDown ¶
func NewFloatUpDown() *FloatUpDown
func (*FloatUpDown) CursorPosition ¶
func (c *FloatUpDown) CursorPosition() (start, end int)
If a selection is active, start is the index of the first selected UTF-8 character in Text() and end is the position one character after the end of the selection. The selected text is thus
c.Text()[start:end]
func (*FloatUpDown) MaxValue ¶
func (n *FloatUpDown) MaxValue() float64
func (*FloatUpDown) MinMaxValues ¶
func (n *FloatUpDown) MinMaxValues() (min, max int)
func (*FloatUpDown) MinValue ¶
func (n *FloatUpDown) MinValue() float64
func (*FloatUpDown) Precision ¶
func (n *FloatUpDown) Precision() int
func (*FloatUpDown) SetBounds ¶
func (n *FloatUpDown) SetBounds(x, y, width, height int)
func (*FloatUpDown) SetCursorPosition ¶
func (c *FloatUpDown) SetCursorPosition(pos int)
func (*FloatUpDown) SetHeight ¶
func (n *FloatUpDown) SetHeight(height int)
func (*FloatUpDown) SetMaxValue ¶
func (n *FloatUpDown) SetMaxValue(max float64)
func (*FloatUpDown) SetMinMaxValues ¶
func (n *FloatUpDown) SetMinMaxValues(min, max float64)
func (*FloatUpDown) SetMinValue ¶
func (n *FloatUpDown) SetMinValue(min float64)
func (*FloatUpDown) SetPos ¶
func (n *FloatUpDown) SetPos(x, y int)
func (*FloatUpDown) SetPrecision ¶
func (n *FloatUpDown) SetPrecision(p int)
func (*FloatUpDown) SetSelection ¶
func (c *FloatUpDown) SetSelection(start, end int)
func (*FloatUpDown) SetSize ¶
func (n *FloatUpDown) SetSize(width, height int)
func (*FloatUpDown) SetValue ¶
func (n *FloatUpDown) SetValue(f float64)
func (*FloatUpDown) SetWidth ¶
func (n *FloatUpDown) SetWidth(width int)
func (*FloatUpDown) SetX ¶
func (n *FloatUpDown) SetX(x int)
func (*FloatUpDown) SetY ¶
func (n *FloatUpDown) SetY(y int)
func (*FloatUpDown) Value ¶
func (n *FloatUpDown) Value() float64
type FolderSelectDialog ¶
type FolderSelectDialog struct {
// contains filtered or unexported fields
}
func NewFolderSelectDialog ¶
func NewFolderSelectDialog() *FolderSelectDialog
func (*FolderSelectDialog) Execute ¶
func (dlg *FolderSelectDialog) Execute(parent *Window) (bool, string)
func (*FolderSelectDialog) SetTitle ¶
func (dlg *FolderSelectDialog) SetTitle(title string)
type IntUpDown ¶
type IntUpDown struct {
// contains filtered or unexported fields
}
func NewIntUpDown ¶
func NewIntUpDown() *IntUpDown
func (*IntUpDown) CursorPosition ¶
func (c *IntUpDown) CursorPosition() (start, end int)
If a selection is active, start is the index of the first selected UTF-8 character in Text() and end is the position one character after the end of the selection. The selected text is thus
c.Text()[start:end]
func (*IntUpDown) MinMaxValues ¶
func (*IntUpDown) SetCursorPosition ¶
func (c *IntUpDown) SetCursorPosition(pos int)
func (*IntUpDown) SetMaxValue ¶
func (*IntUpDown) SetMinMaxValues ¶
func (*IntUpDown) SetMinValue ¶
func (*IntUpDown) SetOnValueChange ¶
func (*IntUpDown) SetSelection ¶
func (c *IntUpDown) SetSelection(start, end int)
type Label ¶
type Label struct {
// contains filtered or unexported fields
}
func (*Label) CursorPosition ¶
func (c *Label) CursorPosition() (start, end int)
If a selection is active, start is the index of the first selected UTF-8 character in Text() and end is the position one character after the end of the selection. The selected text is thus
c.Text()[start:end]
func (*Label) SetCenterAlign ¶
func (*Label) SetCursorPosition ¶
func (c *Label) SetCursorPosition(pos int)
func (*Label) SetLeftAlign ¶
func (*Label) SetRightAlign ¶
func (*Label) SetSelection ¶
func (c *Label) SetSelection(start, end int)
type Menu ¶
type Menu struct {
// contains filtered or unexported fields
}
func NewMainMenu ¶
func NewMainMenu() *Menu
type MenuItem ¶
type MenuItem interface {
// contains filtered or unexported methods
}
MenuItem is something that can go into a menu. Possible such things can be created via: NewMenu, NewMenuString, NewMenuSeparator.
func NewMenuSeparator ¶
func NewMenuSeparator() MenuItem
type MenuString ¶
type MenuString struct {
// contains filtered or unexported fields
}
func NewMenuString ¶
func NewMenuString(text string) *MenuString
func (*MenuString) Checked ¶
func (m *MenuString) Checked() bool
func (*MenuString) OnClick ¶
func (m *MenuString) OnClick() func()
func (*MenuString) SetChecked ¶
func (m *MenuString) SetChecked(c bool)
func (*MenuString) SetOnClick ¶
func (m *MenuString) SetOnClick(f func()) *MenuString
func (*MenuString) SetText ¶
func (m *MenuString) SetText(s string)
func (*MenuString) Text ¶
func (m *MenuString) Text() string
type MouseButton ¶
type MouseButton int
const ( MouseButtonLeft MouseButton = iota MouseButtonMiddle MouseButtonRight )
func (MouseButton) String ¶
func (b MouseButton) String() string
type Paintbox ¶
type Paintbox struct {
// contains filtered or unexported fields
}
func NewPaintbox ¶
func NewPaintbox() *Paintbox
func (*Paintbox) SetEnabled ¶
func (c *Paintbox) SetEnabled(e bool)
func (*Paintbox) SetOnPaint ¶
func (*Paintbox) SetOnResize ¶
func (c *Paintbox) SetOnResize(f func())
func (*Paintbox) SetVisible ¶
func (c *Paintbox) SetVisible(v bool)
type Panel ¶
type Panel struct {
// contains filtered or unexported fields
}
func (*Panel) SetEnabled ¶
func (c *Panel) SetEnabled(e bool)
func (*Panel) SetNoBorder ¶
func (p *Panel) SetNoBorder()
func (*Panel) SetOnResize ¶
func (c *Panel) SetOnResize(f func())
func (*Panel) SetRaisedBorder ¶
func (p *Panel) SetRaisedBorder()
func (*Panel) SetSingleLineBorder ¶
func (p *Panel) SetSingleLineBorder()
func (*Panel) SetSunkenBorder ¶
func (p *Panel) SetSunkenBorder()
func (*Panel) SetSunkenThickBorder ¶
func (p *Panel) SetSunkenThickBorder()
func (*Panel) SetVisible ¶
func (c *Panel) SetVisible(v bool)
type ProgressBar ¶
type ProgressBar struct {
// contains filtered or unexported fields
}
func NewProgressBar ¶
func NewProgressBar() *ProgressBar
func (*ProgressBar) SetEnabled ¶
func (c *ProgressBar) SetEnabled(e bool)
func (*ProgressBar) SetOnResize ¶
func (c *ProgressBar) SetOnResize(f func())
func (*ProgressBar) SetValue ¶
func (p *ProgressBar) SetValue(v float64)
func (*ProgressBar) SetVisible ¶
func (c *ProgressBar) SetVisible(v bool)
func (*ProgressBar) Value ¶
func (p *ProgressBar) Value() float64
type RadioButton ¶
type RadioButton struct {
// contains filtered or unexported fields
}
func NewRadioButton ¶
func NewRadioButton() *RadioButton
func (*RadioButton) Checked ¶
func (r *RadioButton) Checked() bool
func (*RadioButton) CursorPosition ¶
func (c *RadioButton) CursorPosition() (start, end int)
If a selection is active, start is the index of the first selected UTF-8 character in Text() and end is the position one character after the end of the selection. The selected text is thus
c.Text()[start:end]
func (*RadioButton) SetChecked ¶
func (r *RadioButton) SetChecked(checked bool)
func (*RadioButton) SetCursorPosition ¶
func (c *RadioButton) SetCursorPosition(pos int)
func (*RadioButton) SetOnChange ¶
func (r *RadioButton) SetOnChange(f func(checked bool))
func (*RadioButton) SetSelection ¶
func (c *RadioButton) SetSelection(start, end int)
type ShortcutKeys ¶
type ShortcutKeys struct { // Mod is a bit field combining any of ModControl, ModShift, ModAlt Mod KeyMod // Rune is the characters to be pressed for the accelerator. Either Rune or // Key must be set, if both are set, Rune takes preference. Rune rune // Key is the virtual key to be pressed, it must be a w32.VK_... constant. Key uint16 }
type StringTable ¶
type StringTable struct {
// contains filtered or unexported fields
}
func NewStringTable ¶
func NewStringTable(header1 string, headers ...string) *StringTable
func (*StringTable) Clear ¶
func (c *StringTable) Clear()
func (*StringTable) ColCount ¶
func (c *StringTable) ColCount() int
func (*StringTable) CursorPosition ¶
func (c *StringTable) CursorPosition() (start, end int)
If a selection is active, start is the index of the first selected UTF-8 character in Text() and end is the position one character after the end of the selection. The selected text is thus
c.Text()[start:end]
func (*StringTable) DeleteRow ¶
func (c *StringTable) DeleteRow(row int)
func (*StringTable) OnSelectionChange ¶
func (c *StringTable) OnSelectionChange() func()
func (*StringTable) RowCount ¶
func (c *StringTable) RowCount() int
func (*StringTable) SelectedRow ¶
func (c *StringTable) SelectedRow() int
func (*StringTable) SetCell ¶
func (c *StringTable) SetCell(col, row int, s string)
func (*StringTable) SetCursorPosition ¶
func (c *StringTable) SetCursorPosition(pos int)
func (*StringTable) SetOnSelectionChange ¶
func (c *StringTable) SetOnSelectionChange(f func())
func (*StringTable) SetSelection ¶
func (c *StringTable) SetSelection(start, end int)
type TextEdit ¶
type TextEdit struct {
// contains filtered or unexported fields
}
func NewTextEdit ¶
func NewTextEdit() *TextEdit
func (*TextEdit) CharacterLimit ¶
func (*TextEdit) CursorPosition ¶
func (c *TextEdit) CursorPosition() (start, end int)
If a selection is active, start is the index of the first selected UTF-8 character in Text() and end is the position one character after the end of the selection. The selected text is thus
c.Text()[start:end]
func (*TextEdit) SetCharacterLimit ¶
func (*TextEdit) SetCursorPosition ¶
func (c *TextEdit) SetCursorPosition(pos int)
func (*TextEdit) SetSelection ¶
func (c *TextEdit) SetSelection(start, end int)
func (*TextEdit) SetWordWrap ¶
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
func NewDialogWindow ¶
func NewDialogWindow() *Window
func (*Window) ClassStyle ¶
func (*Window) ClientBounds ¶
func (*Window) ClientHeight ¶
func (*Window) ClientSize ¶
func (*Window) ClientWidth ¶
func (*Window) DisableAltF4 ¶
func (w *Window) DisableAltF4()
func (*Window) EnableAltF4 ¶
func (w *Window) EnableAltF4()
func (*Window) ExtendedStyle ¶
func (*Window) GetBackground ¶
func (*Window) HideConsoleOnStart ¶
func (w *Window) HideConsoleOnStart()
func (*Window) SetBackground ¶
func (*Window) SetClassName ¶
func (*Window) SetClassStyle ¶
func (*Window) SetClientHeight ¶
func (*Window) SetClientSize ¶
func (*Window) SetClientWidth ¶
func (*Window) SetExtendedStyle ¶
func (*Window) SetIconFromExeResource ¶
func (*Window) SetIconFromFile ¶
func (*Window) SetIconFromMem ¶
func (*Window) SetOnCanClose ¶
SetOnCanClose is passed a function that is called when the window is about to be closed, e.g. when the user hits Alt+F4. If f returns true the window is closed, if f returns false, the window stays open.
func (*Window) SetOnClose ¶
func (w *Window) SetOnClose(f func())
func (*Window) SetOnKeyDown ¶
func (*Window) SetOnKeyUp ¶
func (*Window) SetOnMouseDown ¶
func (w *Window) SetOnMouseDown(f func(button MouseButton, x, y int))
func (*Window) SetOnMouseMove ¶
func (*Window) SetOnMouseUp ¶
func (w *Window) SetOnMouseUp(f func(button MouseButton, x, y int))
func (*Window) SetOnMouseWheel ¶
func (*Window) SetOnResize ¶
func (w *Window) SetOnResize(f func())
func (*Window) SetShortcut ¶
func (w *Window) SetShortcut(keys ShortcutKeys, f func())
func (*Window) ShowConsoleOnStart ¶
func (w *Window) ShowConsoleOnStart()