Documentation
¶
Index ¶
- Constants
- Variables
- func AltDown() bool
- func AppDataPath() (string, error)
- func CommonAppDataPath() (string, error)
- func ControlDown() bool
- func DriveNames() ([]string, error)
- func FormatFloat(f float64, prec int) string
- func FormatFloatGrouped(f float64, prec int) string
- func InitChildWidget(widget, parent Widget, className string, style, exStyle uint32) error
- func InitWidget(widget, parent Widget, className string, style, exStyle uint32) error
- func InitWrapperWidget(widget Widget) error
- func LocalAppDataPath() (string, error)
- func LogErrors() bool
- func MsgBox(owner RootWidget, title, message string, style MsgBoxStyle) int
- func MustRegisterWindowClass(className string)
- func PanicOnError() bool
- func ParseFloat(s string) (float64, error)
- func RegistryKeyString(rootKey *RegistryKey, subKeyPath, valueName string) (value string, err error)
- func RegistryKeyUint32(rootKey *RegistryKey, subKeyPath, valueName string) (value uint32, err error)
- func SetLogErrors(v bool)
- func SetPanicOnError(v bool)
- func SetTranslationFunc(f TranslationFunction)
- func ShiftDown() bool
- type Action
- func (a *Action) Checkable() bool
- func (a *Action) Checked() bool
- func (a *Action) Enabled() bool
- func (a *Action) EnabledCondition() Condition
- func (a *Action) Exclusive() bool
- func (a *Action) Image() *Bitmap
- func (a *Action) IsSeparator() bool
- func (a *Action) SetCheckable(value bool) (err error)
- func (a *Action) SetChecked(value bool) (err error)
- func (a *Action) SetEnabled(value bool) (err error)
- func (a *Action) SetEnabledCondition(c Condition)
- func (a *Action) SetExclusive(value bool) (err error)
- func (a *Action) SetImage(value *Bitmap) (err error)
- func (a *Action) SetShortcut(shortcut Shortcut) (err error)
- func (a *Action) SetText(value string) (err error)
- func (a *Action) SetToolTip(value string) (err error)
- func (a *Action) SetVisible(value bool) (err error)
- func (a *Action) SetVisibleCondition(c Condition)
- func (a *Action) Shortcut() Shortcut
- func (a *Action) Text() string
- func (a *Action) ToolTip() string
- func (a *Action) Triggered() *Event
- func (a *Action) Visible() bool
- func (a *Action) VisibleCondition() Condition
- type ActionList
- func (l *ActionList) Add(action *Action) error
- func (l *ActionList) AddMenu(menu *Menu) (*Action, error)
- func (l *ActionList) At(index int) *Action
- func (l *ActionList) Clear() error
- func (l *ActionList) Contains(action *Action) bool
- func (l *ActionList) Index(action *Action) int
- func (l *ActionList) Insert(index int, action *Action) error
- func (l *ActionList) InsertMenu(index int, menu *Menu) (*Action, error)
- func (l *ActionList) Len() int
- func (l *ActionList) Remove(action *Action) error
- func (l *ActionList) RemoveAt(index int) error
- type Alignment1D
- type Alignment2D
- type Application
- func (app *Application) Exit(exitCode int)
- func (app *Application) ExitCode() int
- func (app *Application) OrganizationName() string
- func (app *Application) Panicking() *ErrorEvent
- func (app *Application) ProductName() string
- func (app *Application) SetOrganizationName(value string)
- func (app *Application) SetProductName(value string)
- func (app *Application) SetSettings(value Settings)
- func (app *Application) Settings() Settings
- type BindingValueProvider
- type Bitmap
- type BitmapBrush
- type BoxLayout
- func (l *BoxLayout) Container() Container
- func (l *BoxLayout) LayoutFlags() LayoutFlags
- func (l *BoxLayout) Margins() Margins
- func (l *BoxLayout) MinSize() Size
- func (l *BoxLayout) Orientation() Orientation
- func (l *BoxLayout) SetContainer(value Container)
- func (l *BoxLayout) SetMargins(value Margins) error
- func (l *BoxLayout) SetOrientation(value Orientation) error
- func (l *BoxLayout) SetSpacing(value int) error
- func (l *BoxLayout) SetStretchFactor(widget Widget, factor int) error
- func (l *BoxLayout) Spacing() int
- func (l *BoxLayout) StretchFactor(widget Widget) int
- func (l *BoxLayout) Update(reset bool) error
- type Brush
- type Button
- func (b *Button) Checked() bool
- func (b *Button) CheckedChanged() *Event
- func (b *Button) Clicked() *Event
- func (b *Button) SetChecked(checked bool)
- func (b *Button) SetText(value string) error
- func (b *Button) Text() string
- func (b *Button) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type CancelEvent
- type CancelEventHandler
- type CancelEventPublisher
- type Canvas
- func (c *Canvas) Bounds() Rectangle
- func (c *Canvas) Dispose()
- func (c *Canvas) DrawEllipse(pen Pen, bounds Rectangle) error
- func (c *Canvas) DrawImage(image Image, location Point) error
- func (c *Canvas) DrawImageStretched(image Image, bounds Rectangle) error
- func (c *Canvas) DrawLine(pen Pen, from, to Point) error
- func (c *Canvas) DrawRectangle(pen Pen, bounds Rectangle) error
- func (c *Canvas) DrawText(text string, font *Font, color Color, bounds Rectangle, format DrawTextFormat) error
- func (c *Canvas) FillEllipse(brush Brush, bounds Rectangle) error
- func (c *Canvas) FillRectangle(brush Brush, bounds Rectangle) error
- func (c *Canvas) MeasureText(text string, font *Font, bounds Rectangle, format DrawTextFormat) (boundsMeasured Rectangle, runesFitted int, err error)
- type CheckBox
- type ClipboardService
- type CloseEvent
- type CloseEventHandler
- type CloseEventPublisher
- type CloseReason
- type Color
- type ComboBox
- func (cb *ComboBox) BindingMember() string
- func (cb *ComboBox) CurrentIndex() int
- func (cb *ComboBox) CurrentIndexChanged() *Event
- func (cb *ComboBox) DisplayMember() string
- func (cb *ComboBox) Editable() bool
- func (cb *ComboBox) Format() string
- func (*ComboBox) LayoutFlags() LayoutFlags
- func (cb *ComboBox) MinSizeHint() Size
- func (cb *ComboBox) Model() interface{}
- func (cb *ComboBox) Precision() int
- func (cb *ComboBox) SetBindingMember(bindingMember string) error
- func (cb *ComboBox) SetCurrentIndex(value int) error
- func (cb *ComboBox) SetDisplayMember(displayMember string) error
- func (cb *ComboBox) SetFormat(value string)
- func (cb *ComboBox) SetModel(mdl interface{}) error
- func (cb *ComboBox) SetPrecision(value int)
- func (cb *ComboBox) SetText(value string) error
- func (cb *ComboBox) SetTextSelection(start, end int)
- func (cb *ComboBox) SizeHint() Size
- func (cb *ComboBox) Text() string
- func (cb *ComboBox) TextSelection() (start, end int)
- func (cb *ComboBox) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type Composite
- type Condition
- type Container
- type ContainerBase
- func (cb *ContainerBase) Children() *WidgetList
- func (cb *ContainerBase) DataBinder() *DataBinder
- func (cb *ContainerBase) Layout() Layout
- func (cb *ContainerBase) LayoutFlags() LayoutFlags
- func (cb *ContainerBase) MinSizeHint() Size
- func (cb *ContainerBase) Persistent() bool
- func (cb *ContainerBase) RestoreState() error
- func (cb *ContainerBase) SaveState() error
- func (cb *ContainerBase) SetDataBinder(db *DataBinder)
- func (cb *ContainerBase) SetEnabled(enabled bool)
- func (cb *ContainerBase) SetFont(f *Font)
- func (cb *ContainerBase) SetLayout(value Layout) error
- func (cb *ContainerBase) SetPersistent(value bool)
- func (cb *ContainerBase) SetSuspended(suspend bool)
- func (cb *ContainerBase) SizeHint() Size
- func (cb *ContainerBase) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type CosmeticPen
- type Cursor
- func CursorAppStarting() Cursor
- func CursorArrow() Cursor
- func CursorCross() Cursor
- func CursorHand() Cursor
- func CursorHelp() Cursor
- func CursorIBeam() Cursor
- func CursorIcon() Cursor
- func CursorNo() Cursor
- func CursorSize() Cursor
- func CursorSizeAll() Cursor
- func CursorSizeNESW() Cursor
- func CursorSizeNS() Cursor
- func CursorSizeNWSE() Cursor
- func CursorSizeWE() Cursor
- func CursorUpArrow() Cursor
- func CursorWait() Cursor
- func NewCursorFromImage(im image.Image, hotspot image.Point) (Cursor, error)
- type CustomWidget
- func (cw *CustomWidget) ClearsBackground() bool
- func (cw *CustomWidget) InvalidatesOnResize() bool
- func (*CustomWidget) LayoutFlags() LayoutFlags
- func (cw *CustomWidget) SetClearsBackground(value bool)
- func (cw *CustomWidget) SetInvalidatesOnResize(value bool)
- func (cw *CustomWidget) SizeHint() Size
- func (cw *CustomWidget) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type DataBinder
- func (db *DataBinder) AutoSubmit() bool
- func (db *DataBinder) BoundWidgets() []Widget
- func (db *DataBinder) CanSubmit() bool
- func (db *DataBinder) CanSubmitChanged() *Event
- func (db *DataBinder) DataSource() interface{}
- func (db *DataBinder) ErrorPresenter() ErrorPresenter
- func (db *DataBinder) Reset() error
- func (db *DataBinder) SetAutoSubmit(autoSubmit bool)
- func (db *DataBinder) SetBoundWidgets(boundWidgets []Widget)
- func (db *DataBinder) SetDataSource(dataSource interface{}) error
- func (db *DataBinder) SetErrorPresenter(ep ErrorPresenter)
- func (db *DataBinder) Submit() error
- func (db *DataBinder) Submitted() *Event
- type DateEdit
- func (*DateEdit) LayoutFlags() LayoutFlags
- func (de *DateEdit) MinSizeHint() Size
- func (de *DateEdit) Range() (min, max time.Time)
- func (de *DateEdit) SetRange(min, max time.Time) error
- func (de *DateEdit) SetValue(value time.Time) error
- func (de *DateEdit) SizeHint() Size
- func (de *DateEdit) Value() time.Time
- func (de *DateEdit) ValueChanged() *Event
- func (de *DateEdit) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type DelegateCondition
- type Dialog
- func (dlg *Dialog) Accept()
- func (dlg *Dialog) Cancel()
- func (dlg *Dialog) CancelButton() *PushButton
- func (dlg *Dialog) Close(result int)
- func (dlg *Dialog) DefaultButton() *PushButton
- func (dlg *Dialog) Result() int
- func (dlg *Dialog) Run() int
- func (dlg *Dialog) SetCancelButton(button *PushButton) error
- func (dlg *Dialog) SetDefaultButton(button *PushButton) error
- func (dlg *Dialog) Show()
- type DrawTextFormat
- type Error
- type ErrorEvent
- type ErrorEventHandler
- type ErrorEventPublisher
- type ErrorPresenter
- type Event
- type EventHandler
- type EventPublisher
- type FileDialog
- type Font
- type FontStyle
- type GeometricPen
- type GridLayout
- func (l *GridLayout) ColumnStretchFactor(column int) int
- func (l *GridLayout) Container() Container
- func (l *GridLayout) LayoutFlags() LayoutFlags
- func (l *GridLayout) Margins() Margins
- func (l *GridLayout) MinSize() Size
- func (l *GridLayout) Range(widget Widget) (r Rectangle, ok bool)
- func (l *GridLayout) RowStretchFactor(row int) int
- func (l *GridLayout) SetColumnStretchFactor(column, factor int) error
- func (l *GridLayout) SetContainer(value Container)
- func (l *GridLayout) SetMargins(value Margins) error
- func (l *GridLayout) SetRange(widget Widget, r Rectangle) error
- func (l *GridLayout) SetRowStretchFactor(row, factor int) error
- func (l *GridLayout) SetSpacing(value int) error
- func (l *GridLayout) Spacing() int
- func (l *GridLayout) Update(reset bool) error
- type GroupBox
- func (gb *GroupBox) Children() *WidgetList
- func (gb *GroupBox) ClientBounds() Rectangle
- func (gb *GroupBox) DataBinder() *DataBinder
- func (gb *GroupBox) Layout() Layout
- func (gb *GroupBox) LayoutFlags() LayoutFlags
- func (gb *GroupBox) MinSizeHint() Size
- func (gb *GroupBox) SetDataBinder(dataBinder *DataBinder)
- func (gb *GroupBox) SetFont(value *Font)
- func (gb *GroupBox) SetLayout(value Layout) error
- func (gb *GroupBox) SetSuspended(suspend bool)
- func (gb *GroupBox) SetTitle(value string) error
- func (gb *GroupBox) SizeHint() Size
- func (gb *GroupBox) Title() string
- func (gb *GroupBox) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type HatchBrush
- type HatchStyle
- type Icon
- type Image
- type ImageList
- type ImageProvider
- type ImageView
- type Imager
- type IndexList
- type IniFileSettings
- func (ifs *IniFileSettings) ExpireDuration() time.Duration
- func (ifs *IniFileSettings) FilePath() string
- func (ifs *IniFileSettings) Get(key string) (string, bool)
- func (ifs *IniFileSettings) Load() error
- func (ifs *IniFileSettings) Put(key, value string) error
- func (ifs *IniFileSettings) PutExpiring(key, value string) error
- func (ifs *IniFileSettings) Remove(key string) error
- func (ifs *IniFileSettings) Save() error
- func (ifs *IniFileSettings) SetExpireDuration(expireDuration time.Duration)
- func (ifs *IniFileSettings) Timestamp(key string) (time.Time, bool)
- type IntEvent
- type IntEventHandler
- type IntEventPublisher
- type ItemChecker
- type Key
- type KeyEvent
- type KeyEventHandler
- type KeyEventPublisher
- type Label
- type Layout
- type LayoutFlags
- type LineEdit
- func (le *LineEdit) CueBanner() string
- func (le *LineEdit) EditingFinished() *Event
- func (le *LineEdit) LayoutFlags() (lf LayoutFlags)
- func (le *LineEdit) MaxLength() int
- func (le *LineEdit) MinSizeHint() Size
- func (le *LineEdit) PasswordMode() bool
- func (le *LineEdit) ReadOnly() bool
- func (le *LineEdit) SetCueBanner(value string) error
- func (le *LineEdit) SetMaxLength(value int)
- func (le *LineEdit) SetPasswordMode(value bool)
- func (le *LineEdit) SetReadOnly(readOnly bool) error
- func (le *LineEdit) SetText(value string) error
- func (le *LineEdit) SetTextSelection(start, end int)
- func (le *LineEdit) SizeHint() (size Size)
- func (le *LineEdit) Text() string
- func (le *LineEdit) TextChanged() *Event
- func (le *LineEdit) TextSelection() (start, end int)
- func (le *LineEdit) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type LineErrorPresenter
- func (*LineErrorPresenter) LayoutFlags() LayoutFlags
- func (lep *LineErrorPresenter) MinSizeHint() Size
- func (lep *LineErrorPresenter) PresentError(err error, widget Widget)
- func (lep *LineErrorPresenter) SizeHint() Size
- func (lep *LineErrorPresenter) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type ListBox
- func (lb *ListBox) CurrentIndex() int
- func (lb *ListBox) CurrentIndexChanged() *Event
- func (lb *ListBox) DataMember() string
- func (lb *ListBox) DblClicked() *Event
- func (lb *ListBox) Format() string
- func (*ListBox) LayoutFlags() LayoutFlags
- func (lb *ListBox) Model() interface{}
- func (lb *ListBox) Precision() int
- func (lb *ListBox) SetCurrentIndex(value int) error
- func (lb *ListBox) SetDataMember(dataMember string) error
- func (lb *ListBox) SetFormat(value string)
- func (lb *ListBox) SetModel(mdl interface{}) error
- func (lb *ListBox) SetPrecision(value int)
- func (lb *ListBox) SizeHint() Size
- func (lb *ListBox) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type ListModel
- type ListModelBase
- type MainWindow
- func (mw *MainWindow) Children() *WidgetList
- func (mw *MainWindow) ClientBounds() Rectangle
- func (mw *MainWindow) ContextMenu() *Menu
- func (mw *MainWindow) Fullscreen() bool
- func (mw *MainWindow) Layout() Layout
- func (mw *MainWindow) Menu() *Menu
- func (mw *MainWindow) RestoreState() error
- func (mw *MainWindow) SaveState() error
- func (mw *MainWindow) SetContextMenu(contextMenu *Menu)
- func (mw *MainWindow) SetFullscreen(fullscreen bool) error
- func (mw *MainWindow) SetLayout(value Layout) error
- func (mw *MainWindow) SetVisible(visible bool)
- func (mw *MainWindow) ToolBar() *ToolBar
- func (mw *MainWindow) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type Margins
- type Menu
- type Metafile
- type Modifiers
- type MouseButton
- type MouseEvent
- type MouseEventHandler
- type MouseEventPublisher
- type MsgBoxStyle
- type MutableCondition
- type NotifyIcon
- func (ni *NotifyIcon) ContextMenu() *Menu
- func (ni *NotifyIcon) Dispose() error
- func (ni *NotifyIcon) Icon() *Icon
- func (ni *NotifyIcon) MouseDown() *MouseEvent
- func (ni *NotifyIcon) MouseUp() *MouseEvent
- func (ni *NotifyIcon) SetIcon(icon *Icon) error
- func (ni *NotifyIcon) SetToolTip(toolTip string) error
- func (ni *NotifyIcon) SetVisible(visible bool) error
- func (ni *NotifyIcon) ShowCustom(title, info string) error
- func (ni *NotifyIcon) ShowError(title, info string) error
- func (ni *NotifyIcon) ShowInfo(title, info string) error
- func (ni *NotifyIcon) ShowMessage(title, info string) error
- func (ni *NotifyIcon) ShowWarning(title, info string) error
- func (ni *NotifyIcon) ToolTip() string
- func (ni *NotifyIcon) Visible() bool
- type NumberEdit
- func (ne *NumberEdit) Decimals() int
- func (ne *NumberEdit) Enabled() bool
- func (ne *NumberEdit) Font() *Font
- func (ne *NumberEdit) Increment() float64
- func (*NumberEdit) LayoutFlags() LayoutFlags
- func (ne *NumberEdit) MaxValue() float64
- func (ne *NumberEdit) MinSizeHint() Size
- func (ne *NumberEdit) MinValue() float64
- func (ne *NumberEdit) Prefix() string
- func (ne *NumberEdit) SetDecimals(decimals int) error
- func (ne *NumberEdit) SetEnabled(value bool)
- func (ne *NumberEdit) SetFocus() error
- func (ne *NumberEdit) SetFont(value *Font)
- func (ne *NumberEdit) SetIncrement(increment float64) error
- func (ne *NumberEdit) SetPrefix(prefix string) error
- func (ne *NumberEdit) SetRange(min, max float64) error
- func (ne *NumberEdit) SetSuffix(suffix string) error
- func (ne *NumberEdit) SetTextSelection(start, end int)
- func (ne *NumberEdit) SetValue(value float64) error
- func (ne *NumberEdit) SizeHint() Size
- func (ne *NumberEdit) Suffix() string
- func (ne *NumberEdit) TextSelection() (start, end int)
- func (ne *NumberEdit) Value() float64
- func (ne *NumberEdit) ValueChanged() *Event
- func (ne *NumberEdit) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type Orientation
- type PIState
- type PaintFunc
- type Pen
- type PenStyle
- type Persistable
- type Point
- type Populator
- type ProgressBar
- func (*ProgressBar) LayoutFlags() LayoutFlags
- func (pb *ProgressBar) MaxValue() int
- func (pb *ProgressBar) MinSizeHint() Size
- func (pb *ProgressBar) MinValue() int
- func (pb *ProgressBar) SetRange(min, max int)
- func (pb *ProgressBar) SetValue(value int)
- func (pb *ProgressBar) SizeHint() Size
- func (pb *ProgressBar) Value() int
- type ProgressIndicator
- func (pi *ProgressIndicator) Completed() uint32
- func (pi *ProgressIndicator) SetCompleted(completed uint32) error
- func (pi *ProgressIndicator) SetState(state PIState) error
- func (pi *ProgressIndicator) SetTotal(total uint32)
- func (pi *ProgressIndicator) State() PIState
- func (pi *ProgressIndicator) Total() uint32
- type Property
- func NewBoolProperty(get func() bool, set func(b bool) error, changed *Event) Property
- func NewProperty(get func() interface{}, set func(v interface{}) error, changed *Event) Property
- func NewReadOnlyBoolProperty(get func() bool, changed *Event) Property
- func NewReadOnlyProperty(get func() interface{}, changed *Event) Property
- type PushButton
- type RadioButton
- func (rb *RadioButton) Group() *RadioButtonGroup
- func (*RadioButton) LayoutFlags() LayoutFlags
- func (rb *RadioButton) MinSizeHint() Size
- func (rb *RadioButton) SetValue(value interface{})
- func (rb *RadioButton) SizeHint() Size
- func (rb *RadioButton) Value() interface{}
- func (rb *RadioButton) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type RadioButtonGroup
- type RangeValidator
- type Rectangle
- type ReflectListModel
- type ReflectListModelBase
- type ReflectTableModel
- type ReflectTableModelBase
- type RegexpValidator
- type RegistryKey
- type RootWidget
- type Settings
- type Shortcut
- type Size
- type SolidColorBrush
- type SortOrder
- type SortedReflectTableModelBase
- type Sorter
- type SorterBase
- type Spacer
- type Splitter
- func (s *Splitter) HandleWidth() int
- func (s *Splitter) LayoutFlags() LayoutFlags
- func (s *Splitter) Orientation() Orientation
- func (s *Splitter) Persistent() bool
- func (s *Splitter) RestoreState() error
- func (s *Splitter) SaveState() error
- func (s *Splitter) SetHandleWidth(value int) error
- func (s *Splitter) SetLayout(value Layout) error
- func (s *Splitter) SetPersistent(value bool)
- func (s *Splitter) SizeHint() Size
- type SystemColorBrush
- type TabPage
- type TabPageList
- func (l *TabPageList) Add(item *TabPage) error
- func (l *TabPageList) At(index int) *TabPage
- func (l *TabPageList) Clear() error
- func (l *TabPageList) Contains(item *TabPage) bool
- func (l *TabPageList) Index(item *TabPage) int
- func (l *TabPageList) Insert(index int, item *TabPage) error
- func (l *TabPageList) Len() int
- func (l *TabPageList) Remove(item *TabPage) error
- func (l *TabPageList) RemoveAt(index int) error
- type TabWidget
- func (tw *TabWidget) CurrentIndex() int
- func (tw *TabWidget) CurrentIndexChanged() *Event
- func (tw *TabWidget) LayoutFlags() LayoutFlags
- func (tw *TabWidget) MinSizeHint() Size
- func (tw *TabWidget) Pages() *TabPageList
- func (tw *TabWidget) Persistent() bool
- func (tw *TabWidget) RestoreState() error
- func (tw *TabWidget) SaveState() error
- func (tw *TabWidget) SetCurrentIndex(index int) error
- func (tw *TabWidget) SetEnabled(enabled bool)
- func (tw *TabWidget) SetFont(f *Font)
- func (tw *TabWidget) SetPersistent(value bool)
- func (tw *TabWidget) SizeHint() Size
- func (tw *TabWidget) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type TableModel
- type TableModelBase
- type TableView
- func (tv *TableView) AlternatingRowBGColor() Color
- func (tv *TableView) CheckBoxes() bool
- func (tv *TableView) ColumnClicked() *IntEvent
- func (tv *TableView) Columns() *TableViewColumnList
- func (tv *TableView) ColumnsOrderable() bool
- func (tv *TableView) ColumnsSizable() bool
- func (tv *TableView) CurrentIndex() int
- func (tv *TableView) CurrentIndexChanged() *Event
- func (tv *TableView) Dispose()
- func (tv *TableView) ItemActivated() *Event
- func (tv *TableView) ItemStateChangedEventDelay() int
- func (tv *TableView) LastColumnStretched() bool
- func (*TableView) LayoutFlags() LayoutFlags
- func (tv *TableView) MinSizeHint() Size
- func (tv *TableView) Model() interface{}
- func (tv *TableView) Persistent() bool
- func (tv *TableView) RestoreState() error
- func (tv *TableView) RowsPerPage() int
- func (tv *TableView) SaveState() error
- func (tv *TableView) SelectedIndexes() *IndexList
- func (tv *TableView) SelectedIndexesChanged() *Event
- func (tv *TableView) SetAlternatingRowBGColor(c Color)
- func (tv *TableView) SetCheckBoxes(value bool)
- func (tv *TableView) SetColumnsOrderable(enabled bool)
- func (tv *TableView) SetColumnsSizable(b bool) error
- func (tv *TableView) SetCurrentIndex(value int) error
- func (tv *TableView) SetItemStateChangedEventDelay(delay int)
- func (tv *TableView) SetLastColumnStretched(value bool) error
- func (tv *TableView) SetModel(mdl interface{}) error
- func (tv *TableView) SetPersistent(value bool)
- func (tv *TableView) SetSingleItemSelection(value bool) error
- func (tv *TableView) SingleItemSelection() bool
- func (tv *TableView) SizeHint() Size
- func (tv *TableView) StretchLastColumn() error
- func (tv *TableView) UpdateItem(index int) error
- func (tv *TableView) VisibleColumnsInDisplayOrder() []*TableViewColumn
- func (tv *TableView) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type TableViewColumn
- func (tvc *TableViewColumn) Alignment() Alignment1D
- func (tvc *TableViewColumn) DataMember() string
- func (tvc *TableViewColumn) Format() string
- func (tvc *TableViewColumn) Precision() int
- func (tvc *TableViewColumn) SetAlignment(alignment Alignment1D) (err error)
- func (tvc *TableViewColumn) SetDataMember(dataMember string)
- func (tvc *TableViewColumn) SetFormat(format string) (err error)
- func (tvc *TableViewColumn) SetPrecision(precision int) (err error)
- func (tvc *TableViewColumn) SetTitle(title string) (err error)
- func (tvc *TableViewColumn) SetTitleOverride(titleOverride string) (err error)
- func (tvc *TableViewColumn) SetVisible(visible bool) (err error)
- func (tvc *TableViewColumn) SetWidth(width int) (err error)
- func (tvc *TableViewColumn) Title() string
- func (tvc *TableViewColumn) TitleEffective() string
- func (tvc *TableViewColumn) TitleOverride() string
- func (tvc *TableViewColumn) Visible() bool
- func (tvc *TableViewColumn) Width() int
- type TableViewColumnList
- func (l *TableViewColumnList) Add(item *TableViewColumn) error
- func (l *TableViewColumnList) At(index int) *TableViewColumn
- func (l *TableViewColumnList) Clear() error
- func (l *TableViewColumnList) Contains(item *TableViewColumn) bool
- func (l *TableViewColumnList) Index(item *TableViewColumn) int
- func (l *TableViewColumnList) Insert(index int, item *TableViewColumn) error
- func (l *TableViewColumnList) Len() int
- func (l *TableViewColumnList) Remove(item *TableViewColumn) error
- func (l *TableViewColumnList) RemoveAt(index int) error
- type TextEdit
- func (te *TextEdit) AppendText(value string)
- func (*TextEdit) LayoutFlags() LayoutFlags
- func (te *TextEdit) MinSizeHint() Size
- func (te *TextEdit) ReadOnly() bool
- func (te *TextEdit) ReplaceSelectedText(text string, canUndo bool)
- func (te *TextEdit) SetReadOnly(readOnly bool) error
- func (te *TextEdit) SetText(value string) error
- func (te *TextEdit) SetTextSelection(start, end int)
- func (te *TextEdit) SizeHint() Size
- func (te *TextEdit) Text() string
- func (te *TextEdit) TextChanged() *Event
- func (te *TextEdit) TextLength() int
- func (te *TextEdit) TextSelection() (start, end int)
- func (te *TextEdit) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type ToolBar
- func (tb *ToolBar) Actions() *ActionList
- func (tb *ToolBar) DefaultButtonWidth() int
- func (tb *ToolBar) ImageList() *ImageList
- func (tb *ToolBar) LayoutFlags() LayoutFlags
- func (tb *ToolBar) MaxTextRows() int
- func (tb *ToolBar) MinSizeHint() Size
- func (tb *ToolBar) SetDefaultButtonWidth(width int) error
- func (tb *ToolBar) SetImageList(value *ImageList)
- func (tb *ToolBar) SetMaxTextRows(maxTextRows int) error
- func (tb *ToolBar) SizeHint() Size
- func (tb *ToolBar) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type ToolButton
- type ToolTip
- func (tt *ToolTip) AddTool(tool Widget) error
- func (*ToolTip) LayoutFlags() LayoutFlags
- func (tt *ToolTip) RemoveTool(tool Widget) error
- func (tt *ToolTip) SetErrorTitle(title string) error
- func (tt *ToolTip) SetInfoTitle(title string) error
- func (tt *ToolTip) SetText(tool Widget, text string) error
- func (tt *ToolTip) SetTitle(title string) error
- func (tt *ToolTip) SetWarningTitle(title string) error
- func (tt *ToolTip) SizeHint() Size
- func (tt *ToolTip) Text(tool Widget) string
- func (tt *ToolTip) Title() string
- type TopLevelWindow
- func (tlw *TopLevelWindow) Close() error
- func (tlw *TopLevelWindow) Closing() *CloseEvent
- func (tlw *TopLevelWindow) Enabled() bool
- func (tlw *TopLevelWindow) Font() *Font
- func (tlw *TopLevelWindow) Hide()
- func (tlw *TopLevelWindow) Icon() *Icon
- func (tlw *TopLevelWindow) LayoutFlags() LayoutFlags
- func (tlw *TopLevelWindow) Owner() RootWidget
- func (tlw *TopLevelWindow) ProgressIndicator() *ProgressIndicator
- func (tlw *TopLevelWindow) RestoreState() error
- func (tlw *TopLevelWindow) Run() int
- func (tlw *TopLevelWindow) SaveState() error
- func (tlw *TopLevelWindow) SetEnabled(enabled bool)
- func (tlw *TopLevelWindow) SetIcon(icon *Icon)
- func (tlw *TopLevelWindow) SetOwner(value RootWidget) error
- func (tlw *TopLevelWindow) SetTitle(value string) error
- func (tlw *TopLevelWindow) Show()
- func (tlw *TopLevelWindow) SizeHint() Size
- func (tlw *TopLevelWindow) Starting() *Event
- func (tlw *TopLevelWindow) Title() string
- func (tlw *TopLevelWindow) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type TranslationFunction
- type TreeItem
- type TreeItemEvent
- type TreeItemEventHandler
- type TreeItemEventPublisher
- type TreeModel
- type TreeModelBase
- type TreeView
- func (tv *TreeView) CurrentItem() TreeItem
- func (tv *TreeView) CurrentItemChanged() *Event
- func (tv *TreeView) Dispose()
- func (tv *TreeView) ItemAt(x, y int) TreeItem
- func (tv *TreeView) ItemCollapsed() *TreeItemEvent
- func (tv *TreeView) ItemExpanded() *TreeItemEvent
- func (*TreeView) LayoutFlags() LayoutFlags
- func (tv *TreeView) Model() TreeModel
- func (tv *TreeView) SetCurrentItem(item TreeItem) error
- func (tv *TreeView) SetModel(model TreeModel) error
- func (tv *TreeView) SizeHint() Size
- func (tv *TreeView) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type Validator
- type WebView
- func (wv *WebView) Dispose()
- func (*WebView) LayoutFlags() LayoutFlags
- func (wv *WebView) Refresh() error
- func (wv *WebView) SetURL(url string) error
- func (*WebView) SizeHint() Size
- func (wv *WebView) URL() (url string, err error)
- func (wv *WebView) URLChanged() *Event
- func (wv *WebView) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- type Widget
- type WidgetBase
- func (wb *WidgetBase) Background() Brush
- func (wb *WidgetBase) BaseWidget() *WidgetBase
- func (wb *WidgetBase) Bounds() Rectangle
- func (wb *WidgetBase) BringToTop() error
- func (wb *WidgetBase) ClientBounds() Rectangle
- func (wb *WidgetBase) ContextMenu() *Menu
- func (wb *WidgetBase) CreateCanvas() (*Canvas, error)
- func (wb *WidgetBase) Cursor() Cursor
- func (wb *WidgetBase) DescendantByName(name string) (widget Widget)
- func (wb *WidgetBase) Dispose()
- func (wb *WidgetBase) Enabled() bool
- func (wb *WidgetBase) Font() *Font
- func (wb *WidgetBase) Handle() HWND
- func (wb *WidgetBase) Height() int
- func (wb *WidgetBase) Invalidate() error
- func (wb *WidgetBase) IsDisposed() bool
- func (wb *WidgetBase) KeyDown() *KeyEvent
- func (wb *WidgetBase) KeyPress() *KeyEvent
- func (wb *WidgetBase) KeyUp() *KeyEvent
- func (wb *WidgetBase) LayoutFlags() LayoutFlags
- func (wb *WidgetBase) MaxSize() Size
- func (wb *WidgetBase) MinSize() Size
- func (wb *WidgetBase) MinSizeHint() Size
- func (wb *WidgetBase) MouseDown() *MouseEvent
- func (wb *WidgetBase) MouseMove() *MouseEvent
- func (wb *WidgetBase) MouseUp() *MouseEvent
- func (wb *WidgetBase) MustRegisterProperty(name string, property Property)
- func (wb *WidgetBase) Name() string
- func (wb *WidgetBase) Parent() Container
- func (wb *WidgetBase) Property(name string) Property
- func (wb *WidgetBase) RootWidget() RootWidget
- func (wb *WidgetBase) SendMessage(msg uint32, wParam, lParam uintptr) uintptr
- func (wb *WidgetBase) SetBackground(value Brush)
- func (wb *WidgetBase) SetBounds(bounds Rectangle) error
- func (wb *WidgetBase) SetClientSize(value Size) error
- func (wb *WidgetBase) SetContextMenu(value *Menu)
- func (wb *WidgetBase) SetCursor(value Cursor)
- func (wb *WidgetBase) SetEnabled(value bool)
- func (wb *WidgetBase) SetFocus() error
- func (wb *WidgetBase) SetFont(value *Font)
- func (wb *WidgetBase) SetHeight(value int) error
- func (wb *WidgetBase) SetMinMaxSize(min, max Size) error
- func (wb *WidgetBase) SetName(name string)
- func (wb *WidgetBase) SetParent(value Container) (err error)
- func (wb *WidgetBase) SetSize(size Size) error
- func (wb *WidgetBase) SetSuspended(suspend bool)
- func (wb *WidgetBase) SetToolTipText(s string) error
- func (wb *WidgetBase) SetVisible(visible bool)
- func (wb *WidgetBase) SetWidth(value int) error
- func (wb *WidgetBase) SetX(value int) error
- func (wb *WidgetBase) SetY(value int) error
- func (wb *WidgetBase) Size() Size
- func (wb *WidgetBase) SizeChanged() *Event
- func (wb *WidgetBase) SizeHint() Size
- func (wb *WidgetBase) Suspended() bool
- func (wb *WidgetBase) Synchronize(f func())
- func (wb *WidgetBase) ToolTipText() string
- func (wb *WidgetBase) Visible() bool
- func (wb *WidgetBase) Width() int
- func (wb *WidgetBase) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
- func (wb *WidgetBase) X() int
- func (wb *WidgetBase) Y() int
- type WidgetList
- func (l *WidgetList) Add(item Widget) error
- func (l *WidgetList) At(index int) Widget
- func (l *WidgetList) Clear() error
- func (l *WidgetList) Contains(item Widget) bool
- func (l *WidgetList) Index(item Widget) int
- func (l *WidgetList) Insert(index int, item Widget) error
- func (l *WidgetList) Len() int
- func (l *WidgetList) Remove(item Widget) error
- func (l *WidgetList) RemoveAt(index int) error
Constants ¶
const ( DlgCmdNone = 0 DlgCmdOK = IDOK DlgCmdCancel = IDCANCEL DlgCmdAbort = IDABORT DlgCmdRetry = IDRETRY DlgCmdIgnore = IDIGNORE DlgCmdYes = IDYES DlgCmdNo = IDNO DlgCmdClose = IDCLOSE DlgCmdHelp = IDHELP DlgCmdTryAgain = IDTRYAGAIN DlgCmdContinue = IDCONTINUE DlgCmdTimeout = IDTIMEOUT )
const ( KeyLButton Key = VK_LBUTTON KeyRButton = VK_RBUTTON KeyCancel = VK_CANCEL KeyMButton = VK_MBUTTON KeyXButton1 = VK_XBUTTON1 KeyXButton2 = VK_XBUTTON2 KeyBack = VK_BACK KeyTab = VK_TAB KeyClear = VK_CLEAR KeyReturn = VK_RETURN KeyShift = VK_SHIFT KeyControl = VK_CONTROL KeyAlt = VK_MENU KeyMenu = VK_MENU KeyPause = VK_PAUSE KeyCapital = VK_CAPITAL KeyKana = VK_KANA KeyHangul = VK_HANGUL KeyJunja = VK_JUNJA KeyFinal = VK_FINAL KeyHanja = VK_HANJA KeyKanji = VK_KANJI KeyEscape = VK_ESCAPE KeyConvert = VK_CONVERT KeyNonconvert = VK_NONCONVERT KeyAccept = VK_ACCEPT KeyModeChange = VK_MODECHANGE KeySpace = VK_SPACE KeyPrior = VK_PRIOR KeyNext = VK_NEXT KeyEnd = VK_END KeyHome = VK_HOME KeyLeft = VK_LEFT KeyUp = VK_UP KeyRight = VK_RIGHT KeyDown = VK_DOWN KeySelect = VK_SELECT KeyPrint = VK_PRINT KeyExecute = VK_EXECUTE KeySnapshot = VK_SNAPSHOT KeyInsert = VK_INSERT KeyDelete = VK_DELETE KeyHelp = VK_HELP Key0 = 0x30 Key1 = 0x31 Key2 = 0x32 Key3 = 0x33 Key4 = 0x34 Key5 = 0x35 Key6 = 0x36 Key7 = 0x37 Key8 = 0x38 Key9 = 0x39 KeyA = 0x41 KeyB = 0x42 KeyC = 0x43 KeyD = 0x44 KeyE = 0x45 KeyF = 0x46 KeyG = 0x47 KeyH = 0x48 KeyI = 0x49 KeyJ = 0x4A KeyK = 0x4B KeyL = 0x4C KeyM = 0x4D KeyN = 0x4E KeyO = 0x4F KeyP = 0x50 KeyQ = 0x51 KeyR = 0x52 KeyS = 0x53 KeyT = 0x54 KeyU = 0x55 KeyV = 0x56 KeyW = 0x57 KeyX = 0x58 KeyY = 0x59 KeyZ = 0x5A KeyLWin = VK_LWIN KeyRWin = VK_RWIN KeyApps = VK_APPS KeySleep = VK_SLEEP KeyNumpad0 = VK_NUMPAD0 KeyNumpad1 = VK_NUMPAD1 KeyNumpad2 = VK_NUMPAD2 KeyNumpad3 = VK_NUMPAD3 KeyNumpad4 = VK_NUMPAD4 KeyNumpad5 = VK_NUMPAD5 KeyNumpad6 = VK_NUMPAD6 KeyNumpad7 = VK_NUMPAD7 KeyNumpad8 = VK_NUMPAD8 KeyNumpad9 = VK_NUMPAD9 KeyMultiply = VK_MULTIPLY KeyAdd = VK_ADD KeySeparator = VK_SEPARATOR KeySubtract = VK_SUBTRACT KeyDecimal = VK_DECIMAL KeyDivide = VK_DIVIDE KeyF1 = VK_F1 KeyF2 = VK_F2 KeyF3 = VK_F3 KeyF4 = VK_F4 KeyF5 = VK_F5 KeyF6 = VK_F6 KeyF7 = VK_F7 KeyF8 = VK_F8 KeyF9 = VK_F9 KeyF10 = VK_F10 KeyF11 = VK_F11 KeyF12 = VK_F12 KeyF13 = VK_F13 KeyF14 = VK_F14 KeyF15 = VK_F15 KeyF16 = VK_F16 KeyF17 = VK_F17 KeyF18 = VK_F18 KeyF19 = VK_F19 KeyF20 = VK_F20 KeyF21 = VK_F21 KeyF22 = VK_F22 KeyF23 = VK_F23 KeyF24 = VK_F24 KeyNumlock = VK_NUMLOCK KeyScroll = VK_SCROLL KeyLShift = VK_LSHIFT KeyRShift = VK_RSHIFT KeyLControl = VK_LCONTROL KeyRControl = VK_RCONTROL KeyLAlt = VK_LMENU KeyLMenu = VK_LMENU KeyRAlt = VK_RMENU KeyRMenu = VK_RMENU KeyBrowserBack = VK_BROWSER_BACK KeyBrowserForward = VK_BROWSER_FORWARD KeyBrowserRefresh = VK_BROWSER_REFRESH KeyBrowserStop = VK_BROWSER_STOP KeyBrowserSearch = VK_BROWSER_SEARCH KeyBrowserFavorites = VK_BROWSER_FAVORITES KeyBrowserHome = VK_BROWSER_HOME KeyVolumeMute = VK_VOLUME_MUTE KeyVolumeDown = VK_VOLUME_DOWN KeyVolumeUp = VK_VOLUME_UP KeyMediaNextTrack = VK_MEDIA_NEXT_TRACK KeyMediaPrevTrack = VK_MEDIA_PREV_TRACK KeyMediaStop = VK_MEDIA_STOP KeyMediaPlayPause = VK_MEDIA_PLAY_PAUSE KeyLaunchMail = VK_LAUNCH_MAIL KeyLaunchMediaSelect = VK_LAUNCH_MEDIA_SELECT KeyLaunchApp1 = VK_LAUNCH_APP1 KeyLaunchApp2 = VK_LAUNCH_APP2 KeyOEM1 = VK_OEM_1 KeyOEMPlus = VK_OEM_PLUS KeyOEMComma = VK_OEM_COMMA KeyOEMMinus = VK_OEM_MINUS KeyOEMPeriod = VK_OEM_PERIOD KeyOEM2 = VK_OEM_2 KeyOEM3 = VK_OEM_3 KeyOEM4 = VK_OEM_4 KeyOEM5 = VK_OEM_5 KeyOEM6 = VK_OEM_6 KeyOEM7 = VK_OEM_7 KeyOEM8 = VK_OEM_8 KeyOEM102 = VK_OEM_102 KeyProcessKey = VK_PROCESSKEY KeyPacket = VK_PACKET KeyAttn = VK_ATTN KeyCRSel = VK_CRSEL KeyEXSel = VK_EXSEL KeyErEOF = VK_EREOF KeyPlay = VK_PLAY KeyZoom = VK_ZOOM KeyNoName = VK_NONAME KeyPA1 = VK_PA1 KeyOEMClear = VK_OEM_CLEAR )
const ( ModShift Modifiers = 0x01 ModControl = 0x02 ModAlt = 0x04 )
Variables ¶
Functions ¶
func AppDataPath ¶
func CommonAppDataPath ¶
func ControlDown ¶
func ControlDown() bool
func DriveNames ¶
func FormatFloat ¶
func FormatFloatGrouped ¶
func InitChildWidget ¶
InitChildWidget initializes a child widget.
func InitWidget ¶
InitWidget initializes a widget.
Most widgets have a parent and so are child widgets that should be initialized using InitChildWidget instead.
func InitWrapperWidget ¶
InitWrapperWidget initializes a widget that wraps (embeds) another widget.
Calling this method is necessary, if you want to be able to override the WndProc method of the embedded widget. The embedded widget should only be used as inseparable part of the wrapper widget to avoid undefined behavior.
func LocalAppDataPath ¶
func MsgBox ¶
func MsgBox(owner RootWidget, title, message string, style MsgBoxStyle) int
func MustRegisterWindowClass ¶
func MustRegisterWindowClass(className string)
MustRegisterWindowClass registers the specified window class.
MustRegisterWindowClass must be called once for every widget type that is not based on any system provided control, before calling InitChildWidget or InitWidget. Calling MustRegisterWindowClass twice with the same className results in a panic.
func PanicOnError ¶
func PanicOnError() bool
func ParseFloat ¶
func RegistryKeyString ¶
func RegistryKeyString(rootKey *RegistryKey, subKeyPath, valueName string) (value string, err error)
func RegistryKeyUint32 ¶
func RegistryKeyUint32(rootKey *RegistryKey, subKeyPath, valueName string) (value uint32, err error)
func SetLogErrors ¶
func SetLogErrors(v bool)
func SetPanicOnError ¶
func SetPanicOnError(v bool)
func SetTranslationFunc ¶
func SetTranslationFunc(f TranslationFunction)
Types ¶
type Action ¶
type Action struct {
// contains filtered or unexported fields
}
func NewSeparatorAction ¶
func NewSeparatorAction() *Action
func (*Action) EnabledCondition ¶
func (*Action) IsSeparator ¶
func (*Action) SetCheckable ¶
func (*Action) SetChecked ¶
func (*Action) SetEnabled ¶
func (*Action) SetEnabledCondition ¶
func (*Action) SetExclusive ¶
func (*Action) SetShortcut ¶
func (*Action) SetToolTip ¶
func (*Action) SetVisible ¶
func (*Action) SetVisibleCondition ¶
func (*Action) VisibleCondition ¶
type ActionList ¶
type ActionList struct {
// contains filtered or unexported fields
}
func (*ActionList) Add ¶
func (l *ActionList) Add(action *Action) error
func (*ActionList) At ¶
func (l *ActionList) At(index int) *Action
func (*ActionList) Clear ¶
func (l *ActionList) Clear() error
func (*ActionList) Contains ¶
func (l *ActionList) Contains(action *Action) bool
func (*ActionList) Index ¶
func (l *ActionList) Index(action *Action) int
func (*ActionList) InsertMenu ¶
func (l *ActionList) InsertMenu(index int, menu *Menu) (*Action, error)
func (*ActionList) Len ¶
func (l *ActionList) Len() int
func (*ActionList) Remove ¶
func (l *ActionList) Remove(action *Action) error
func (*ActionList) RemoveAt ¶
func (l *ActionList) RemoveAt(index int) error
type Alignment1D ¶
type Alignment1D uint
const ( AlignNear Alignment1D = iota AlignCenter AlignFar )
type Alignment2D ¶
type Alignment2D uint
const ( AlignHNearVNear Alignment2D = iota AlignHCenterVNear AlignHFarVNear AlignHNearVCenter AlignHCenterVCenter AlignHFarVCenter AlignHNearVFar AlignHCenterVFar AlignHFarVFar )
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func App ¶
func App() *Application
func (*Application) Exit ¶
func (app *Application) Exit(exitCode int)
func (*Application) ExitCode ¶
func (app *Application) ExitCode() int
func (*Application) OrganizationName ¶
func (app *Application) OrganizationName() string
func (*Application) Panicking ¶
func (app *Application) Panicking() *ErrorEvent
func (*Application) ProductName ¶
func (app *Application) ProductName() string
func (*Application) SetOrganizationName ¶
func (app *Application) SetOrganizationName(value string)
func (*Application) SetProductName ¶
func (app *Application) SetProductName(value string)
func (*Application) SetSettings ¶
func (app *Application) SetSettings(value Settings)
func (*Application) Settings ¶
func (app *Application) Settings() Settings
type BindingValueProvider ¶
type BindingValueProvider interface {
BindingValue(index int) interface{}
}
BindingValueProvider is the interface that a model must implement to support data binding with widgets like ComboBox.
type Bitmap ¶
type Bitmap struct {
// contains filtered or unexported fields
}
func NewBitmapFromFile ¶
type BitmapBrush ¶
type BitmapBrush struct {
// contains filtered or unexported fields
}
func NewBitmapBrush ¶
func NewBitmapBrush(bitmap *Bitmap) (*BitmapBrush, error)
func (*BitmapBrush) Bitmap ¶
func (b *BitmapBrush) Bitmap() *Bitmap
func (*BitmapBrush) Dispose ¶
func (b *BitmapBrush) Dispose()
type BoxLayout ¶
type BoxLayout struct {
// contains filtered or unexported fields
}
func NewHBoxLayout ¶
func NewHBoxLayout() *BoxLayout
func NewVBoxLayout ¶
func NewVBoxLayout() *BoxLayout
func (*BoxLayout) LayoutFlags ¶
func (l *BoxLayout) LayoutFlags() LayoutFlags
func (*BoxLayout) Orientation ¶
func (l *BoxLayout) Orientation() Orientation
func (*BoxLayout) SetContainer ¶
func (*BoxLayout) SetMargins ¶
func (*BoxLayout) SetOrientation ¶
func (l *BoxLayout) SetOrientation(value Orientation) error
func (*BoxLayout) SetSpacing ¶
func (*BoxLayout) SetStretchFactor ¶
func (*BoxLayout) StretchFactor ¶
type Button ¶
type Button struct { WidgetBase // contains filtered or unexported fields }
func (*Button) CheckedChanged ¶
func (*Button) SetChecked ¶
type CancelEvent ¶
type CancelEvent struct {
// contains filtered or unexported fields
}
func (*CancelEvent) Attach ¶
func (e *CancelEvent) Attach(handler CancelEventHandler) int
func (*CancelEvent) Detach ¶
func (e *CancelEvent) Detach(handle int)
type CancelEventHandler ¶
type CancelEventHandler func(canceled *bool)
type CancelEventPublisher ¶
type CancelEventPublisher struct {
// contains filtered or unexported fields
}
func (*CancelEventPublisher) Event ¶
func (p *CancelEventPublisher) Event() *CancelEvent
func (*CancelEventPublisher) Publish ¶
func (p *CancelEventPublisher) Publish(canceled *bool)
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
func NewCanvasFromImage ¶
func (*Canvas) DrawImageStretched ¶
func (*Canvas) MeasureText ¶
type CheckBox ¶
type CheckBox struct {
Button
}
func NewCheckBox ¶
func (*CheckBox) LayoutFlags ¶
func (*CheckBox) LayoutFlags() LayoutFlags
func (*CheckBox) MinSizeHint ¶
type ClipboardService ¶
type ClipboardService struct {
// contains filtered or unexported fields
}
ClipboardService provides access to the system clipboard.
func Clipboard ¶
func Clipboard() *ClipboardService
Clipboard returns an object that provides access to the system clipboard.
func (*ClipboardService) Clear ¶
func (c *ClipboardService) Clear() error
Clear clears the contents of the clipboard.
func (*ClipboardService) ContainsText ¶
func (c *ClipboardService) ContainsText() (available bool, err error)
ContainsText returns whether the clipboard currently contains text data.
func (*ClipboardService) SetText ¶
func (c *ClipboardService) SetText(s string) error
SetText sets the current text data of the clipboard.
func (*ClipboardService) Text ¶
func (c *ClipboardService) Text() (text string, err error)
Text returns the current text data of the clipboard.
type CloseEvent ¶
type CloseEvent struct {
// contains filtered or unexported fields
}
func (*CloseEvent) Attach ¶
func (e *CloseEvent) Attach(handler CloseEventHandler) int
func (*CloseEvent) Detach ¶
func (e *CloseEvent) Detach(handle int)
type CloseEventHandler ¶
type CloseEventHandler func(canceled *bool, reason CloseReason)
type CloseEventPublisher ¶
type CloseEventPublisher struct {
// contains filtered or unexported fields
}
func (*CloseEventPublisher) Event ¶
func (p *CloseEventPublisher) Event() *CloseEvent
func (*CloseEventPublisher) Publish ¶
func (p *CloseEventPublisher) Publish(canceled *bool, reason CloseReason)
type CloseReason ¶
type CloseReason byte
const ( CloseReasonUnknown CloseReason = iota CloseReasonUser )
type ComboBox ¶
type ComboBox struct { WidgetBase // contains filtered or unexported fields }
func NewComboBox ¶
func NewDropDownBox ¶
func (*ComboBox) BindingMember ¶
BindingMember returns the member from the model of the ComboBox that is bound to a field of the data source managed by an associated DataBinder.
This is only applicable to walk.ReflectListModel models and simple slices of pointers to struct.
func (*ComboBox) CurrentIndex ¶
func (*ComboBox) CurrentIndexChanged ¶
func (*ComboBox) DisplayMember ¶
DisplayMember returns the member from the model of the ComboBox that is displayed in the ComboBox.
This is only applicable to walk.ReflectListModel models and simple slices of pointers to struct.
func (*ComboBox) LayoutFlags ¶
func (*ComboBox) LayoutFlags() LayoutFlags
func (*ComboBox) MinSizeHint ¶
func (*ComboBox) Model ¶
func (cb *ComboBox) Model() interface{}
Model returns the model of the ComboBox.
func (*ComboBox) SetBindingMember ¶
SetBindingMember sets the member from the model of the ComboBox that is bound to a field of the data source managed by an associated DataBinder.
This is only applicable to walk.ReflectListModel models and simple slices of pointers to struct.
For a model consisting of items of type S, data source field of type T and bindingMember "Foo", this can be one of the following:
A field Foo T A method func (s S) Foo() T A method func (s S) Foo() (T, error)
If bindingMember is not a simple member name like "Foo", but a path to a member like "A.B.Foo", members "A" and "B" both must be one of the options mentioned above, but with T having type pointer to struct.
func (*ComboBox) SetCurrentIndex ¶
func (*ComboBox) SetDisplayMember ¶
SetDisplayMember sets the member from the model of the ComboBox that is displayed in the ComboBox.
This is only applicable to walk.ReflectListModel models and simple slices of pointers to struct.
For a model consisting of items of type S, the type of the specified member T and displayMember "Foo", this can be one of the following:
A field Foo T A method func (s S) Foo() T A method func (s S) Foo() (T, error)
If displayMember is not a simple member name like "Foo", but a path to a member like "A.B.Foo", members "A" and "B" both must be one of the options mentioned above, but with T having type pointer to struct.
func (*ComboBox) SetModel ¶
SetModel sets the model of the ComboBox.
It is required that mdl either implements walk.ListModel or walk.ReflectListModel or be a slice of pointers to struct or a []string.
func (*ComboBox) SetPrecision ¶
func (*ComboBox) SetTextSelection ¶
func (*ComboBox) TextSelection ¶
type Container ¶
type Container interface { Widget Children() *WidgetList Layout() Layout SetLayout(value Layout) error DataBinder() *DataBinder SetDataBinder(dbm *DataBinder) }
type ContainerBase ¶
type ContainerBase struct { WidgetBase // contains filtered or unexported fields }
func (*ContainerBase) Children ¶
func (cb *ContainerBase) Children() *WidgetList
func (*ContainerBase) DataBinder ¶
func (cb *ContainerBase) DataBinder() *DataBinder
func (*ContainerBase) Layout ¶
func (cb *ContainerBase) Layout() Layout
func (*ContainerBase) LayoutFlags ¶
func (cb *ContainerBase) LayoutFlags() LayoutFlags
func (*ContainerBase) MinSizeHint ¶
func (cb *ContainerBase) MinSizeHint() Size
func (*ContainerBase) Persistent ¶
func (cb *ContainerBase) Persistent() bool
func (*ContainerBase) RestoreState ¶
func (cb *ContainerBase) RestoreState() error
func (*ContainerBase) SaveState ¶
func (cb *ContainerBase) SaveState() error
func (*ContainerBase) SetDataBinder ¶
func (cb *ContainerBase) SetDataBinder(db *DataBinder)
func (*ContainerBase) SetEnabled ¶
func (cb *ContainerBase) SetEnabled(enabled bool)
func (*ContainerBase) SetFont ¶
func (cb *ContainerBase) SetFont(f *Font)
func (*ContainerBase) SetLayout ¶
func (cb *ContainerBase) SetLayout(value Layout) error
func (*ContainerBase) SetPersistent ¶
func (cb *ContainerBase) SetPersistent(value bool)
func (*ContainerBase) SetSuspended ¶
func (cb *ContainerBase) SetSuspended(suspend bool)
func (*ContainerBase) SizeHint ¶
func (cb *ContainerBase) SizeHint() Size
type CosmeticPen ¶
type CosmeticPen struct {
// contains filtered or unexported fields
}
func NewCosmeticPen ¶
func NewCosmeticPen(style PenStyle, color Color) (*CosmeticPen, error)
func (*CosmeticPen) Color ¶
func (p *CosmeticPen) Color() Color
func (*CosmeticPen) Dispose ¶
func (p *CosmeticPen) Dispose()
func (*CosmeticPen) Style ¶
func (p *CosmeticPen) Style() PenStyle
func (*CosmeticPen) Width ¶
func (p *CosmeticPen) Width() int
type Cursor ¶
type Cursor interface { Dispose() // contains filtered or unexported methods }
func CursorAppStarting ¶
func CursorAppStarting() Cursor
func CursorArrow ¶
func CursorArrow() Cursor
func CursorCross ¶
func CursorCross() Cursor
func CursorHand ¶
func CursorHand() Cursor
func CursorHelp ¶
func CursorHelp() Cursor
func CursorIBeam ¶
func CursorIBeam() Cursor
func CursorIcon ¶
func CursorIcon() Cursor
func CursorSize ¶
func CursorSize() Cursor
func CursorSizeAll ¶
func CursorSizeAll() Cursor
func CursorSizeNESW ¶
func CursorSizeNESW() Cursor
func CursorSizeNS ¶
func CursorSizeNS() Cursor
func CursorSizeNWSE ¶
func CursorSizeNWSE() Cursor
func CursorSizeWE ¶
func CursorSizeWE() Cursor
func CursorUpArrow ¶
func CursorUpArrow() Cursor
func CursorWait ¶
func CursorWait() Cursor
type CustomWidget ¶
type CustomWidget struct { WidgetBase // contains filtered or unexported fields }
func NewCustomWidget ¶
func NewCustomWidget(parent Container, style uint, paint PaintFunc) (*CustomWidget, error)
func (*CustomWidget) ClearsBackground ¶
func (cw *CustomWidget) ClearsBackground() bool
func (*CustomWidget) InvalidatesOnResize ¶
func (cw *CustomWidget) InvalidatesOnResize() bool
func (*CustomWidget) LayoutFlags ¶
func (*CustomWidget) LayoutFlags() LayoutFlags
func (*CustomWidget) SetClearsBackground ¶
func (cw *CustomWidget) SetClearsBackground(value bool)
func (*CustomWidget) SetInvalidatesOnResize ¶
func (cw *CustomWidget) SetInvalidatesOnResize(value bool)
func (*CustomWidget) SizeHint ¶
func (cw *CustomWidget) SizeHint() Size
type DataBinder ¶
type DataBinder struct {
// contains filtered or unexported fields
}
func NewDataBinder ¶
func NewDataBinder() *DataBinder
func (*DataBinder) AutoSubmit ¶
func (db *DataBinder) AutoSubmit() bool
func (*DataBinder) BoundWidgets ¶
func (db *DataBinder) BoundWidgets() []Widget
func (*DataBinder) CanSubmit ¶
func (db *DataBinder) CanSubmit() bool
func (*DataBinder) CanSubmitChanged ¶
func (db *DataBinder) CanSubmitChanged() *Event
func (*DataBinder) DataSource ¶
func (db *DataBinder) DataSource() interface{}
func (*DataBinder) ErrorPresenter ¶
func (db *DataBinder) ErrorPresenter() ErrorPresenter
func (*DataBinder) Reset ¶
func (db *DataBinder) Reset() error
func (*DataBinder) SetAutoSubmit ¶
func (db *DataBinder) SetAutoSubmit(autoSubmit bool)
func (*DataBinder) SetBoundWidgets ¶
func (db *DataBinder) SetBoundWidgets(boundWidgets []Widget)
func (*DataBinder) SetDataSource ¶
func (db *DataBinder) SetDataSource(dataSource interface{}) error
func (*DataBinder) SetErrorPresenter ¶
func (db *DataBinder) SetErrorPresenter(ep ErrorPresenter)
func (*DataBinder) Submit ¶
func (db *DataBinder) Submit() error
func (*DataBinder) Submitted ¶
func (db *DataBinder) Submitted() *Event
type DateEdit ¶
type DateEdit struct { WidgetBase // contains filtered or unexported fields }
func NewDateEdit ¶
func (*DateEdit) LayoutFlags ¶
func (*DateEdit) LayoutFlags() LayoutFlags
func (*DateEdit) MinSizeHint ¶
func (*DateEdit) ValueChanged ¶
type DelegateCondition ¶
type DelegateCondition struct {
// contains filtered or unexported fields
}
func NewDelegateCondition ¶
func NewDelegateCondition(satisfied func() bool, changed *Event) *DelegateCondition
func (*DelegateCondition) Changed ¶
func (dc *DelegateCondition) Changed() *Event
func (*DelegateCondition) Satisfied ¶
func (dc *DelegateCondition) Satisfied() bool
type Dialog ¶
type Dialog struct { TopLevelWindow // contains filtered or unexported fields }
func NewDialog ¶
func NewDialog(owner RootWidget) (*Dialog, error)
func (*Dialog) CancelButton ¶
func (dlg *Dialog) CancelButton() *PushButton
func (*Dialog) DefaultButton ¶
func (dlg *Dialog) DefaultButton() *PushButton
func (*Dialog) SetCancelButton ¶
func (dlg *Dialog) SetCancelButton(button *PushButton) error
func (*Dialog) SetDefaultButton ¶
func (dlg *Dialog) SetDefaultButton(button *PushButton) error
type DrawTextFormat ¶
type DrawTextFormat uint
DrawText format flags
const ( TextTop DrawTextFormat = DT_TOP TextLeft DrawTextFormat = DT_LEFT TextCenter DrawTextFormat = DT_CENTER TextRight DrawTextFormat = DT_RIGHT TextVCenter DrawTextFormat = DT_VCENTER TextBottom DrawTextFormat = DT_BOTTOM TextWordbreak DrawTextFormat = DT_WORDBREAK TextSingleLine DrawTextFormat = DT_SINGLELINE TextExpandTabs DrawTextFormat = DT_EXPANDTABS TextTabstop DrawTextFormat = DT_TABSTOP TextNoClip DrawTextFormat = DT_NOCLIP TextExternalLeading DrawTextFormat = DT_EXTERNALLEADING TextCalcRect DrawTextFormat = DT_CALCRECT TextNoPrefix DrawTextFormat = DT_NOPREFIX TextInternal DrawTextFormat = DT_INTERNAL TextEditControl DrawTextFormat = DT_EDITCONTROL TextPathEllipsis DrawTextFormat = DT_PATH_ELLIPSIS TextEndEllipsis DrawTextFormat = DT_END_ELLIPSIS TextModifyString DrawTextFormat = DT_MODIFYSTRING TextRTLReading DrawTextFormat = DT_RTLREADING TextWordEllipsis DrawTextFormat = DT_WORD_ELLIPSIS TextNoFullWidthCharBreak DrawTextFormat = DT_NOFULLWIDTHCHARBREAK TextHidePrefix DrawTextFormat = DT_HIDEPREFIX TextPrefixOnly DrawTextFormat = DT_PREFIXONLY )
type ErrorEvent ¶
type ErrorEvent struct {
// contains filtered or unexported fields
}
func (*ErrorEvent) Attach ¶
func (e *ErrorEvent) Attach(handler ErrorEventHandler) int
func (*ErrorEvent) Detach ¶
func (e *ErrorEvent) Detach(handle int)
type ErrorEventHandler ¶
type ErrorEventHandler func(err error)
type ErrorEventPublisher ¶
type ErrorEventPublisher struct {
// contains filtered or unexported fields
}
func (*ErrorEventPublisher) Event ¶
func (p *ErrorEventPublisher) Event() *ErrorEvent
func (*ErrorEventPublisher) Publish ¶
func (p *ErrorEventPublisher) Publish(err error)
type ErrorPresenter ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) Attach ¶
func (e *Event) Attach(handler EventHandler) int
type EventHandler ¶
type EventHandler func()
type EventPublisher ¶
type EventPublisher struct {
// contains filtered or unexported fields
}
func (*EventPublisher) Event ¶
func (p *EventPublisher) Event() *Event
func (*EventPublisher) Publish ¶
func (p *EventPublisher) Publish()
type FileDialog ¶
type FileDialog struct { Title string FilePath string InitialDirPath string Filter string FilterIndex int }
func (*FileDialog) ShowBrowseFolder ¶
func (dlg *FileDialog) ShowBrowseFolder(owner RootWidget) (accepted bool, err error)
func (*FileDialog) ShowOpen ¶
func (dlg *FileDialog) ShowOpen(owner RootWidget) (accepted bool, err error)
func (*FileDialog) ShowSave ¶
func (dlg *FileDialog) ShowSave(owner RootWidget) (accepted bool, err error)
type Font ¶
type Font struct {
// contains filtered or unexported fields
}
Font represents a typographic typeface that is used for text drawing operations and on many GUI widgets.
func (*Font) Bold ¶
Bold returns if text drawn using the Font appears with greater weight than normal.
func (*Font) Dispose ¶
func (f *Font) Dispose()
Dispose releases the os resources that were allocated for the Font.
The Font can no longer be used for drawing operations or with GUI widgets after calling this method. It is safe to call Dispose multiple times.
type GeometricPen ¶
type GeometricPen struct {
// contains filtered or unexported fields
}
func NewGeometricPen ¶
func NewGeometricPen(style PenStyle, width int, brush Brush) (*GeometricPen, error)
func (*GeometricPen) Brush ¶
func (p *GeometricPen) Brush() Brush
func (*GeometricPen) Dispose ¶
func (p *GeometricPen) Dispose()
func (*GeometricPen) Style ¶
func (p *GeometricPen) Style() PenStyle
func (*GeometricPen) Width ¶
func (p *GeometricPen) Width() int
type GridLayout ¶
type GridLayout struct {
// contains filtered or unexported fields
}
func NewGridLayout ¶
func NewGridLayout() *GridLayout
func (*GridLayout) ColumnStretchFactor ¶
func (l *GridLayout) ColumnStretchFactor(column int) int
func (*GridLayout) Container ¶
func (l *GridLayout) Container() Container
func (*GridLayout) LayoutFlags ¶
func (l *GridLayout) LayoutFlags() LayoutFlags
func (*GridLayout) Margins ¶
func (l *GridLayout) Margins() Margins
func (*GridLayout) MinSize ¶
func (l *GridLayout) MinSize() Size
func (*GridLayout) RowStretchFactor ¶
func (l *GridLayout) RowStretchFactor(row int) int
func (*GridLayout) SetColumnStretchFactor ¶
func (l *GridLayout) SetColumnStretchFactor(column, factor int) error
func (*GridLayout) SetContainer ¶
func (l *GridLayout) SetContainer(value Container)
func (*GridLayout) SetMargins ¶
func (l *GridLayout) SetMargins(value Margins) error
func (*GridLayout) SetRowStretchFactor ¶
func (l *GridLayout) SetRowStretchFactor(row, factor int) error
func (*GridLayout) SetSpacing ¶
func (l *GridLayout) SetSpacing(value int) error
func (*GridLayout) Spacing ¶
func (l *GridLayout) Spacing() int
func (*GridLayout) Update ¶
func (l *GridLayout) Update(reset bool) error
type GroupBox ¶
type GroupBox struct { WidgetBase // contains filtered or unexported fields }
func NewGroupBox ¶
func (*GroupBox) Children ¶
func (gb *GroupBox) Children() *WidgetList
func (*GroupBox) ClientBounds ¶
func (*GroupBox) DataBinder ¶
func (gb *GroupBox) DataBinder() *DataBinder
func (*GroupBox) LayoutFlags ¶
func (gb *GroupBox) LayoutFlags() LayoutFlags
func (*GroupBox) MinSizeHint ¶
func (*GroupBox) SetDataBinder ¶
func (gb *GroupBox) SetDataBinder(dataBinder *DataBinder)
func (*GroupBox) SetSuspended ¶
type HatchBrush ¶
type HatchBrush struct {
// contains filtered or unexported fields
}
func NewHatchBrush ¶
func NewHatchBrush(color Color, style HatchStyle) (*HatchBrush, error)
func (*HatchBrush) Color ¶
func (b *HatchBrush) Color() Color
func (*HatchBrush) Dispose ¶
func (b *HatchBrush) Dispose()
func (*HatchBrush) Style ¶
func (b *HatchBrush) Style() HatchStyle
type HatchStyle ¶
type HatchStyle int
const ( HatchHorizontal HatchStyle = HS_HORIZONTAL HatchVertical HatchStyle = HS_VERTICAL HatchForwardDiagonal HatchStyle = HS_FDIAGONAL HatchBackwardDiagonal HatchStyle = HS_BDIAGONAL HatchCross HatchStyle = HS_CROSS HatchDiagonalCross HatchStyle = HS_DIAGCROSS )
type Icon ¶
type Icon struct {
// contains filtered or unexported fields
}
Icon is a bitmap that supports transparency and combining multiple variants of an image in different resolutions.
func NewIconFromFile ¶
NewIconFromFile returns a new Icon, using the specified icon image file.
func NewIconFromResource ¶
NewIconFromResource returns a new Icon, using the specified icon resource.
type Image ¶
type Image interface { Dispose() Size() Size // contains filtered or unexported methods }
func NewImageFromFile ¶
type ImageProvider ¶
type ImageProvider interface { // Image returns the image to display for the item at index index. // // Supported types are *walk.Bitmap, *walk.Icon and string. A string will be // interpreted as a file path and the icon associated with the file will be // used. It is not supported to use strings together with the other options // in the same model instance. Image(index int) interface{} }
ImageProvider is the interface that a model must implement to support displaying an item image.
type ImageView ¶
type ImageView struct { *CustomWidget // contains filtered or unexported fields }
func NewImageView ¶
type Imager ¶
type Imager interface { // Image returns the image to display for an item. // // Supported types are *walk.Bitmap, *walk.Icon and string. A string will be // interpreted as a file path and the icon associated with the file will be // used. It is not supported to use strings together with the other options // in the same model instance. Image() interface{} }
Imager provides access to an image of objects like tree items.
type IndexList ¶
type IndexList struct {
// contains filtered or unexported fields
}
func NewIndexList ¶
type IniFileSettings ¶
type IniFileSettings struct {
// contains filtered or unexported fields
}
func NewIniFileSettings ¶
func NewIniFileSettings(fileName string) *IniFileSettings
func (*IniFileSettings) ExpireDuration ¶
func (ifs *IniFileSettings) ExpireDuration() time.Duration
func (*IniFileSettings) FilePath ¶
func (ifs *IniFileSettings) FilePath() string
func (*IniFileSettings) Load ¶
func (ifs *IniFileSettings) Load() error
func (*IniFileSettings) Put ¶
func (ifs *IniFileSettings) Put(key, value string) error
func (*IniFileSettings) PutExpiring ¶
func (ifs *IniFileSettings) PutExpiring(key, value string) error
func (*IniFileSettings) Remove ¶
func (ifs *IniFileSettings) Remove(key string) error
func (*IniFileSettings) Save ¶
func (ifs *IniFileSettings) Save() error
func (*IniFileSettings) SetExpireDuration ¶
func (ifs *IniFileSettings) SetExpireDuration(expireDuration time.Duration)
type IntEvent ¶
type IntEvent struct {
// contains filtered or unexported fields
}
func (*IntEvent) Attach ¶
func (e *IntEvent) Attach(handler IntEventHandler) int
type IntEventHandler ¶
type IntEventHandler func(n int)
type IntEventPublisher ¶
type IntEventPublisher struct {
// contains filtered or unexported fields
}
func (*IntEventPublisher) Event ¶
func (p *IntEventPublisher) Event() *IntEvent
func (*IntEventPublisher) Publish ¶
func (p *IntEventPublisher) Publish(n int)
type ItemChecker ¶
type ItemChecker interface { // Checked returns if the specified item is checked. Checked(index int) bool // SetChecked sets if the specified item is checked. SetChecked(index int, checked bool) error }
ItemChecker is the interface that a model must implement to support check boxes in a widget like TableView.
type KeyEvent ¶
type KeyEvent struct {
// contains filtered or unexported fields
}
func (*KeyEvent) Attach ¶
func (e *KeyEvent) Attach(handler KeyEventHandler) int
type KeyEventHandler ¶
type KeyEventHandler func(key Key)
type KeyEventPublisher ¶
type KeyEventPublisher struct {
// contains filtered or unexported fields
}
func (*KeyEventPublisher) Event ¶
func (p *KeyEventPublisher) Event() *KeyEvent
func (*KeyEventPublisher) Publish ¶
func (p *KeyEventPublisher) Publish(key Key)
type Label ¶
type Label struct { WidgetBase // contains filtered or unexported fields }
func (*Label) LayoutFlags ¶
func (*Label) LayoutFlags() LayoutFlags
func (*Label) MinSizeHint ¶
type LayoutFlags ¶
type LayoutFlags byte
LayoutFlags specify how a Widget wants to be treated when used with a Layout.
These flags are interpreted in respect to Widget.SizeHint.
const ( // ShrinkableHorz allows a Widget to be shrunk horizontally. ShrinkableHorz LayoutFlags = 1 << iota // ShrinkableVert allows a Widget to be shrunk vertically. ShrinkableVert // GrowableHorz allows a Widget to be enlarged horizontally. GrowableHorz // GrowableVert allows a Widget to be enlarged vertically. GrowableVert // GreedyHorz specifies that the widget prefers to take up as much space as // possible, horizontally. GreedyHorz // GreedyVert specifies that the widget prefers to take up as much space as // possible, vertically. GreedyVert )
type LineEdit ¶
type LineEdit struct { WidgetBase // contains filtered or unexported fields }
func NewLineEdit ¶
func (*LineEdit) EditingFinished ¶
func (*LineEdit) LayoutFlags ¶
func (le *LineEdit) LayoutFlags() (lf LayoutFlags)
func (*LineEdit) MinSizeHint ¶
func (*LineEdit) PasswordMode ¶
func (*LineEdit) SetCueBanner ¶
func (*LineEdit) SetMaxLength ¶
func (*LineEdit) SetPasswordMode ¶
func (*LineEdit) SetReadOnly ¶
func (*LineEdit) SetTextSelection ¶
func (*LineEdit) TextChanged ¶
func (*LineEdit) TextSelection ¶
type LineErrorPresenter ¶
type LineErrorPresenter struct { WidgetBase // contains filtered or unexported fields }
func NewLineErrorPresenter ¶
func NewLineErrorPresenter(parent Container) (*LineErrorPresenter, error)
func (*LineErrorPresenter) LayoutFlags ¶
func (*LineErrorPresenter) LayoutFlags() LayoutFlags
func (*LineErrorPresenter) MinSizeHint ¶
func (lep *LineErrorPresenter) MinSizeHint() Size
func (*LineErrorPresenter) PresentError ¶
func (lep *LineErrorPresenter) PresentError(err error, widget Widget)
func (*LineErrorPresenter) SizeHint ¶
func (lep *LineErrorPresenter) SizeHint() Size
type ListBox ¶
type ListBox struct { WidgetBase // contains filtered or unexported fields }
func NewListBox ¶
func (*ListBox) CurrentIndex ¶
func (*ListBox) CurrentIndexChanged ¶
func (*ListBox) DataMember ¶
DataMember returns the member from the model of the ListBox that is displayed in the ListBox.
This is only applicable to walk.ReflectListModel models and simple slices of pointers to struct.
func (*ListBox) DblClicked ¶
func (*ListBox) LayoutFlags ¶
func (*ListBox) LayoutFlags() LayoutFlags
func (*ListBox) Model ¶
func (lb *ListBox) Model() interface{}
Model returns the model of the ListBox.
func (*ListBox) SetCurrentIndex ¶
func (*ListBox) SetDataMember ¶
SetDataMember sets the member from the model of the ListBox that is displayed in the ListBox.
This is only applicable to walk.ReflectListModel models and simple slices of pointers to struct.
For a model consisting of items of type S, the type of the specified member T and dataMember "Foo", this can be one of the following:
A field Foo T A method func (s S) Foo() T A method func (s S) Foo() (T, error)
If dataMember is not a simple member name like "Foo", but a path to a member like "A.B.Foo", members "A" and "B" both must be one of the options mentioned above, but with T having type pointer to struct.
func (*ListBox) SetModel ¶
SetModel sets the model of the ListBox.
It is required that mdl either implements walk.ListModel or walk.ReflectListModel or be a slice of pointers to struct or a []string.
func (*ListBox) SetPrecision ¶
type ListModel ¶
type ListModel interface { // ItemCount returns the number of items in the model. ItemCount() int // Value returns the value that should be displayed for the given index. Value(index int) interface{} // ItemsReset returns the event that the model should publish when the // number of its items changes. ItemsReset() *Event // ItemChanged returns the event that the model should publish when an item // was changed. ItemChanged() *IntEvent }
ListModel is the interface that a model must implement to support widgets like ComboBox.
type ListModelBase ¶
type ListModelBase struct {
// contains filtered or unexported fields
}
ListModelBase implements the ItemsReset and ItemChanged methods of the ListModel interface.
func (*ListModelBase) ItemChanged ¶
func (lmb *ListModelBase) ItemChanged() *IntEvent
func (*ListModelBase) ItemsReset ¶
func (lmb *ListModelBase) ItemsReset() *Event
func (*ListModelBase) PublishItemChanged ¶
func (lmb *ListModelBase) PublishItemChanged(index int)
func (*ListModelBase) PublishItemsReset ¶
func (lmb *ListModelBase) PublishItemsReset()
type MainWindow ¶
type MainWindow struct { TopLevelWindow // contains filtered or unexported fields }
func NewMainWindow ¶
func NewMainWindow() (*MainWindow, error)
func (*MainWindow) Children ¶
func (mw *MainWindow) Children() *WidgetList
func (*MainWindow) ClientBounds ¶
func (mw *MainWindow) ClientBounds() Rectangle
func (*MainWindow) ContextMenu ¶
func (mw *MainWindow) ContextMenu() *Menu
func (*MainWindow) Fullscreen ¶
func (mw *MainWindow) Fullscreen() bool
func (*MainWindow) Layout ¶
func (mw *MainWindow) Layout() Layout
func (*MainWindow) Menu ¶
func (mw *MainWindow) Menu() *Menu
func (*MainWindow) RestoreState ¶
func (mw *MainWindow) RestoreState() error
func (*MainWindow) SaveState ¶
func (mw *MainWindow) SaveState() error
func (*MainWindow) SetContextMenu ¶
func (mw *MainWindow) SetContextMenu(contextMenu *Menu)
func (*MainWindow) SetFullscreen ¶
func (mw *MainWindow) SetFullscreen(fullscreen bool) error
func (*MainWindow) SetLayout ¶
func (mw *MainWindow) SetLayout(value Layout) error
func (*MainWindow) SetVisible ¶
func (mw *MainWindow) SetVisible(visible bool)
func (*MainWindow) ToolBar ¶
func (mw *MainWindow) ToolBar() *ToolBar
type Menu ¶
type Menu struct {
// contains filtered or unexported fields
}
func (*Menu) Actions ¶
func (m *Menu) Actions() *ActionList
func (*Menu) IsDisposed ¶
type Metafile ¶
type Metafile struct {
// contains filtered or unexported fields
}
func NewMetafile ¶
func NewMetafileFromFile ¶
type MouseButton ¶
type MouseButton int
const ( LeftButton MouseButton = iota RightButton MiddleButton )
type MouseEvent ¶
type MouseEvent struct {
// contains filtered or unexported fields
}
func (*MouseEvent) Attach ¶
func (e *MouseEvent) Attach(handler MouseEventHandler) int
func (*MouseEvent) Detach ¶
func (e *MouseEvent) Detach(handle int)
type MouseEventHandler ¶
type MouseEventHandler func(x, y int, button MouseButton)
type MouseEventPublisher ¶
type MouseEventPublisher struct {
// contains filtered or unexported fields
}
func (*MouseEventPublisher) Event ¶
func (p *MouseEventPublisher) Event() *MouseEvent
func (*MouseEventPublisher) Publish ¶
func (p *MouseEventPublisher) Publish(x, y int, button MouseButton)
type MsgBoxStyle ¶
type MsgBoxStyle uint
const ( MsgBoxOK MsgBoxStyle = MB_OK MsgBoxOKCancel MsgBoxStyle = MB_OKCANCEL MsgBoxAbortRetryIgnore MsgBoxStyle = MB_ABORTRETRYIGNORE MsgBoxYesNoCancel MsgBoxStyle = MB_YESNOCANCEL MsgBoxYesNo MsgBoxStyle = MB_YESNO MsgBoxRetryCancel MsgBoxStyle = MB_RETRYCANCEL MsgBoxCancelTryContinue MsgBoxStyle = MB_CANCELTRYCONTINUE MsgBoxIconHand MsgBoxStyle = MB_ICONHAND MsgBoxIconQuestion MsgBoxStyle = MB_ICONQUESTION MsgBoxIconExclamation MsgBoxStyle = MB_ICONEXCLAMATION MsgBoxIconAsterisk MsgBoxStyle = MB_ICONASTERISK MsgBoxUserIcon MsgBoxStyle = MB_USERICON MsgBoxIconWarning MsgBoxStyle = MB_ICONWARNING MsgBoxIconError MsgBoxStyle = MB_ICONERROR MsgBoxIconInformation MsgBoxStyle = MB_ICONINFORMATION MsgBoxIconStop MsgBoxStyle = MB_ICONSTOP MsgBoxDefButton1 MsgBoxStyle = MB_DEFBUTTON1 MsgBoxDefButton2 MsgBoxStyle = MB_DEFBUTTON2 MsgBoxDefButton3 MsgBoxStyle = MB_DEFBUTTON3 MsgBoxDefButton4 MsgBoxStyle = MB_DEFBUTTON4 )
type MutableCondition ¶
type MutableCondition struct {
// contains filtered or unexported fields
}
func NewMutableCondition ¶
func NewMutableCondition() *MutableCondition
func (*MutableCondition) Changed ¶
func (mc *MutableCondition) Changed() *Event
func (*MutableCondition) Satisfied ¶
func (mc *MutableCondition) Satisfied() bool
func (*MutableCondition) SetSatisfied ¶
func (mc *MutableCondition) SetSatisfied(satisfied bool) error
type NotifyIcon ¶
type NotifyIcon struct {
// contains filtered or unexported fields
}
NotifyIcon represents an icon in the taskbar notification area.
func NewNotifyIcon ¶
func NewNotifyIcon() (*NotifyIcon, error)
NewNotifyIcon creates and returns a new NotifyIcon.
The NotifyIcon is initially not visible.
func (*NotifyIcon) ContextMenu ¶
func (ni *NotifyIcon) ContextMenu() *Menu
ContextMenu returns the context menu of the NotifyIcon.
func (*NotifyIcon) Dispose ¶
func (ni *NotifyIcon) Dispose() error
Dispose releases the operating system resources associated with the NotifyIcon.
The associated Icon is not disposed of.
func (*NotifyIcon) Icon ¶
func (ni *NotifyIcon) Icon() *Icon
Icon returns the Icon of the NotifyIcon.
func (*NotifyIcon) MouseDown ¶
func (ni *NotifyIcon) MouseDown() *MouseEvent
MouseDown returns the event that is published when a mouse button is pressed while the cursor is over the NotifyIcon.
func (*NotifyIcon) MouseUp ¶
func (ni *NotifyIcon) MouseUp() *MouseEvent
MouseDown returns the event that is published when a mouse button is released while the cursor is over the NotifyIcon.
func (*NotifyIcon) SetIcon ¶
func (ni *NotifyIcon) SetIcon(icon *Icon) error
SetIcon sets the Icon of the NotifyIcon.
func (*NotifyIcon) SetToolTip ¶
func (ni *NotifyIcon) SetToolTip(toolTip string) error
SetToolTip sets the tool tip text of the NotifyIcon.
func (*NotifyIcon) SetVisible ¶
func (ni *NotifyIcon) SetVisible(visible bool) error
SetVisible sets if the NotifyIcon is visible.
func (*NotifyIcon) ShowCustom ¶
func (ni *NotifyIcon) ShowCustom(title, info string) error
ShowCustom displays a custom icon message balloon above the NotifyIcon.
The NotifyIcon must be visible before calling this method.
func (*NotifyIcon) ShowError ¶
func (ni *NotifyIcon) ShowError(title, info string) error
ShowError displays an error message balloon above the NotifyIcon.
The NotifyIcon must be visible before calling this method.
func (*NotifyIcon) ShowInfo ¶
func (ni *NotifyIcon) ShowInfo(title, info string) error
ShowInfo displays an info message balloon above the NotifyIcon.
The NotifyIcon must be visible before calling this method.
func (*NotifyIcon) ShowMessage ¶
func (ni *NotifyIcon) ShowMessage(title, info string) error
ShowMessage displays a neutral message balloon above the NotifyIcon.
The NotifyIcon must be visible before calling this method.
func (*NotifyIcon) ShowWarning ¶
func (ni *NotifyIcon) ShowWarning(title, info string) error
ShowWarning displays a warning message balloon above the NotifyIcon.
The NotifyIcon must be visible before calling this method.
func (*NotifyIcon) ToolTip ¶
func (ni *NotifyIcon) ToolTip() string
ToolTip returns the tool tip text of the NotifyIcon.
func (*NotifyIcon) Visible ¶
func (ni *NotifyIcon) Visible() bool
Visible returns if the NotifyIcon is visible.
type NumberEdit ¶
type NumberEdit struct { WidgetBase // contains filtered or unexported fields }
NumberEdit is a widget that is suited to edit numeric values.
func NewNumberEdit ¶
func NewNumberEdit(parent Container) (*NumberEdit, error)
NewNumberEdit returns a new NumberEdit widget as child of parent.
func (*NumberEdit) Decimals ¶
func (ne *NumberEdit) Decimals() int
Decimals returns the number of decimal places in the NumberEdit.
func (*NumberEdit) Enabled ¶
func (ne *NumberEdit) Enabled() bool
Enabled returns whether the NumberEdit is enabled.
func (*NumberEdit) Font ¶
func (ne *NumberEdit) Font() *Font
Font returns the Font of the NumberEdit.
func (*NumberEdit) Increment ¶
func (ne *NumberEdit) Increment() float64
Increment returns the amount by which the NumberEdit increments or decrements its value, when the user presses the KeyDown or KeyUp keys, or when the mouse wheel is rotated.
func (*NumberEdit) LayoutFlags ¶
func (*NumberEdit) LayoutFlags() LayoutFlags
LayoutFlags returns information that is mainly interesting to Layout implementations.
func (*NumberEdit) MaxValue ¶
func (ne *NumberEdit) MaxValue() float64
MinValue returns the maximum value the NumberEdit will accept.
func (*NumberEdit) MinSizeHint ¶
func (ne *NumberEdit) MinSizeHint() Size
MinSizeHint returns information that is mainly interesting to Layout implementations.
func (*NumberEdit) MinValue ¶
func (ne *NumberEdit) MinValue() float64
MinValue returns the minimum value the NumberEdit will accept.
func (*NumberEdit) Prefix ¶
func (ne *NumberEdit) Prefix() string
Prefix returns the text that appears in the NumberEdit before the number.
func (*NumberEdit) SetDecimals ¶
func (ne *NumberEdit) SetDecimals(decimals int) error
SetDecimals sets the number of decimal places in the NumberEdit.
func (*NumberEdit) SetEnabled ¶
func (ne *NumberEdit) SetEnabled(value bool)
SetEnabled sets whether the NumberEdit is enabled.
func (*NumberEdit) SetFocus ¶
func (ne *NumberEdit) SetFocus() error
SetFocus sets the keyboard input focus to the NumberEdit.
func (*NumberEdit) SetFont ¶
func (ne *NumberEdit) SetFont(value *Font)
SetFont sets the Font of the NumberEdit.
func (*NumberEdit) SetIncrement ¶
func (ne *NumberEdit) SetIncrement(increment float64) error
SetIncrement sets the amount by which the NumberEdit increments or decrements its value, when the user presses the KeyDown or KeyUp keys, or when the mouse wheel is rotated.
func (*NumberEdit) SetPrefix ¶
func (ne *NumberEdit) SetPrefix(prefix string) error
SetPrefix sets the text that appears in the NumberEdit before the number.
func (*NumberEdit) SetRange ¶
func (ne *NumberEdit) SetRange(min, max float64) error
SetRange sets the minimum and maximum values the NumberEdit will accept.
If the current value is out of this range, it will be adjusted.
func (*NumberEdit) SetSuffix ¶
func (ne *NumberEdit) SetSuffix(suffix string) error
SetSuffix sets the text that appears in the NumberEdit after the number.
func (*NumberEdit) SetTextSelection ¶
func (ne *NumberEdit) SetTextSelection(start, end int)
SetTextSelection sets the range of the current text selection of the NumberEdit.
func (*NumberEdit) SetValue ¶
func (ne *NumberEdit) SetValue(value float64) error
SetValue sets the value of the NumberEdit.
func (*NumberEdit) SizeHint ¶
func (ne *NumberEdit) SizeHint() Size
SizeHint returns information that is mainly interesting to Layout implementations.
func (*NumberEdit) Suffix ¶
func (ne *NumberEdit) Suffix() string
Suffix returns the text that appears in the NumberEdit after the number.
func (*NumberEdit) TextSelection ¶
func (ne *NumberEdit) TextSelection() (start, end int)
TextSelection returns the range of the current text selection of the NumberEdit.
func (*NumberEdit) Value ¶
func (ne *NumberEdit) Value() float64
Value returns the value of the NumberEdit.
func (*NumberEdit) ValueChanged ¶
func (ne *NumberEdit) ValueChanged() *Event
ValueChanged returns an Event that can be used to track changes to Value.
func (*NumberEdit) WndProc ¶
func (ne *NumberEdit) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
WndProc is the window procedure of the NumberEdit.
When implementing your own WndProc to add or modify behavior, call the WndProc of the embedded NumberEdit for messages you don't handle yourself.
type Pen ¶
type PenStyle ¶
type PenStyle int
const ( PenSolid PenStyle = PS_SOLID PenDash PenStyle = PS_DASH PenDot PenStyle = PS_DOT PenDashDot PenStyle = PS_DASHDOT PenDashDotDot PenStyle = PS_DASHDOTDOT PenNull PenStyle = PS_NULL PenInsideFrame PenStyle = PS_INSIDEFRAME PenUserStyle PenStyle = PS_USERSTYLE PenAlternate PenStyle = PS_ALTERNATE )
Pen styles
type Persistable ¶
type Populator ¶
type Populator interface { // Populate initializes the slot specified by index. // // For best performance it is probably a good idea to populate more than a // single slot of the slice at once. Populate(index int) error }
Populator is an interface that can be implemented by Reflect*Models and slice types to populate themselves on demand.
Widgets like TableView, ListBox and ComboBox support lazy population of a Reflect*Model or slice, if it implements this interface.
type ProgressBar ¶
type ProgressBar struct {
WidgetBase
}
func NewProgressBar ¶
func NewProgressBar(parent Container) (*ProgressBar, error)
func (*ProgressBar) LayoutFlags ¶
func (*ProgressBar) LayoutFlags() LayoutFlags
func (*ProgressBar) MaxValue ¶
func (pb *ProgressBar) MaxValue() int
func (*ProgressBar) MinSizeHint ¶
func (pb *ProgressBar) MinSizeHint() Size
func (*ProgressBar) MinValue ¶
func (pb *ProgressBar) MinValue() int
func (*ProgressBar) SetRange ¶
func (pb *ProgressBar) SetRange(min, max int)
func (*ProgressBar) SetValue ¶
func (pb *ProgressBar) SetValue(value int)
func (*ProgressBar) SizeHint ¶
func (pb *ProgressBar) SizeHint() Size
func (*ProgressBar) Value ¶
func (pb *ProgressBar) Value() int
type ProgressIndicator ¶
type ProgressIndicator struct {
// contains filtered or unexported fields
}
func (*ProgressIndicator) Completed ¶
func (pi *ProgressIndicator) Completed() uint32
func (*ProgressIndicator) SetCompleted ¶
func (pi *ProgressIndicator) SetCompleted(completed uint32) error
func (*ProgressIndicator) SetState ¶
func (pi *ProgressIndicator) SetState(state PIState) error
func (*ProgressIndicator) SetTotal ¶
func (pi *ProgressIndicator) SetTotal(total uint32)
func (*ProgressIndicator) State ¶
func (pi *ProgressIndicator) State() PIState
func (*ProgressIndicator) Total ¶
func (pi *ProgressIndicator) Total() uint32
type Property ¶
type Property interface { ReadOnly() bool Get() interface{} Set(value interface{}) error Changed() *Event Source() interface{} SetSource(source interface{}) error Validatable() bool Validator() Validator SetValidator(validator Validator) error }
func NewBoolProperty ¶
func NewProperty ¶
func NewReadOnlyBoolProperty ¶
func NewReadOnlyProperty ¶
type PushButton ¶
type PushButton struct {
Button
}
func NewPushButton ¶
func NewPushButton(parent Container) (*PushButton, error)
func (*PushButton) LayoutFlags ¶
func (*PushButton) LayoutFlags() LayoutFlags
func (*PushButton) MinSizeHint ¶
func (pb *PushButton) MinSizeHint() Size
func (*PushButton) SizeHint ¶
func (pb *PushButton) SizeHint() Size
type RadioButton ¶
type RadioButton struct { Button // contains filtered or unexported fields }
func NewRadioButton ¶
func NewRadioButton(parent Container) (*RadioButton, error)
func (*RadioButton) Group ¶
func (rb *RadioButton) Group() *RadioButtonGroup
func (*RadioButton) LayoutFlags ¶
func (*RadioButton) LayoutFlags() LayoutFlags
func (*RadioButton) MinSizeHint ¶
func (rb *RadioButton) MinSizeHint() Size
func (*RadioButton) SetValue ¶
func (rb *RadioButton) SetValue(value interface{})
func (*RadioButton) SizeHint ¶
func (rb *RadioButton) SizeHint() Size
func (*RadioButton) Value ¶
func (rb *RadioButton) Value() interface{}
type RadioButtonGroup ¶
type RadioButtonGroup struct {
// contains filtered or unexported fields
}
func (*RadioButtonGroup) Buttons ¶
func (rbg *RadioButtonGroup) Buttons() []*RadioButton
func (*RadioButtonGroup) CheckedButton ¶
func (rbg *RadioButtonGroup) CheckedButton() *RadioButton
type RangeValidator ¶
type RangeValidator struct {
// contains filtered or unexported fields
}
func NewRangeValidator ¶
func NewRangeValidator(min, max float64) (*RangeValidator, error)
func (*RangeValidator) Max ¶
func (rv *RangeValidator) Max() float64
func (*RangeValidator) Min ¶
func (rv *RangeValidator) Min() float64
func (*RangeValidator) Validate ¶
func (rv *RangeValidator) Validate(v interface{}) error
type ReflectListModel ¶
type ReflectListModel interface { // Items returns the model data, which must be a slice of pointer to struct. Items() interface{} // ItemsReset returns the event that the model should publish when the // number of its items changes. ItemsReset() *Event // ItemChanged returns the event that the model should publish when an item // was changed. ItemChanged() *IntEvent // contains filtered or unexported methods }
ReflectListModel provides an alternative to the ListModel interface. It uses reflection to obtain data.
type ReflectListModelBase ¶
type ReflectListModelBase struct { ListModelBase // contains filtered or unexported fields }
ReflectListModelBase implements the ItemsReset and ItemChanged methods of the ReflectListModel interface.
func (*ReflectListModelBase) Value ¶
func (rlmb *ReflectListModelBase) Value(index int) interface{}
type ReflectTableModel ¶
type ReflectTableModel interface { // Items returns the model data, which must be a slice of pointer to struct. Items() interface{} // RowsReset returns the event that the model should publish when the // number of its items changes. RowsReset() *Event // RowChanged returns the event that the model should publish when an item // was changed. RowChanged() *IntEvent // contains filtered or unexported methods }
ReflectTableModel provides an alternative to the TableModel interface. It uses reflection to obtain data.
type ReflectTableModelBase ¶
type ReflectTableModelBase struct { TableModelBase // contains filtered or unexported fields }
ReflectTableModelBase implements the ItemsReset and ItemChanged methods of the ReflectTableModel interface.
func (*ReflectTableModelBase) Value ¶
func (rtmb *ReflectTableModelBase) Value(row, col int) interface{}
type RegexpValidator ¶
type RegexpValidator struct {
// contains filtered or unexported fields
}
func NewRegexpValidator ¶
func NewRegexpValidator(pattern string) (*RegexpValidator, error)
func (*RegexpValidator) Pattern ¶
func (rv *RegexpValidator) Pattern() string
func (*RegexpValidator) Validate ¶
func (rv *RegexpValidator) Validate(v interface{}) error
type RegistryKey ¶
type RegistryKey struct {
// contains filtered or unexported fields
}
func ClassesRootKey ¶
func ClassesRootKey() *RegistryKey
func CurrentUserKey ¶
func CurrentUserKey() *RegistryKey
func LocalMachineKey ¶
func LocalMachineKey() *RegistryKey
type RootWidget ¶
type SolidColorBrush ¶
type SolidColorBrush struct {
// contains filtered or unexported fields
}
func NewSolidColorBrush ¶
func NewSolidColorBrush(color Color) (*SolidColorBrush, error)
func (*SolidColorBrush) Color ¶
func (b *SolidColorBrush) Color() Color
func (*SolidColorBrush) Dispose ¶
func (b *SolidColorBrush) Dispose()
type SortedReflectTableModelBase ¶
type SortedReflectTableModelBase struct { ReflectTableModelBase SorterBase // contains filtered or unexported fields }
SortedReflectTableModelBase implements the RowsReset and RowChanged methods of the ReflectTableModel interface as well as the Sorter interface for pre-implemented in-memory sorting.
type Sorter ¶
type Sorter interface { // ColumnSortable returns whether column col is sortable. ColumnSortable(col int) bool // Sort sorts column col in order order. // // If col is -1 then no column is to be sorted. Sort must publish the event // returned from SortChanged() after sorting. Sort(col int, order SortOrder) error // SortChanged returns an event that is published after sorting. SortChanged() *Event // SortedColumn returns the index of the currently sorted column, or -1 if // no column is currently sorted. SortedColumn() int // SortOrder returns the current sort order. SortOrder() SortOrder }
Sorter is the interface that a model must implement to support sorting with a widget like TableView.
type SorterBase ¶
type SorterBase struct {
// contains filtered or unexported fields
}
SorterBase implements the Sorter interface.
You still need to provide your own implementation of at least the Sort method to actually sort and reset the model. Your Sort method should call the SorterBase implementation so the SortChanged event, that e.g. a TableView widget depends on, is published.
func (*SorterBase) ColumnSortable ¶
func (sb *SorterBase) ColumnSortable(col int) bool
func (*SorterBase) SortChanged ¶
func (sb *SorterBase) SortChanged() *Event
func (*SorterBase) SortOrder ¶
func (sb *SorterBase) SortOrder() SortOrder
func (*SorterBase) SortedColumn ¶
func (sb *SorterBase) SortedColumn() int
type Spacer ¶
type Spacer struct { WidgetBase // contains filtered or unexported fields }
func NewHSpacer ¶
func NewVSpacer ¶
func (*Spacer) LayoutFlags ¶
func (s *Spacer) LayoutFlags() LayoutFlags
type Splitter ¶
type Splitter struct { ContainerBase // contains filtered or unexported fields }
func NewHSplitter ¶
func NewVSplitter ¶
func (*Splitter) HandleWidth ¶
func (*Splitter) LayoutFlags ¶
func (s *Splitter) LayoutFlags() LayoutFlags
func (*Splitter) Orientation ¶
func (s *Splitter) Orientation() Orientation
func (*Splitter) Persistent ¶
func (*Splitter) RestoreState ¶
func (*Splitter) SetHandleWidth ¶
func (*Splitter) SetPersistent ¶
type SystemColorBrush ¶
type SystemColorBrush struct {
// contains filtered or unexported fields
}
func NewSystemColorBrush ¶
func NewSystemColorBrush(colorIndex int) (*SystemColorBrush, error)
func (*SystemColorBrush) ColorIndex ¶
func (b *SystemColorBrush) ColorIndex() int
func (*SystemColorBrush) Dispose ¶
func (b *SystemColorBrush) Dispose()
type TabPage ¶
type TabPage struct { ContainerBase // contains filtered or unexported fields }
func NewTabPage ¶
type TabPageList ¶
type TabPageList struct {
// contains filtered or unexported fields
}
func (*TabPageList) Add ¶
func (l *TabPageList) Add(item *TabPage) error
func (*TabPageList) At ¶
func (l *TabPageList) At(index int) *TabPage
func (*TabPageList) Clear ¶
func (l *TabPageList) Clear() error
func (*TabPageList) Contains ¶
func (l *TabPageList) Contains(item *TabPage) bool
func (*TabPageList) Index ¶
func (l *TabPageList) Index(item *TabPage) int
func (*TabPageList) Len ¶
func (l *TabPageList) Len() int
func (*TabPageList) Remove ¶
func (l *TabPageList) Remove(item *TabPage) error
func (*TabPageList) RemoveAt ¶
func (l *TabPageList) RemoveAt(index int) error
type TabWidget ¶
type TabWidget struct { WidgetBase // contains filtered or unexported fields }
func NewTabWidget ¶
func (*TabWidget) CurrentIndex ¶
func (*TabWidget) CurrentIndexChanged ¶
func (*TabWidget) LayoutFlags ¶
func (tw *TabWidget) LayoutFlags() LayoutFlags
func (*TabWidget) MinSizeHint ¶
func (*TabWidget) Pages ¶
func (tw *TabWidget) Pages() *TabPageList
func (*TabWidget) Persistent ¶
func (*TabWidget) RestoreState ¶
func (*TabWidget) SetCurrentIndex ¶
func (*TabWidget) SetEnabled ¶
func (*TabWidget) SetPersistent ¶
type TableModel ¶
type TableModel interface { // RowCount returns the number of rows in the model. RowCount() int // Value returns the value that should be displayed for the given cell. Value(row, col int) interface{} // RowsReset returns the event that the model should publish when the number // of its rows changes. RowsReset() *Event // RowChanged returns the event that the model should publish when a row was // changed. RowChanged() *IntEvent }
TableModel is the interface that a model must implement to support widgets like TableView.
type TableModelBase ¶
type TableModelBase struct {
// contains filtered or unexported fields
}
TableModelBase implements the RowsReset and RowChanged methods of the TableModel interface.
func (*TableModelBase) PublishRowChanged ¶
func (tmb *TableModelBase) PublishRowChanged(row int)
func (*TableModelBase) PublishRowsReset ¶
func (tmb *TableModelBase) PublishRowsReset()
func (*TableModelBase) RowChanged ¶
func (tmb *TableModelBase) RowChanged() *IntEvent
func (*TableModelBase) RowsReset ¶
func (tmb *TableModelBase) RowsReset() *Event
type TableView ¶
type TableView struct { WidgetBase // contains filtered or unexported fields }
TableView is a model based widget for record centric, tabular data.
TableView is implemented as a virtual mode list view to support quite large amounts of data.
func NewTableView ¶
NewTableView creates and returns a *TableView as child of the specified Container.
func (*TableView) AlternatingRowBGColor ¶
AlternatingRowBGColor returns the alternating row background color.
func (*TableView) CheckBoxes ¶
CheckBoxes returns if the *TableView has check boxes.
func (*TableView) ColumnClicked ¶
ColumnClicked returns the event that is published after a column header was clicked.
func (*TableView) Columns ¶
func (tv *TableView) Columns() *TableViewColumnList
Columns returns the list of columns.
func (*TableView) ColumnsOrderable ¶
ColumnsOrderable returns if the user can reorder columns by dragging and dropping column headers.
func (*TableView) ColumnsSizable ¶
ColumnsSizable returns if the user can change column widths by dragging dividers in the header.
func (*TableView) CurrentIndex ¶
CurrentIndex returns the index of the current item, or -1 if there is no current item.
func (*TableView) CurrentIndexChanged ¶
CurrentIndexChanged is the event that is published after CurrentIndex has changed.
func (*TableView) Dispose ¶
func (tv *TableView) Dispose()
Dispose releases the operating system resources, associated with the *TableView.
func (*TableView) ItemActivated ¶
ItemActivated returns the event that is published after an item was activated.
An item is activated when it is double clicked or the enter key is pressed when the item is selected.
func (*TableView) ItemStateChangedEventDelay ¶
ItemStateChangedEventDelay returns the delay in milliseconds, between the moment the state of an item in the *TableView changes and the moment the associated event is published.
By default there is no delay.
func (*TableView) LastColumnStretched ¶
LastColumnStretched returns if the last column should take up all remaining horizontal space of the *TableView.
func (*TableView) LayoutFlags ¶
func (*TableView) LayoutFlags() LayoutFlags
LayoutFlags returns a combination of LayoutFlags that specify how the *TableView wants to be treated by Layout implementations.
func (*TableView) MinSizeHint ¶
MinSizeHint returns the minimum outer Size, including decorations, that makes sense for the *TableView.
func (*TableView) Model ¶
func (tv *TableView) Model() interface{}
Model returns the model of the TableView.
func (*TableView) Persistent ¶
Persistent returns if the *TableView should persist its UI state, like column widths. See *App.Settings for details.
func (*TableView) RestoreState ¶
RestoreState restores the UI state of the *TableView from the settings.
func (*TableView) RowsPerPage ¶
RowsPerPage returns the number of fully visible rows.
func (*TableView) SelectedIndexes ¶
SelectedIndexes returns a list of the currently selected item indexes.
func (*TableView) SelectedIndexesChanged ¶
SelectedIndexesChanged returns the event that is published when the list of selected item indexes changed.
func (*TableView) SetAlternatingRowBGColor ¶
SetAlternatingRowBGColor sets the alternating row background color.
func (*TableView) SetCheckBoxes ¶
SetCheckBoxes sets if the *TableView has check boxes.
func (*TableView) SetColumnsOrderable ¶
SetColumnsOrderable sets if the user can reorder columns by dragging and dropping column headers.
func (*TableView) SetColumnsSizable ¶
SetColumnsSizable sets if the user can change column widths by dragging dividers in the header.
func (*TableView) SetCurrentIndex ¶
SetCurrentIndex sets the index of the current item.
Call this with a value of -1 to have no current item.
func (*TableView) SetItemStateChangedEventDelay ¶
SetItemStateChangedEventDelay sets the delay in milliseconds, between the moment the state of an item in the *TableView changes and the moment the associated event is published.
An example where this may be useful is a master-details scenario. If the master TableView is configured to delay the event, you can avoid pointless updates of the details TableView, if the user uses arrow keys to rapidly navigate the master view.
func (*TableView) SetLastColumnStretched ¶
SetLastColumnStretched sets if the last column should take up all remaining horizontal space of the *TableView.
The effect of setting this is persistent.
func (*TableView) SetModel ¶
SetModel sets the model of the TableView.
It is required that mdl either implements walk.TableModel, walk.ReflectTableModel or be a slice of pointers to struct or a []map[string]interface{}. A walk.TableModel implementation must also implement walk.Sorter to support sorting, all other options get sorting for free. To support item check boxes and icons, mdl must implement walk.ItemChecker and walk.ImageProvider, respectively. On-demand model population for a walk.ReflectTableModel or slice requires mdl to implement walk.Populator.
func (*TableView) SetPersistent ¶
SetPersistent sets if the *TableView should persist its UI state, like column widths. See *App.Settings for details.
func (*TableView) SetSingleItemSelection ¶
SetSingleItemSelection sets if only a single item can be selected at once.
func (*TableView) SingleItemSelection ¶
SingleItemSelection returns if only a single item can be selected at once.
By default multiple items can be selected at once.
func (*TableView) StretchLastColumn ¶
StretchLastColumn makes the last column take up all remaining horizontal space of the *TableView.
The effect of this is not persistent.
func (*TableView) UpdateItem ¶
UpdateItem ensures the item at index will be redrawn.
If the model supports sorting, it will be resorted.
func (*TableView) VisibleColumnsInDisplayOrder ¶
func (tv *TableView) VisibleColumnsInDisplayOrder() []*TableViewColumn
VisibleColumnsInDisplayOrder returns a slice of visible columns in display order.
type TableViewColumn ¶
type TableViewColumn struct {
// contains filtered or unexported fields
}
TableViewColumn represents a column in a TableView.
func NewTableViewColumn ¶
func NewTableViewColumn() *TableViewColumn
NewTableViewColumn returns a new TableViewColumn.
func (*TableViewColumn) Alignment ¶
func (tvc *TableViewColumn) Alignment() Alignment1D
Alignment returns the alignment of the TableViewColumn.
func (*TableViewColumn) DataMember ¶
func (tvc *TableViewColumn) DataMember() string
DataMember returns the data member this TableViewColumn is bound against.
func (*TableViewColumn) Format ¶
func (tvc *TableViewColumn) Format() string
Format returns the format string for converting a value into a string.
func (*TableViewColumn) Precision ¶
func (tvc *TableViewColumn) Precision() int
Precision returns the number of decimal places for formatting float32, float64 or big.Rat values.
func (*TableViewColumn) SetAlignment ¶
func (tvc *TableViewColumn) SetAlignment(alignment Alignment1D) (err error)
SetAlignment sets the alignment of the TableViewColumn.
func (*TableViewColumn) SetDataMember ¶
func (tvc *TableViewColumn) SetDataMember(dataMember string)
SetDataMember sets the data member this TableViewColumn is bound against.
func (*TableViewColumn) SetFormat ¶
func (tvc *TableViewColumn) SetFormat(format string) (err error)
SetFormat sets the format string for converting a value into a string.
func (*TableViewColumn) SetPrecision ¶
func (tvc *TableViewColumn) SetPrecision(precision int) (err error)
SetPrecision sets the number of decimal places for formatting float32, float64 or big.Rat values.
func (*TableViewColumn) SetTitle ¶
func (tvc *TableViewColumn) SetTitle(title string) (err error)
SetTitle sets the (default) text to display in the column header.
func (*TableViewColumn) SetTitleOverride ¶
func (tvc *TableViewColumn) SetTitleOverride(titleOverride string) (err error)
SetTitleOverride sets the (overridden by user) text to display in the column header.
func (*TableViewColumn) SetVisible ¶
func (tvc *TableViewColumn) SetVisible(visible bool) (err error)
SetVisible sets if the column is visible.
func (*TableViewColumn) SetWidth ¶
func (tvc *TableViewColumn) SetWidth(width int) (err error)
SetWidth sets the width of the column in pixels.
func (*TableViewColumn) Title ¶
func (tvc *TableViewColumn) Title() string
Title returns the (default) text to display in the column header.
func (*TableViewColumn) TitleEffective ¶
func (tvc *TableViewColumn) TitleEffective() string
TitleEffective returns the effective text to display in the column header.
func (*TableViewColumn) TitleOverride ¶
func (tvc *TableViewColumn) TitleOverride() string
TitleOverride returns the (overridden by user) text to display in the column header.
func (*TableViewColumn) Visible ¶
func (tvc *TableViewColumn) Visible() bool
Visible returns if the column is visible.
func (*TableViewColumn) Width ¶
func (tvc *TableViewColumn) Width() int
Width returns the width of the column in pixels.
type TableViewColumnList ¶
type TableViewColumnList struct {
// contains filtered or unexported fields
}
func (*TableViewColumnList) Add ¶
func (l *TableViewColumnList) Add(item *TableViewColumn) error
Add adds a TableViewColumn to the end of the list.
func (*TableViewColumnList) At ¶
func (l *TableViewColumnList) At(index int) *TableViewColumn
At returns the TableViewColumn as the specified index.
Bounds are not checked.
func (*TableViewColumnList) Clear ¶
func (l *TableViewColumnList) Clear() error
Clear removes all TableViewColumns from the list.
func (*TableViewColumnList) Contains ¶
func (l *TableViewColumnList) Contains(item *TableViewColumn) bool
Contains returns whether the specified TableViewColumn is found in the list.
func (*TableViewColumnList) Index ¶
func (l *TableViewColumnList) Index(item *TableViewColumn) int
Index returns the index of the specified TableViewColumn or -1 if it is not found.
func (*TableViewColumnList) Insert ¶
func (l *TableViewColumnList) Insert(index int, item *TableViewColumn) error
Insert inserts TableViewColumn item at position index.
A TableViewColumn cannot be contained in multiple TableViewColumnLists at the same time.
func (*TableViewColumnList) Len ¶
func (l *TableViewColumnList) Len() int
Len returns the number of TableViewColumns in the list.
func (*TableViewColumnList) Remove ¶
func (l *TableViewColumnList) Remove(item *TableViewColumn) error
Remove removes the specified TableViewColumn from the list.
func (*TableViewColumnList) RemoveAt ¶
func (l *TableViewColumnList) RemoveAt(index int) error
RemoveAt removes the TableViewColumn at position index.
type TextEdit ¶
type TextEdit struct { WidgetBase // contains filtered or unexported fields }
func NewTextEdit ¶
func (*TextEdit) AppendText ¶
func (*TextEdit) LayoutFlags ¶
func (*TextEdit) LayoutFlags() LayoutFlags
func (*TextEdit) MinSizeHint ¶
func (*TextEdit) ReplaceSelectedText ¶
func (*TextEdit) SetReadOnly ¶
func (*TextEdit) SetTextSelection ¶
func (*TextEdit) TextChanged ¶
func (*TextEdit) TextLength ¶
func (*TextEdit) TextSelection ¶
type ToolBar ¶
type ToolBar struct { WidgetBase // contains filtered or unexported fields }
func NewToolBar ¶
func NewVerticalToolBar ¶
func (*ToolBar) Actions ¶
func (tb *ToolBar) Actions() *ActionList
func (*ToolBar) DefaultButtonWidth ¶
DefaultButtonWidth returns the default button width of the ToolBar.
The default value for a horizontal ToolBar is 0, resulting in automatic sizing behavior. For a vertical ToolBar, the default is 100 pixels.
func (*ToolBar) LayoutFlags ¶
func (tb *ToolBar) LayoutFlags() LayoutFlags
func (*ToolBar) MaxTextRows ¶
func (*ToolBar) MinSizeHint ¶
func (*ToolBar) SetDefaultButtonWidth ¶
SetDefaultButtonWidth sets the default button width of the ToolBar.
Calling this method affects all buttons in the ToolBar, no matter if they are added before or after the call. A width of 0 results in automatic sizing behavior. Negative values are not allowed.
func (*ToolBar) SetImageList ¶
func (*ToolBar) SetMaxTextRows ¶
type ToolButton ¶
type ToolButton struct {
Button
}
func NewToolButton ¶
func NewToolButton(parent Container) (*ToolButton, error)
func (*ToolButton) LayoutFlags ¶
func (*ToolButton) LayoutFlags() LayoutFlags
func (*ToolButton) MinSizeHint ¶
func (tb *ToolButton) MinSizeHint() Size
func (*ToolButton) SizeHint ¶
func (tb *ToolButton) SizeHint() Size
type ToolTip ¶
type ToolTip struct {
WidgetBase
}
func NewToolTip ¶
func (*ToolTip) LayoutFlags ¶
func (*ToolTip) LayoutFlags() LayoutFlags
func (*ToolTip) RemoveTool ¶
func (*ToolTip) SetErrorTitle ¶
func (*ToolTip) SetInfoTitle ¶
func (*ToolTip) SetWarningTitle ¶
type TopLevelWindow ¶
type TopLevelWindow struct { ContainerBase // contains filtered or unexported fields }
func (*TopLevelWindow) Close ¶
func (tlw *TopLevelWindow) Close() error
func (*TopLevelWindow) Closing ¶
func (tlw *TopLevelWindow) Closing() *CloseEvent
func (*TopLevelWindow) Enabled ¶
func (tlw *TopLevelWindow) Enabled() bool
func (*TopLevelWindow) Font ¶
func (tlw *TopLevelWindow) Font() *Font
func (*TopLevelWindow) Hide ¶
func (tlw *TopLevelWindow) Hide()
func (*TopLevelWindow) Icon ¶
func (tlw *TopLevelWindow) Icon() *Icon
func (*TopLevelWindow) LayoutFlags ¶
func (tlw *TopLevelWindow) LayoutFlags() LayoutFlags
func (*TopLevelWindow) Owner ¶
func (tlw *TopLevelWindow) Owner() RootWidget
func (*TopLevelWindow) ProgressIndicator ¶
func (tlw *TopLevelWindow) ProgressIndicator() *ProgressIndicator
func (*TopLevelWindow) RestoreState ¶
func (tlw *TopLevelWindow) RestoreState() error
func (*TopLevelWindow) Run ¶
func (tlw *TopLevelWindow) Run() int
func (*TopLevelWindow) SaveState ¶
func (tlw *TopLevelWindow) SaveState() error
func (*TopLevelWindow) SetEnabled ¶
func (tlw *TopLevelWindow) SetEnabled(enabled bool)
func (*TopLevelWindow) SetIcon ¶
func (tlw *TopLevelWindow) SetIcon(icon *Icon)
func (*TopLevelWindow) SetOwner ¶
func (tlw *TopLevelWindow) SetOwner(value RootWidget) error
func (*TopLevelWindow) SetTitle ¶
func (tlw *TopLevelWindow) SetTitle(value string) error
func (*TopLevelWindow) Show ¶
func (tlw *TopLevelWindow) Show()
func (*TopLevelWindow) SizeHint ¶
func (tlw *TopLevelWindow) SizeHint() Size
func (*TopLevelWindow) Starting ¶
func (tlw *TopLevelWindow) Starting() *Event
func (*TopLevelWindow) Title ¶
func (tlw *TopLevelWindow) Title() string
type TranslationFunction ¶
func TranslationFunc ¶
func TranslationFunc() TranslationFunction
type TreeItem ¶
type TreeItem interface { // Text returns the text of the item. Text() string // Parent returns the parent of the item. Parent() TreeItem // ChildCount returns the number of children of the item. ChildCount() int // ChildAt returns the child at the specified index. ChildAt(index int) TreeItem }
TreeItem represents an item in a TreeView widget.
type TreeItemEvent ¶
type TreeItemEvent struct {
// contains filtered or unexported fields
}
func (*TreeItemEvent) Attach ¶
func (e *TreeItemEvent) Attach(handler TreeItemEventHandler) int
func (*TreeItemEvent) Detach ¶
func (e *TreeItemEvent) Detach(handle int)
type TreeItemEventHandler ¶
type TreeItemEventHandler func(item TreeItem)
type TreeItemEventPublisher ¶
type TreeItemEventPublisher struct {
// contains filtered or unexported fields
}
func (*TreeItemEventPublisher) Event ¶
func (p *TreeItemEventPublisher) Event() *TreeItemEvent
func (*TreeItemEventPublisher) Publish ¶
func (p *TreeItemEventPublisher) Publish(item TreeItem)
type TreeModel ¶
type TreeModel interface { // LazyPopulation returns if the model prefers on-demand population. // // This is useful for models that potentially contain huge amounts of items, // e.g. a model that represents a file system. LazyPopulation() bool // RootCount returns the number of root items. RootCount() int // RootAt returns the root item at the specified index. RootAt(index int) TreeItem // ItemsReset returns the event that the model should publish when the // descendants of the specified item, or all items if no item is specified, // are reset. ItemsReset() *TreeItemEvent // ItemChanged returns the event that the model should publish when an item // was changed. ItemChanged() *TreeItemEvent }
TreeModel provides widgets like TreeView with item data.
type TreeModelBase ¶
type TreeModelBase struct {
// contains filtered or unexported fields
}
TreeModelBase partially implements the TreeModel interface.
You still need to provide your own implementation of at least the RootCount and RootAt methods. If your model needs lazy population, you will also have to implement LazyPopulation.
func (*TreeModelBase) ItemChanged ¶
func (tmb *TreeModelBase) ItemChanged() *TreeItemEvent
func (*TreeModelBase) ItemsReset ¶
func (tmb *TreeModelBase) ItemsReset() *TreeItemEvent
func (*TreeModelBase) LazyPopulation ¶
func (tmb *TreeModelBase) LazyPopulation() bool
func (*TreeModelBase) PublishItemChanged ¶
func (tmb *TreeModelBase) PublishItemChanged(item TreeItem)
func (*TreeModelBase) PublishItemsReset ¶
func (tmb *TreeModelBase) PublishItemsReset(parent TreeItem)
type TreeView ¶
type TreeView struct { WidgetBase // contains filtered or unexported fields }
func NewTreeView ¶
func (*TreeView) CurrentItem ¶
func (*TreeView) CurrentItemChanged ¶
func (*TreeView) ItemCollapsed ¶
func (tv *TreeView) ItemCollapsed() *TreeItemEvent
func (*TreeView) ItemExpanded ¶
func (tv *TreeView) ItemExpanded() *TreeItemEvent
func (*TreeView) LayoutFlags ¶
func (*TreeView) LayoutFlags() LayoutFlags
func (*TreeView) SetCurrentItem ¶
type Validator ¶
type Validator interface {
Validate(v interface{}) error
}
func SelectionRequiredValidator ¶
func SelectionRequiredValidator() Validator
type WebView ¶
type WebView struct { WidgetBase // contains filtered or unexported fields }
func NewWebView ¶
func (*WebView) LayoutFlags ¶
func (*WebView) LayoutFlags() LayoutFlags
func (*WebView) URLChanged ¶
type Widget ¶
type Widget interface { // Background returns the background Brush of the Widget. // // By default this is nil. Background() Brush // BaseWidget returns a *WidgetBase, a pointer to an instance of the struct // that implements most operations common to all widgets. BaseWidget() *WidgetBase // Bounds returns the outer bounding box Rectangle of the Widget, including // decorations. // // For a RootWidget, like *MainWindow or *Dialog, the Rectangle is in screen // coordinates, for a child Widget the coordinates are relative to its // parent. Bounds() Rectangle // BringToTop moves the Widget to the top of the keyboard focus order. BringToTop() error // ClientBounds returns the inner bounding box Rectangle of the Widget, // excluding decorations. ClientBounds() Rectangle // ContextMenu returns the context menu of the Widget. // // By default this is nil. ContextMenu() *Menu // CreateCanvas creates and returns a *Canvas that can be used to draw // inside the ClientBounds of the Widget. // // Remember to call the Dispose method on the canvas to release resources, // when you no longer need it. CreateCanvas() (*Canvas, error) // Cursor returns the Cursor of the Widget. // // By default this is nil. Cursor() Cursor // DescendantByName traverses a widget's children and returns a widget // matching the given name, or nil if not found DescendantByName(name string) Widget // Dispose releases the operating system resources, associated with the // Widget. // // If a user closes a *MainWindow or *Dialog, it is automatically released. // Also, if a Container is disposed of, all its descendants will be released // as well. Dispose() // Enabled returns if the Widget is enabled for user interaction. Enabled() bool // Font returns the *Font of the Widget. // // By default this is a MS Shell Dlg 2, 8 point font. Font() *Font // Handle returns the window handle of the Widget. Handle() HWND // Height returns the outer height of the Widget, including decorations. Height() int // Invalidate schedules a full repaint of the Widget. Invalidate() error // IsDisposed returns if the Widget has been disposed of. IsDisposed() bool // KeyDown returns a *KeyEvent that you can attach to for handling key down // events for the Widget. KeyDown() *KeyEvent // KeyPress returns a *KeyEvent that you can attach to for handling key // press events for the Widget. KeyPress() *KeyEvent // KeyUp returns a *KeyEvent that you can attach to for handling key up // events for the Widget. KeyUp() *KeyEvent // LayoutFlags returns a combination of LayoutFlags that specify how the // Widget wants to be treated by Layout implementations. LayoutFlags() LayoutFlags // MaxSize returns the maximum allowed outer Size for the Widget, including // decorations. // // For child widgets, this is only relevant when the parent of the Widget // has a Layout. RootWidgets, like *MainWindow and *Dialog, also honor this. MaxSize() Size // MinSize returns the minimum allowed outer Size for the Widget, including // decorations. // // For child widgets, this is only relevant when the parent of the Widget // has a Layout. RootWidgets, like *MainWindow and *Dialog, also honor this. MinSize() Size // MinSizeHint returns the minimum outer Size, including decorations, that // makes sense for the respective type of Widget. MinSizeHint() Size // MouseDown returns a *MouseEvent that you can attach to for handling // mouse down events for the Widget. MouseDown() *MouseEvent // MouseMove returns a *MouseEvent that you can attach to for handling // mouse move events for the Widget. MouseMove() *MouseEvent // MouseUp returns a *MouseEvent that you can attach to for handling // mouse up events for the Widget. MouseUp() *MouseEvent // Name returns the name of the Widget. Name() string // Parent returns the Container of the Widget. // // For RootWidgets, like *MainWindow and *Dialog, this is always nil. Parent() Container // RootWidget returns the root of the UI hierarchy of the Widget, which is // usually a *MainWindow or *Dialog. RootWidget() RootWidget // SendMessage sends a message to the window and returns the result. SendMessage(msg uint32, wParam, lParam uintptr) uintptr // SetBackground sets the background Brush of the Widget. SetBackground(value Brush) // SetBounds sets the outer bounding box Rectangle of the Widget, including // decorations. // // For a RootWidget, like *MainWindow or *Dialog, the Rectangle is in screen // coordinates, for a child Widget the coordinates are relative to its // parent. SetBounds(value Rectangle) error // SetClientSize sets the Size of the inner bounding box of the Widget, // excluding decorations. SetClientSize(value Size) error // SetContextMenu sets the context menu of the Widget. SetContextMenu(value *Menu) // SetCursor sets the Cursor of the Widget. SetCursor(value Cursor) // SetEnabled sets if the Widget is enabled for user interaction. SetEnabled(value bool) // SetFocus sets the keyboard input focus to the Widget. SetFocus() error // SetFont sets the *Font of the Widget. SetFont(value *Font) // SetHeight sets the outer height of the Widget, including decorations. SetHeight(value int) error // SetMinMaxSize sets the minimum and maximum outer Size of the Widget, // including decorations. // // Use walk.Size{} to make the respective limit be ignored. SetMinMaxSize(min, max Size) error // SetName sets the name of the Widget. // // This is important if you want to make use of the built-in UI persistence. // Some widgets support automatic state persistence. See Settings for // details. SetName(name string) // SetParent sets the parent of the Widget and adds the Widget to the // Children list of the Container. SetParent(value Container) error // SetSize sets the outer Size of the Widget, including decorations. SetSize(value Size) error // SetSuspended sets if the Widget is suspended for layout and repainting // purposes. // // You should call SetSuspended(true), before doing a batch of modifications // that would cause multiple layout or drawing updates. Remember to call // SetSuspended(false) afterwards, which will update the Widget accordingly. SetSuspended(suspend bool) // SetToolTipText sets the tool tip text of the Widget. SetToolTipText(s string) error // SetVisible sets if the Widget is visible. SetVisible(value bool) // SetWidth sets the outer width of the Widget, including decorations. SetWidth(value int) error // SetX sets the x coordinate of the Widget, relative to the screen for // RootWidgets like *MainWindow or *Dialog and relative to the parent for // child Widgets. SetX(value int) error // SetY sets the y coordinate of the Widget, relative to the screen for // RootWidgets like *MainWindow or *Dialog and relative to the parent for // child Widgets. SetY(value int) error // Size returns the outer Size of the Widget, including decorations. Size() Size // SizeChanged returns an *Event that you can attach to for handling size // changed events for the Widget. SizeChanged() *Event // SizeHint returns the preferred Size for the respective type of Widget. SizeHint() Size // Suspended returns if the Widget is suspended for layout and repainting // purposes. Suspended() bool // Synchronize enqueues func f to be called some time later by the main // goroutine from inside a message loop. Synchronize(f func()) // ToolTipText returns the tool tip text of the Widget. ToolTipText() string // Visible returns if the Widget is visible. Visible() bool // Width returns the outer width of the Widget, including decorations. Width() int // WndProc is the window procedure of the widget. // // When implementing your own WndProc to add or modify behavior, call the // WndProc of the embedded widget for messages you don't handle yourself. WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr // X returns the x coordinate of the Widget, relative to the screen for // RootWidgets like *MainWindow or *Dialog and relative to the parent for // child Widgets. X() int // Y returns the y coordinate of the Widget, relative to the screen for // RootWidgets like *MainWindow or *Dialog and relative to the parent for // child Widgets. Y() int }
Widget is an interface that provides operations common to all widgets.
type WidgetBase ¶
type WidgetBase struct {
// contains filtered or unexported fields
}
WidgetBase implements many operations common to all Widgets.
func (*WidgetBase) Background ¶
func (wb *WidgetBase) Background() Brush
Background returns the background Brush of the *WidgetBase.
By default this is nil.
func (*WidgetBase) BaseWidget ¶
func (wb *WidgetBase) BaseWidget() *WidgetBase
BaseWidget simply returns the receiver.
func (*WidgetBase) Bounds ¶
func (wb *WidgetBase) Bounds() Rectangle
Bounds returns the outer bounding box Rectangle of the *WidgetBase, including decorations.
For a RootWidget, like *MainWindow or *Dialog, the Rectangle is in screen coordinates, for a child Widget the coordinates are relative to its parent.
func (*WidgetBase) BringToTop ¶
func (wb *WidgetBase) BringToTop() error
BringToTop moves the *WidgetBase to the top of the keyboard focus order.
func (*WidgetBase) ClientBounds ¶
func (wb *WidgetBase) ClientBounds() Rectangle
ClientBounds returns the inner bounding box Rectangle of the *WidgetBase, excluding decorations.
func (*WidgetBase) ContextMenu ¶
func (wb *WidgetBase) ContextMenu() *Menu
ContextMenu returns the context menu of the *WidgetBase.
By default this is nil.
func (*WidgetBase) CreateCanvas ¶
func (wb *WidgetBase) CreateCanvas() (*Canvas, error)
CreateCanvas creates and returns a *Canvas that can be used to draw inside the ClientBounds of the *WidgetBase.
Remember to call the Dispose method on the canvas to release resources, when you no longer need it.
func (*WidgetBase) Cursor ¶
func (wb *WidgetBase) Cursor() Cursor
Cursor returns the Cursor of the *WidgetBase.
By default this is nil.
func (*WidgetBase) DescendantByName ¶
func (wb *WidgetBase) DescendantByName(name string) (widget Widget)
func (*WidgetBase) Dispose ¶
func (wb *WidgetBase) Dispose()
Dispose releases the operating system resources, associated with the *WidgetBase.
If a user closes a *MainWindow or *Dialog, it is automatically released. Also, if a Container is disposed of, all its descendants will be released as well.
func (*WidgetBase) Enabled ¶
func (wb *WidgetBase) Enabled() bool
Enabled returns if the *WidgetBase is enabled for user interaction.
func (*WidgetBase) Font ¶
func (wb *WidgetBase) Font() *Font
Font returns the *Font of the *WidgetBase.
By default this is a MS Shell Dlg 2, 8 point font.
func (*WidgetBase) Handle ¶
func (wb *WidgetBase) Handle() HWND
Handle returns the window handle of the Widget.
func (*WidgetBase) Height ¶
func (wb *WidgetBase) Height() int
Height returns the outer height of the *WidgetBase, including decorations.
func (*WidgetBase) Invalidate ¶
func (wb *WidgetBase) Invalidate() error
Invalidate schedules a full repaint of the *WidgetBase.
func (*WidgetBase) IsDisposed ¶
func (wb *WidgetBase) IsDisposed() bool
IsDisposed returns if the *WidgetBase has been disposed of.
func (*WidgetBase) KeyDown ¶
func (wb *WidgetBase) KeyDown() *KeyEvent
KeyDown returns a *KeyEvent that you can attach to for handling key down events for the *WidgetBase.
func (*WidgetBase) KeyPress ¶
func (wb *WidgetBase) KeyPress() *KeyEvent
KeyPress returns a *KeyEvent that you can attach to for handling key press events for the *WidgetBase.
func (*WidgetBase) KeyUp ¶
func (wb *WidgetBase) KeyUp() *KeyEvent
KeyUp returns a *KeyEvent that you can attach to for handling key up events for the *WidgetBase.
func (*WidgetBase) LayoutFlags ¶
func (wb *WidgetBase) LayoutFlags() LayoutFlags
LayoutFlags returns a combination of LayoutFlags that specify how the *WidgetBase wants to be treated by Layout implementations.
func (*WidgetBase) MaxSize ¶
func (wb *WidgetBase) MaxSize() Size
MaxSize returns the maximum allowed outer Size for the *WidgetBase, including decorations.
For child widgets, this is only relevant when the parent of the *WidgetBase has a Layout. RootWidgets, like *MainWindow and *Dialog, also honor this.
func (*WidgetBase) MinSize ¶
func (wb *WidgetBase) MinSize() Size
MinSize returns the minimum allowed outer Size for the *WidgetBase, including decorations.
For child widgets, this is only relevant when the parent of the *WidgetBase has a Layout. RootWidgets, like *MainWindow and *Dialog, also honor this.
func (*WidgetBase) MinSizeHint ¶
func (wb *WidgetBase) MinSizeHint() Size
MinSizeHint returns the minimum outer Size, including decorations, that makes sense for the respective type of Widget.
func (*WidgetBase) MouseDown ¶
func (wb *WidgetBase) MouseDown() *MouseEvent
MouseDown returns a *MouseEvent that you can attach to for handling mouse down events for the *WidgetBase.
func (*WidgetBase) MouseMove ¶
func (wb *WidgetBase) MouseMove() *MouseEvent
MouseMove returns a *MouseEvent that you can attach to for handling mouse move events for the *WidgetBase.
func (*WidgetBase) MouseUp ¶
func (wb *WidgetBase) MouseUp() *MouseEvent
MouseUp returns a *MouseEvent that you can attach to for handling mouse up events for the *WidgetBase.
func (*WidgetBase) MustRegisterProperty ¶
func (wb *WidgetBase) MustRegisterProperty(name string, property Property)
func (*WidgetBase) Name ¶
func (wb *WidgetBase) Name() string
Name returns the name of the *WidgetBase.
func (*WidgetBase) Parent ¶
func (wb *WidgetBase) Parent() Container
Parent returns the Container of the *WidgetBase.
For RootWidgets, like *MainWindow and *Dialog, this is always nil.
func (*WidgetBase) Property ¶
func (wb *WidgetBase) Property(name string) Property
func (*WidgetBase) RootWidget ¶
func (wb *WidgetBase) RootWidget() RootWidget
RootWidget returns the root of the UI hierarchy of the *WidgetBase, which is usually a *MainWindow or *Dialog.
func (*WidgetBase) SendMessage ¶
func (wb *WidgetBase) SendMessage(msg uint32, wParam, lParam uintptr) uintptr
SendMessage sends a message to the window and returns the result.
func (*WidgetBase) SetBackground ¶
func (wb *WidgetBase) SetBackground(value Brush)
SetBackground sets the background Brush of the *WidgetBase.
func (*WidgetBase) SetBounds ¶
func (wb *WidgetBase) SetBounds(bounds Rectangle) error
SetBounds returns the outer bounding box Rectangle of the *WidgetBase, including decorations.
For a RootWidget, like *MainWindow or *Dialog, the Rectangle is in screen coordinates, for a child Widget the coordinates are relative to its parent.
func (*WidgetBase) SetClientSize ¶
func (wb *WidgetBase) SetClientSize(value Size) error
SetClientSize sets the Size of the inner bounding box of the *WidgetBase, excluding decorations.
func (*WidgetBase) SetContextMenu ¶
func (wb *WidgetBase) SetContextMenu(value *Menu)
SetContextMenu sets the context menu of the *WidgetBase.
func (*WidgetBase) SetCursor ¶
func (wb *WidgetBase) SetCursor(value Cursor)
SetCursor sets the Cursor of the *WidgetBase.
func (*WidgetBase) SetEnabled ¶
func (wb *WidgetBase) SetEnabled(value bool)
SetEnabled sets if the *WidgetBase is enabled for user interaction.
func (*WidgetBase) SetFocus ¶
func (wb *WidgetBase) SetFocus() error
SetFocus sets the keyboard input focus to the *WidgetBase.
func (*WidgetBase) SetFont ¶
func (wb *WidgetBase) SetFont(value *Font)
SetFont sets the *Font of the *WidgetBase.
func (*WidgetBase) SetHeight ¶
func (wb *WidgetBase) SetHeight(value int) error
SetHeight sets the outer height of the *WidgetBase, including decorations.
func (*WidgetBase) SetMinMaxSize ¶
func (wb *WidgetBase) SetMinMaxSize(min, max Size) error
SetMinMaxSize sets the minimum and maximum outer Size of the *WidgetBase, including decorations.
Use walk.Size{} to make the respective limit be ignored.
func (*WidgetBase) SetName ¶
func (wb *WidgetBase) SetName(name string)
SetName sets the name of the *WidgetBase.
func (*WidgetBase) SetParent ¶
func (wb *WidgetBase) SetParent(value Container) (err error)
SetParent sets the parent of the *WidgetBase and adds the *WidgetBase to the Children list of the Container.
func (*WidgetBase) SetSize ¶
func (wb *WidgetBase) SetSize(size Size) error
SetSize sets the outer Size of the *WidgetBase, including decorations.
func (*WidgetBase) SetSuspended ¶
func (wb *WidgetBase) SetSuspended(suspend bool)
SetSuspended sets if the *WidgetBase is suspended for layout and repainting purposes.
You should call SetSuspended(true), before doing a batch of modifications that would cause multiple layout or drawing updates. Remember to call SetSuspended(false) afterwards, which will update the *WidgetBase accordingly.
func (*WidgetBase) SetToolTipText ¶
func (wb *WidgetBase) SetToolTipText(s string) error
SetToolTipText sets the tool tip text of the *WidgetBase.
func (*WidgetBase) SetVisible ¶
func (wb *WidgetBase) SetVisible(visible bool)
SetVisible sets if the *WidgetBase is visible.
func (*WidgetBase) SetWidth ¶
func (wb *WidgetBase) SetWidth(value int) error
SetWidth sets the outer width of the *WidgetBase, including decorations.
func (*WidgetBase) SetX ¶
func (wb *WidgetBase) SetX(value int) error
SetX sets the x coordinate of the *WidgetBase, relative to the screen for RootWidgets like *MainWindow or *Dialog and relative to the parent for child Widgets.
func (*WidgetBase) SetY ¶
func (wb *WidgetBase) SetY(value int) error
SetY sets the y coordinate of the *WidgetBase, relative to the screen for RootWidgets like *MainWindow or *Dialog and relative to the parent for child Widgets.
func (*WidgetBase) Size ¶
func (wb *WidgetBase) Size() Size
Size returns the outer Size of the *WidgetBase, including decorations.
func (*WidgetBase) SizeChanged ¶
func (wb *WidgetBase) SizeChanged() *Event
SizeChanged returns an *Event that you can attach to for handling size changed events for the *WidgetBase.
func (*WidgetBase) SizeHint ¶
func (wb *WidgetBase) SizeHint() Size
SizeHint returns a default Size that should be "overidden" by a concrete Widget type.
func (*WidgetBase) Suspended ¶
func (wb *WidgetBase) Suspended() bool
Suspended returns if the *WidgetBase is suspended for layout and repainting purposes.
func (*WidgetBase) Synchronize ¶
func (wb *WidgetBase) Synchronize(f func())
Synchronize enqueues func f to be called some time later by the main goroutine from inside a message loop.
func (*WidgetBase) ToolTipText ¶
func (wb *WidgetBase) ToolTipText() string
ToolTipText returns the tool tip text of the *WidgetBase.
func (*WidgetBase) Visible ¶
func (wb *WidgetBase) Visible() bool
Visible returns if the *WidgetBase is visible.
func (*WidgetBase) Width ¶
func (wb *WidgetBase) Width() int
Width returns the outer width of the *WidgetBase, including decorations.
func (*WidgetBase) WndProc ¶
func (wb *WidgetBase) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr
WndProc is the window procedure of the widget.
When implementing your own WndProc to add or modify behavior, call the WndProc of the embedded widget for messages you don't handle yourself.
func (*WidgetBase) X ¶
func (wb *WidgetBase) X() int
X returns the x coordinate of the *WidgetBase, relative to the screen for RootWidgets like *MainWindow or *Dialog and relative to the parent for child Widgets.
func (*WidgetBase) Y ¶
func (wb *WidgetBase) Y() int
Y returns the y coordinate of the *WidgetBase, relative to the screen for RootWidgets like *MainWindow or *Dialog and relative to the parent for child Widgets.
type WidgetList ¶
type WidgetList struct {
// contains filtered or unexported fields
}
func (*WidgetList) Add ¶
func (l *WidgetList) Add(item Widget) error
func (*WidgetList) At ¶
func (l *WidgetList) At(index int) Widget
func (*WidgetList) Clear ¶
func (l *WidgetList) Clear() error
func (*WidgetList) Contains ¶
func (l *WidgetList) Contains(item Widget) bool
func (*WidgetList) Index ¶
func (l *WidgetList) Index(item Widget) int
func (*WidgetList) Len ¶
func (l *WidgetList) Len() int
func (*WidgetList) Remove ¶
func (l *WidgetList) Remove(item Widget) error
func (*WidgetList) RemoveAt ¶
func (l *WidgetList) RemoveAt(index int) error
Source Files
¶
- action.go
- actionlist.go
- application.go
- bitmap.go
- boxlayout.go
- brush.go
- button.go
- cancelevent.go
- canvas.go
- checkbox.go
- clipboard.go
- closeevent.go
- color.go
- combobox.go
- commondialogs.go
- composite.go
- condition.go
- container.go
- cursor.go
- customwidget.go
- databinding.go
- dateedit.go
- dialog.go
- error.go
- errorevent.go
- event.go
- font.go
- gridlayout.go
- groupbox.go
- icon.go
- image.go
- imagelist.go
- imageview.go
- indexlist.go
- inifilesettings.go
- intevent.go
- keyboard.go
- keyevent.go
- label.go
- lineedit.go
- lineerrorpresenter.go
- listbox.go
- mainwindow.go
- maptablemodel.go
- menu.go
- messagebox.go
- metafile.go
- models.go
- mouseevent.go
- notifyicon.go
- numberedit.go
- path.go
- pen.go
- point.go
- progressbar.go
- progressindicator.go
- property.go
- pushbutton.go
- radiobutton.go
- rectangle.go
- reflectmodels.go
- registry.go
- simpletypes.go
- size.go
- spacer.go
- splitter.go
- splitterhandle.go
- splitterlayout.go
- tableview.go
- tableviewcolumn.go
- tableviewcolumnlist.go
- tabpage.go
- tabpagelist.go
- tabwidget.go
- textedit.go
- toolbar.go
- toolbutton.go
- tooltip.go
- toplevelwindow.go
- treeitemevent.go
- treeview.go
- util.go
- validators.go
- walk.go
- webview.go
- webview_dwebbrowserevents2.go
- webview_idochostuihandler.go
- webview_ioleclientsite.go
- webview_ioleinplaceframe.go
- webview_ioleinplacesite.go
- widget.go
- widgetlist.go