walk: github.com/lxn/walk Index | Files | Directories

package walk

import "github.com/lxn/walk"

Index

Package Files

accessibility.go 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 datelabel.go dialog.go dropfilesevent.go error.go errorevent.go event.go expression.go flowlayout.go font.go fontresource.go form.go gradientcomposite.go graphicseffects.go gridlayout.go groupbox.go icon.go iconcache.go image.go imagelist.go imageview.go inifilesettings.go intevent.go intrangeevent.go keyboard.go keyevent.go label.go layout.go lineedit.go linklabel.go listbox.go mainloop_default.go mainwindow.go maptablemodel.go menu.go messagebox.go metafile.go models.go mouseevent.go notifyicon.go numberedit.go numberlabel.go path.go pen.go point.go progressbar.go progressindicator.go property.go pushbutton.go radiobutton.go rectangle.go reflectmodels.go registry.go resourcemanager.go scrollview.go separator.go simpletypes.go size.go slider.go spacer.go splitbutton.go splitter.go splitterhandle.go splitterlayout.go static.go statusbar.go stopwatch.go stringevent.go tableview.go tableviewcolumn.go tableviewcolumnlist.go tabpage.go tabpagelist.go tabwidget.go textedit.go textlabel.go toolbar.go toolbutton.go tooltip.go tooltiperrorpresenter.go treeitemevent.go treeview.go util.go validators.go walk.go webview.go webview_dwebbrowserevents2.go webview_events.go webview_idochostuihandler.go webview_ioleclientsite.go webview_ioleinplaceframe.go webview_ioleinplacesite.go widget.go widgetlist.go window.go windowgroup.go

Constants

const (
    NoOrientation Orientation = 0
    Horizontal                = 1 << 0
    Vertical                  = 1 << 1
)
const (
    DlgCmdNone     = 0
    DlgCmdOK       = win.IDOK
    DlgCmdCancel   = win.IDCANCEL
    DlgCmdAbort    = win.IDABORT
    DlgCmdRetry    = win.IDRETRY
    DlgCmdIgnore   = win.IDIGNORE
    DlgCmdYes      = win.IDYES
    DlgCmdNo       = win.IDNO
    DlgCmdClose    = win.IDCLOSE
    DlgCmdHelp     = win.IDHELP
    DlgCmdTryAgain = win.IDTRYAGAIN
    DlgCmdContinue = win.IDCONTINUE
    DlgCmdTimeout  = win.IDTIMEOUT
)

Variables

var (
    ErrPropertyReadOnly       = errors.New("read-only property")
    ErrPropertyNotValidatable = errors.New("property not validatable")
)
var (
    ErrInvalidType = errors.New("invalid type")
)

func AltDown Uses

func AltDown() bool

func AppDataPath Uses

func AppDataPath() (string, error)

func AppendToWalkInit Uses

func AppendToWalkInit(fn func())

func CommonAppDataPath Uses

func CommonAppDataPath() (string, error)

func ControlDown Uses

func ControlDown() bool

func DriveNames Uses

func DriveNames() ([]string, error)

func FormatFloat Uses

func FormatFloat(f float64, prec int) string

func FormatFloatGrouped Uses

func FormatFloatGrouped(f float64, prec int) string

func InitWidget Uses

func InitWidget(widget Widget, parent Window, className string, style, exStyle uint32) error

InitWidget initializes a Widget.

func InitWindow Uses

func InitWindow(window, parent Window, className string, style, exStyle uint32) error

InitWindow initializes a window.

Widgets should be initialized using InitWidget instead.

func InitWrapperWindow Uses

func InitWrapperWindow(window Window) error

InitWrapperWindow initializes a window that wraps (embeds) another window.

Calling this method is necessary, if you want to be able to override the WndProc method of the embedded window. The embedded window should only be used as inseparable part of the wrapper window to avoid undefined behavior.

func IntFrom96DPI Uses

func IntFrom96DPI(value, dpi int) int

IntFrom96DPI converts from 1/96" units to native pixels.

func IntTo96DPI Uses

func IntTo96DPI(value, dpi int) int

IntTo96DPI converts from native pixels to 1/96" units.

func LocalAppDataPath Uses

func LocalAppDataPath() (string, error)

func LogErrors Uses

func LogErrors() bool

func MouseWheelEventDelta Uses

func MouseWheelEventDelta(button MouseButton) int

func MouseWheelEventKeyState Uses

func MouseWheelEventKeyState(button MouseButton) int

func MsgBox Uses

func MsgBox(owner Form, title, message string, style MsgBoxStyle) int

func MustRegisterWindowClass Uses

func MustRegisterWindowClass(className string)

MustRegisterWindowClass registers the specified window class.

MustRegisterWindowClass must be called once for every window 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 MustRegisterWindowClassWithStyle Uses

func MustRegisterWindowClassWithStyle(className string, style uint32)

func MustRegisterWindowClassWithWndProcPtr Uses

func MustRegisterWindowClassWithWndProcPtr(className string, wndProcPtr uintptr)

func MustRegisterWindowClassWithWndProcPtrAndStyle Uses

func MustRegisterWindowClassWithWndProcPtrAndStyle(className string, wndProcPtr uintptr, style uint32)

func PanicOnError Uses

func PanicOnError() bool

func ParseFloat Uses

func ParseFloat(s string) (float64, error)

func RegistryKeyString Uses

func RegistryKeyString(rootKey *RegistryKey, subKeyPath, valueName string) (value string, err error)

func RegistryKeyUint32 Uses

func RegistryKeyUint32(rootKey *RegistryKey, subKeyPath, valueName string) (value uint32, err error)

func SetLogErrors Uses

func SetLogErrors(v bool)

func SetPanicOnError Uses

func SetPanicOnError(v bool)

func SetTranslationFunc Uses

func SetTranslationFunc(f TranslationFunction)

func SetWindowFont Uses

func SetWindowFont(hwnd win.HWND, font *Font)

func ShiftDown Uses

func ShiftDown() bool

func SystemPath Uses

func SystemPath() (string, error)

type AccRole Uses

type AccRole int32

AccRole enum defines the role of the window/control in UI.

const (
    AccRoleTitlebar           AccRole = win.ROLE_SYSTEM_TITLEBAR
    AccRoleMenubar            AccRole = win.ROLE_SYSTEM_MENUBAR
    AccRoleScrollbar          AccRole = win.ROLE_SYSTEM_SCROLLBAR
    AccRoleGrip               AccRole = win.ROLE_SYSTEM_GRIP
    AccRoleSound              AccRole = win.ROLE_SYSTEM_SOUND
    AccRoleCursor             AccRole = win.ROLE_SYSTEM_CURSOR
    AccRoleCaret              AccRole = win.ROLE_SYSTEM_CARET
    AccRoleAlert              AccRole = win.ROLE_SYSTEM_ALERT
    AccRoleWindow             AccRole = win.ROLE_SYSTEM_WINDOW
    AccRoleClient             AccRole = win.ROLE_SYSTEM_CLIENT
    AccRoleMenuPopup          AccRole = win.ROLE_SYSTEM_MENUPOPUP
    AccRoleMenuItem           AccRole = win.ROLE_SYSTEM_MENUITEM
    AccRoleTooltip            AccRole = win.ROLE_SYSTEM_TOOLTIP
    AccRoleApplication        AccRole = win.ROLE_SYSTEM_APPLICATION
    AccRoleDocument           AccRole = win.ROLE_SYSTEM_DOCUMENT
    AccRolePane               AccRole = win.ROLE_SYSTEM_PANE
    AccRoleChart              AccRole = win.ROLE_SYSTEM_CHART
    AccRoleDialog             AccRole = win.ROLE_SYSTEM_DIALOG
    AccRoleBorder             AccRole = win.ROLE_SYSTEM_BORDER
    AccRoleGrouping           AccRole = win.ROLE_SYSTEM_GROUPING
    AccRoleSeparator          AccRole = win.ROLE_SYSTEM_SEPARATOR
    AccRoleToolbar            AccRole = win.ROLE_SYSTEM_TOOLBAR
    AccRoleStatusbar          AccRole = win.ROLE_SYSTEM_STATUSBAR
    AccRoleTable              AccRole = win.ROLE_SYSTEM_TABLE
    AccRoleColumnHeader       AccRole = win.ROLE_SYSTEM_COLUMNHEADER
    AccRoleRowHeader          AccRole = win.ROLE_SYSTEM_ROWHEADER
    AccRoleColumn             AccRole = win.ROLE_SYSTEM_COLUMN
    AccRoleRow                AccRole = win.ROLE_SYSTEM_ROW
    AccRoleCell               AccRole = win.ROLE_SYSTEM_CELL
    AccRoleLink               AccRole = win.ROLE_SYSTEM_LINK
    AccRoleHelpBalloon        AccRole = win.ROLE_SYSTEM_HELPBALLOON
    AccRoleCharacter          AccRole = win.ROLE_SYSTEM_CHARACTER
    AccRoleList               AccRole = win.ROLE_SYSTEM_LIST
    AccRoleListItem           AccRole = win.ROLE_SYSTEM_LISTITEM
    AccRoleOutline            AccRole = win.ROLE_SYSTEM_OUTLINE
    AccRoleOutlineItem        AccRole = win.ROLE_SYSTEM_OUTLINEITEM
    AccRolePagetab            AccRole = win.ROLE_SYSTEM_PAGETAB
    AccRolePropertyPage       AccRole = win.ROLE_SYSTEM_PROPERTYPAGE
    AccRoleIndicator          AccRole = win.ROLE_SYSTEM_INDICATOR
    AccRoleGraphic            AccRole = win.ROLE_SYSTEM_GRAPHIC
    AccRoleStatictext         AccRole = win.ROLE_SYSTEM_STATICTEXT
    AccRoleText               AccRole = win.ROLE_SYSTEM_TEXT
    AccRolePushbutton         AccRole = win.ROLE_SYSTEM_PUSHBUTTON
    AccRoleCheckbutton        AccRole = win.ROLE_SYSTEM_CHECKBUTTON
    AccRoleRadiobutton        AccRole = win.ROLE_SYSTEM_RADIOBUTTON
    AccRoleCombobox           AccRole = win.ROLE_SYSTEM_COMBOBOX
    AccRoleDroplist           AccRole = win.ROLE_SYSTEM_DROPLIST
    AccRoleProgressbar        AccRole = win.ROLE_SYSTEM_PROGRESSBAR
    AccRoleDial               AccRole = win.ROLE_SYSTEM_DIAL
    AccRoleHotkeyfield        AccRole = win.ROLE_SYSTEM_HOTKEYFIELD
    AccRoleSlider             AccRole = win.ROLE_SYSTEM_SLIDER
    AccRoleSpinbutton         AccRole = win.ROLE_SYSTEM_SPINBUTTON
    AccRoleDiagram            AccRole = win.ROLE_SYSTEM_DIAGRAM
    AccRoleAnimation          AccRole = win.ROLE_SYSTEM_ANIMATION
    AccRoleEquation           AccRole = win.ROLE_SYSTEM_EQUATION
    AccRoleButtonDropdown     AccRole = win.ROLE_SYSTEM_BUTTONDROPDOWN
    AccRoleButtonMenu         AccRole = win.ROLE_SYSTEM_BUTTONMENU
    AccRoleButtonDropdownGrid AccRole = win.ROLE_SYSTEM_BUTTONDROPDOWNGRID
    AccRoleWhitespace         AccRole = win.ROLE_SYSTEM_WHITESPACE
    AccRolePageTabList        AccRole = win.ROLE_SYSTEM_PAGETABLIST
    AccRoleClock              AccRole = win.ROLE_SYSTEM_CLOCK
    AccRoleSplitButton        AccRole = win.ROLE_SYSTEM_SPLITBUTTON
    AccRoleIPAddress          AccRole = win.ROLE_SYSTEM_IPADDRESS
    AccRoleOutlineButton      AccRole = win.ROLE_SYSTEM_OUTLINEBUTTON
)

Window/control system roles

type AccState Uses

type AccState int32

AccState enum defines the state of the window/control

const (
    AccStateNormal          AccState = win.STATE_SYSTEM_NORMAL
    AccStateUnavailable     AccState = win.STATE_SYSTEM_UNAVAILABLE
    AccStateSelected        AccState = win.STATE_SYSTEM_SELECTED
    AccStateFocused         AccState = win.STATE_SYSTEM_FOCUSED
    AccStatePressed         AccState = win.STATE_SYSTEM_PRESSED
    AccStateChecked         AccState = win.STATE_SYSTEM_CHECKED
    AccStateMixed           AccState = win.STATE_SYSTEM_MIXED
    AccStateIndeterminate   AccState = win.STATE_SYSTEM_INDETERMINATE
    AccStateReadonly        AccState = win.STATE_SYSTEM_READONLY
    AccStateHotTracked      AccState = win.STATE_SYSTEM_HOTTRACKED
    AccStateDefault         AccState = win.STATE_SYSTEM_DEFAULT
    AccStateExpanded        AccState = win.STATE_SYSTEM_EXPANDED
    AccStateCollapsed       AccState = win.STATE_SYSTEM_COLLAPSED
    AccStateBusy            AccState = win.STATE_SYSTEM_BUSY
    AccStateFloating        AccState = win.STATE_SYSTEM_FLOATING
    AccStateMarqueed        AccState = win.STATE_SYSTEM_MARQUEED
    AccStateAnimated        AccState = win.STATE_SYSTEM_ANIMATED
    AccStateInvisible       AccState = win.STATE_SYSTEM_INVISIBLE
    AccStateOffscreen       AccState = win.STATE_SYSTEM_OFFSCREEN
    AccStateSizeable        AccState = win.STATE_SYSTEM_SIZEABLE
    AccStateMoveable        AccState = win.STATE_SYSTEM_MOVEABLE
    AccStateSelfVoicing     AccState = win.STATE_SYSTEM_SELFVOICING
    AccStateFocusable       AccState = win.STATE_SYSTEM_FOCUSABLE
    AccStateSelectable      AccState = win.STATE_SYSTEM_SELECTABLE
    AccStateLinked          AccState = win.STATE_SYSTEM_LINKED
    AccStateTraversed       AccState = win.STATE_SYSTEM_TRAVERSED
    AccStateMultiselectable AccState = win.STATE_SYSTEM_MULTISELECTABLE
    AccStateExtselectable   AccState = win.STATE_SYSTEM_EXTSELECTABLE
    AccStateAlertLow        AccState = win.STATE_SYSTEM_ALERT_LOW
    AccStateAlertMedium     AccState = win.STATE_SYSTEM_ALERT_MEDIUM
    AccStateAlertHigh       AccState = win.STATE_SYSTEM_ALERT_HIGH
    AccStateProtected       AccState = win.STATE_SYSTEM_PROTECTED
    AccStateHasPopup        AccState = win.STATE_SYSTEM_HASPOPUP
    AccStateValid           AccState = win.STATE_SYSTEM_VALID
)

Window/control states

type Accessibility Uses

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

Accessibility provides basic Dynamic Annotation of windows and controls.

func (*Accessibility) SetAccelerator Uses

func (a *Accessibility) SetAccelerator(acc string) error

SetAccelerator sets window accelerator name using Dynamic Annotation.

func (*Accessibility) SetDefaultAction Uses

func (a *Accessibility) SetDefaultAction(defAction string) error

SetDefaultAction sets window default action using Dynamic Annotation.

func (*Accessibility) SetDescription Uses

func (a *Accessibility) SetDescription(acc string) error

SetDescription sets window description using Dynamic Annotation.

func (*Accessibility) SetHelp Uses

func (a *Accessibility) SetHelp(help string) error

SetHelp sets window help using Dynamic Annotation.

func (*Accessibility) SetName Uses

func (a *Accessibility) SetName(name string) error

SetName sets window name using Dynamic Annotation.

func (*Accessibility) SetRole Uses

func (a *Accessibility) SetRole(role AccRole) error

SetRole sets window role using Dynamic Annotation. The role must be set when the window is created and is not to be modified later.

func (*Accessibility) SetRoleMap Uses

func (a *Accessibility) SetRoleMap(roleMap string) error

SetRoleMap sets window role map using Dynamic Annotation. The role map must be set when the window is created and is not to be modified later.

func (*Accessibility) SetState Uses

func (a *Accessibility) SetState(state AccState) error

SetState sets window state using Dynamic Annotation.

func (*Accessibility) SetStateMap Uses

func (a *Accessibility) SetStateMap(stateMap string) error

SetStateMap sets window state map using Dynamic Annotation. The state map must be set when the window is created and is not to be modified later.

func (*Accessibility) SetValueMap Uses

func (a *Accessibility) SetValueMap(valueMap string) error

SetValueMap sets window value map using Dynamic Annotation. The value map must be set when the window is created and is not to be modified later.

type Action Uses

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

func NewAction Uses

func NewAction() *Action

func NewMenuAction Uses

func NewMenuAction(menu *Menu) *Action

func NewSeparatorAction Uses

func NewSeparatorAction() *Action

func (*Action) Checkable Uses

func (a *Action) Checkable() bool

func (*Action) Checked Uses

func (a *Action) Checked() bool

func (*Action) CheckedCondition Uses

func (a *Action) CheckedCondition() Condition

func (*Action) Default Uses

func (a *Action) Default() bool

func (*Action) DefaultCondition Uses

func (a *Action) DefaultCondition() Condition

func (*Action) Enabled Uses

func (a *Action) Enabled() bool

func (*Action) EnabledCondition Uses

func (a *Action) EnabledCondition() Condition

func (*Action) Exclusive Uses

func (a *Action) Exclusive() bool

func (*Action) Image Uses

func (a *Action) Image() Image

func (*Action) IsSeparator Uses

func (a *Action) IsSeparator() bool

func (*Action) SetCheckable Uses

func (a *Action) SetCheckable(value bool) (err error)

func (*Action) SetChecked Uses

func (a *Action) SetChecked(value bool) (err error)

func (*Action) SetCheckedCondition Uses

func (a *Action) SetCheckedCondition(c Condition)

func (*Action) SetDefault Uses

func (a *Action) SetDefault(value bool) (err error)

func (*Action) SetDefaultCondition Uses

func (a *Action) SetDefaultCondition(c Condition)

func (*Action) SetEnabled Uses

func (a *Action) SetEnabled(value bool) (err error)

func (*Action) SetEnabledCondition Uses

func (a *Action) SetEnabledCondition(c Condition)

func (*Action) SetExclusive Uses

func (a *Action) SetExclusive(value bool) (err error)

func (*Action) SetImage Uses

func (a *Action) SetImage(value Image) (err error)

func (*Action) SetShortcut Uses

func (a *Action) SetShortcut(shortcut Shortcut) (err error)

func (*Action) SetText Uses

func (a *Action) SetText(value string) (err error)

func (*Action) SetToolTip Uses

func (a *Action) SetToolTip(value string) (err error)

func (*Action) SetVisible Uses

func (a *Action) SetVisible(value bool) (err error)

func (*Action) SetVisibleCondition Uses

func (a *Action) SetVisibleCondition(c Condition)

func (*Action) Shortcut Uses

func (a *Action) Shortcut() Shortcut

func (*Action) Text Uses

func (a *Action) Text() string

func (*Action) ToolTip Uses

func (a *Action) ToolTip() string

func (*Action) Triggered Uses

func (a *Action) Triggered() *Event

func (*Action) Visible Uses

func (a *Action) Visible() bool

func (*Action) VisibleCondition Uses

func (a *Action) VisibleCondition() Condition

type ActionList Uses

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

func (*ActionList) Add Uses

func (l *ActionList) Add(action *Action) error

func (*ActionList) AddMenu Uses

func (l *ActionList) AddMenu(menu *Menu) (*Action, error)

func (*ActionList) At Uses

func (l *ActionList) At(index int) *Action

func (*ActionList) Clear Uses

func (l *ActionList) Clear() error

func (*ActionList) Contains Uses

func (l *ActionList) Contains(action *Action) bool

func (*ActionList) Index Uses

func (l *ActionList) Index(action *Action) int

func (*ActionList) Insert Uses

func (l *ActionList) Insert(index int, action *Action) error

func (*ActionList) InsertMenu Uses

func (l *ActionList) InsertMenu(index int, menu *Menu) (*Action, error)

func (*ActionList) Len Uses

func (l *ActionList) Len() int

func (*ActionList) Remove Uses

func (l *ActionList) Remove(action *Action) error

func (*ActionList) RemoveAt Uses

func (l *ActionList) RemoveAt(index int) error

type Alignment1D Uses

type Alignment1D uint
const (
    AlignDefault Alignment1D = iota
    AlignNear
    AlignCenter
    AlignFar
)

type Alignment2D Uses

type Alignment2D uint
const (
    AlignHVDefault Alignment2D = iota
    AlignHNearVNear
    AlignHCenterVNear
    AlignHFarVNear
    AlignHNearVCenter
    AlignHCenterVCenter
    AlignHFarVCenter
    AlignHNearVFar
    AlignHCenterVFar
    AlignHFarVFar
)

type Application Uses

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

func App Uses

func App() *Application

func (*Application) ActiveForm Uses

func (app *Application) ActiveForm() Form

ActiveForm returns the currently active form for the caller's thread. It returns nil if no form is active or the caller's thread does not have any windows associated with it. It should be called from within synchronized functions.

func (*Application) Exit Uses

func (app *Application) Exit(exitCode int)

func (*Application) ExitCode Uses

func (app *Application) ExitCode() int

func (*Application) OrganizationName Uses

func (app *Application) OrganizationName() string

func (*Application) Panicking Uses

func (app *Application) Panicking() *ErrorEvent

func (*Application) ProductName Uses

func (app *Application) ProductName() string

func (*Application) SetOrganizationName Uses

func (app *Application) SetOrganizationName(value string)

func (*Application) SetProductName Uses

func (app *Application) SetProductName(value string)

func (*Application) SetSettings Uses

func (app *Application) SetSettings(value Settings)

func (*Application) Settings Uses

func (app *Application) Settings() Settings

type ApplyDPIer Uses

type ApplyDPIer interface {
    ApplyDPI(dpi int)
}

type ApplyFonter Uses

type ApplyFonter interface {
    ApplyFont(font *Font)
}

type ApplySysColorser Uses

type ApplySysColorser interface {
    ApplySysColors()
}

type BindingValueProvider Uses

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 Uses

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

func BitmapFrom Uses

func BitmapFrom(src interface{}, dpi int) (*Bitmap, error)

func NewBitmap Uses

func NewBitmap(size Size) (*Bitmap, error)

NewBitmap creates an opaque bitmap with given size in 1/96" units at screen DPI.

Deprecated: Newer applications should use NewBitmapForDPI.

func NewBitmapForDPI Uses

func NewBitmapForDPI(size Size, dpi int) (*Bitmap, error)

NewBitmapForDPI creates an opaque bitmap with given size in native pixels and DPI.

func NewBitmapFromFile Uses

func NewBitmapFromFile(filePath string) (*Bitmap, error)

NewBitmapFromFile creates new bitmap from a bitmap file at 96dpi.

Deprecated: Newer applications should use NewBitmapFromFileForDPI.

func NewBitmapFromFileForDPI Uses

func NewBitmapFromFileForDPI(filePath string, dpi int) (*Bitmap, error)

NewBitmapFromFileForDPI creates new bitmap from a bitmap file at given DPI.

func NewBitmapFromIcon Uses

func NewBitmapFromIcon(icon *Icon, size Size) (*Bitmap, error)

NewBitmapFromIcon creates a new bitmap with given size in native pixels and 96dpi and paints the icon on it.

Deprecated: Newer applications should use NewBitmapFromIconForDPI.

func NewBitmapFromIconForDPI Uses

func NewBitmapFromIconForDPI(icon *Icon, size Size, dpi int) (*Bitmap, error)

NewBitmapFromIconForDPI creates a new bitmap with given size in native pixels and DPI and paints the icon on it.

func NewBitmapFromImage Uses

func NewBitmapFromImage(im image.Image) (*Bitmap, error)

NewBitmapFromImage creates a Bitmap from image.Image at 96dpi.

Deprecated: Newer applications should use NewBitmapFromImageForDPI.

func NewBitmapFromImageForDPI Uses

func NewBitmapFromImageForDPI(im image.Image, dpi int) (*Bitmap, error)

NewBitmapFromImageForDPI creates a Bitmap from image.Image at given DPI.

func NewBitmapFromImageWithSize Uses

func NewBitmapFromImageWithSize(image Image, size Size) (*Bitmap, error)

NewBitmapFromImageWithSize creates a bitmap with given size in native units and paints the image on it streched.

func NewBitmapFromResource Uses

func NewBitmapFromResource(name string) (*Bitmap, error)

NewBitmapFromResource creates a Bitmap at 96dpi from resource by name.

Deprecated: Newer applications should use NewBitmapFromResourceForDPI.

func NewBitmapFromResourceForDPI Uses

func NewBitmapFromResourceForDPI(name string, dpi int) (*Bitmap, error)

NewBitmapFromResourceForDPI creates a Bitmap at given DPI from resource by name.

func NewBitmapFromResourceId Uses

func NewBitmapFromResourceId(id int) (*Bitmap, error)

NewBitmapFromResourceId creates a Bitmap at 96dpi from resource by ID.

Deprecated: Newer applications should use NewBitmapFromResourceIdForDPI.

func NewBitmapFromResourceIdForDPI Uses

func NewBitmapFromResourceIdForDPI(id int, dpi int) (*Bitmap, error)

NewBitmapFromResourceIdForDPI creates a Bitmap at given DPI from resource by ID.

func NewBitmapFromWindow Uses

func NewBitmapFromWindow(window Window) (*Bitmap, error)

func NewBitmapWithTransparentPixels Uses

func NewBitmapWithTransparentPixels(size Size) (*Bitmap, error)

NewBitmapWithTransparentPixels creates a transparent bitmap with given size in 1/96" units at screen DPI.

Deprecated: Newer applications should use NewBitmapWithTransparentPixelsForDPI.

func NewBitmapWithTransparentPixelsForDPI Uses

func NewBitmapWithTransparentPixelsForDPI(size Size, dpi int) (*Bitmap, error)

NewBitmapWithTransparentPixelsForDPI creates a transparent bitmap with given size in native pixels and DPI.

func (*Bitmap) Dispose Uses

func (bmp *Bitmap) Dispose()

func (*Bitmap) Size Uses

func (bmp *Bitmap) Size() Size

Size returns bitmap size in 1/96" units.

func (*Bitmap) ToImage Uses

func (bmp *Bitmap) ToImage() (*image.RGBA, error)

type BitmapBrush Uses

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

func NewBitmapBrush Uses

func NewBitmapBrush(bitmap *Bitmap) (*BitmapBrush, error)

func (*BitmapBrush) Bitmap Uses

func (b *BitmapBrush) Bitmap() *Bitmap

func (*BitmapBrush) Dispose Uses

func (bb *BitmapBrush) Dispose()

type BorderGlowEffect Uses

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

func NewBorderGlowEffect Uses

func NewBorderGlowEffect(color Color) (*BorderGlowEffect, error)

func (*BorderGlowEffect) Dispose Uses

func (wgeb *BorderGlowEffect) Dispose()

func (*BorderGlowEffect) Draw Uses

func (bge *BorderGlowEffect) Draw(widget Widget, canvas *Canvas) error

type BoxLayout Uses

type BoxLayout struct {
    LayoutBase
    // contains filtered or unexported fields
}

func NewHBoxLayout Uses

func NewHBoxLayout() *BoxLayout

func NewVBoxLayout Uses

func NewVBoxLayout() *BoxLayout

func (*BoxLayout) CreateLayoutItem Uses

func (l *BoxLayout) CreateLayoutItem(ctx *LayoutContext) ContainerLayoutItem

func (*BoxLayout) Orientation Uses

func (l *BoxLayout) Orientation() Orientation

func (*BoxLayout) SetOrientation Uses

func (l *BoxLayout) SetOrientation(value Orientation) error

func (*BoxLayout) SetStretchFactor Uses

func (l *BoxLayout) SetStretchFactor(widget Widget, factor int) error

func (*BoxLayout) StretchFactor Uses

func (l *BoxLayout) StretchFactor(widget Widget) int

type Brush Uses

type Brush interface {
    Dispose()
    // contains filtered or unexported methods
}

func NullBrush Uses

func NullBrush() Brush

type Button Uses

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

func (*Button) ApplyDPI Uses

func (b *Button) ApplyDPI(dpi int)

func (*Button) Checked Uses

func (b *Button) Checked() bool

func (*Button) CheckedChanged Uses

func (b *Button) CheckedChanged() *Event

func (*Button) Clicked Uses

func (b *Button) Clicked() *Event

func (*Button) CreateLayoutItem Uses

func (b *Button) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*Button) Image Uses

func (b *Button) Image() Image

func (*Button) ImageChanged Uses

func (b *Button) ImageChanged() *Event

func (*Button) Persistent Uses

func (b *Button) Persistent() bool

func (*Button) RestoreState Uses

func (b *Button) RestoreState() error

func (*Button) SaveState Uses

func (b *Button) SaveState() error

func (*Button) SetChecked Uses

func (b *Button) SetChecked(checked bool)

func (*Button) SetImage Uses

func (b *Button) SetImage(image Image) error

func (*Button) SetPersistent Uses

func (b *Button) SetPersistent(value bool)

func (*Button) SetText Uses

func (b *Button) SetText(value string) error

func (*Button) Text Uses

func (b *Button) Text() string

func (*Button) WndProc Uses

func (b *Button) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type CancelEvent Uses

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

func (*CancelEvent) Attach Uses

func (e *CancelEvent) Attach(handler CancelEventHandler) int

func (*CancelEvent) Detach Uses

func (e *CancelEvent) Detach(handle int)

func (*CancelEvent) Once Uses

func (e *CancelEvent) Once(handler CancelEventHandler)

type CancelEventHandler Uses

type CancelEventHandler func(canceled *bool)

type CancelEventPublisher Uses

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

func (*CancelEventPublisher) Event Uses

func (p *CancelEventPublisher) Event() *CancelEvent

func (*CancelEventPublisher) Publish Uses

func (p *CancelEventPublisher) Publish(canceled *bool)

type Canvas Uses

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

func NewCanvasFromImage Uses

func NewCanvasFromImage(image Image) (*Canvas, error)

func (*Canvas) Bounds Uses

func (c *Canvas) Bounds() Rectangle

func (*Canvas) BoundsPixels Uses

func (c *Canvas) BoundsPixels() Rectangle

func (*Canvas) DPI Uses

func (c *Canvas) DPI() int

func (*Canvas) Dispose Uses

func (c *Canvas) Dispose()

func (*Canvas) DrawBitmapPart Uses

func (c *Canvas) DrawBitmapPart(bmp *Bitmap, dst, src Rectangle) error

DrawBitmapPart draws bitmap at given location in native pixels.

func (*Canvas) DrawBitmapPartWithOpacity Uses

func (c *Canvas) DrawBitmapPartWithOpacity(bmp *Bitmap, dst, src Rectangle, opacity byte) error

DrawBitmapPartWithOpacity draws bitmap at given location in 1/96" units.

Deprecated: Newer applications should use DrawBitmapPartWithOpacityPixels.

func (*Canvas) DrawBitmapPartWithOpacityPixels Uses

func (c *Canvas) DrawBitmapPartWithOpacityPixels(bmp *Bitmap, dst, src Rectangle, opacity byte) error

DrawBitmapPartWithOpacityPixels draws bitmap at given location in native pixels.

func (*Canvas) DrawBitmapWithOpacity Uses

func (c *Canvas) DrawBitmapWithOpacity(bmp *Bitmap, bounds Rectangle, opacity byte) error

DrawBitmapWithOpacity draws bitmap with opacity at given location in 1/96" units stretched.

Deprecated: Newer applications should use DrawBitmapWithOpacityPixels.

func (*Canvas) DrawBitmapWithOpacityPixels Uses

func (c *Canvas) DrawBitmapWithOpacityPixels(bmp *Bitmap, bounds Rectangle, opacity byte) error

DrawBitmapWithOpacityPixels draws bitmap with opacity at given location in native pixels stretched.

func (*Canvas) DrawEllipse Uses

func (c *Canvas) DrawEllipse(pen Pen, bounds Rectangle) error

DrawEllipse draws an ellipse in 1/96" units.

Deprecated: Newer applications should use DrawEllipsePixels.

func (*Canvas) DrawEllipsePixels Uses

func (c *Canvas) DrawEllipsePixels(pen Pen, bounds Rectangle) error

DrawEllipsePixels draws an ellipse in native pixels.

func (*Canvas) DrawImage Uses

func (c *Canvas) DrawImage(image Image, location Point) error

DrawImage draws image at given location (upper left) in 1/96" units unstretched.

Deprecated: Newer applications should use DrawImagePixels.

func (*Canvas) DrawImagePixels Uses

func (c *Canvas) DrawImagePixels(image Image, location Point) error

DrawImagePixels draws image at given location (upper left) in native pixels unstretched.

func (*Canvas) DrawImageStretched Uses

func (c *Canvas) DrawImageStretched(image Image, bounds Rectangle) error

DrawImageStretched draws image at given location in 1/96" units stretched.

Deprecated: Newer applications should use DrawImageStretchedPixels.

func (*Canvas) DrawImageStretchedPixels Uses

func (c *Canvas) DrawImageStretchedPixels(image Image, bounds Rectangle) error

DrawImageStretchedPixels draws image at given location in native pixels stretched.

func (*Canvas) DrawLine Uses

func (c *Canvas) DrawLine(pen Pen, from, to Point) error

DrawLine draws a line between two points in 1/96" units.

Deprecated: Newer applications should use DrawLinePixels.

func (*Canvas) DrawLinePixels Uses

func (c *Canvas) DrawLinePixels(pen Pen, from, to Point) error

DrawLinePixels draws a line between two points in native pixels.

func (*Canvas) DrawPolyline Uses

func (c *Canvas) DrawPolyline(pen Pen, points []Point) error

DrawLine draws a line between given points in 1/96" units.

Deprecated: Newer applications should use DrawLinePixels.

func (*Canvas) DrawPolylinePixels Uses

func (c *Canvas) DrawPolylinePixels(pen Pen, points []Point) error

DrawPolylinePixels draws a line between given points in native pixels.

func (*Canvas) DrawRectangle Uses

func (c *Canvas) DrawRectangle(pen Pen, bounds Rectangle) error

DrawRectangle draws a rectangle in 1/96" units.

Deprecated: Newer applications should use DrawRectanglePixels.

func (*Canvas) DrawRectanglePixels Uses

func (c *Canvas) DrawRectanglePixels(pen Pen, bounds Rectangle) error

DrawRectanglePixels draws a rectangle in native pixels.

func (*Canvas) DrawRoundedRectangle Uses

func (c *Canvas) DrawRoundedRectangle(pen Pen, bounds Rectangle, ellipseSize Size) error

DrawRoundedRectangle draws a rounded rectangle in 1/96" units. sizeCorrection parameter is in native pixels.

Deprecated: Newer applications should use DrawRoundedRectanglePixels.

func (*Canvas) DrawRoundedRectanglePixels Uses

func (c *Canvas) DrawRoundedRectanglePixels(pen Pen, bounds Rectangle, ellipseSize Size) error

DrawRoundedRectanglePixels draws a rounded rectangle in native pixels.

func (*Canvas) DrawText Uses

func (c *Canvas) DrawText(text string, font *Font, color Color, bounds Rectangle, format DrawTextFormat) error

DrawText draws text at given location in 1/96" units.

Deprecated: Newer applications should use DrawTextPixels.

func (*Canvas) DrawTextPixels Uses

func (c *Canvas) DrawTextPixels(text string, font *Font, color Color, bounds Rectangle, format DrawTextFormat) error

DrawTextPixels draws text at given location in native pixels.

func (*Canvas) FillEllipse Uses

func (c *Canvas) FillEllipse(brush Brush, bounds Rectangle) error

FillEllipse draws a filled ellipse in 1/96" units.

Deprecated: Newer applications should use FillEllipsePixels.

func (*Canvas) FillEllipsePixels Uses

func (c *Canvas) FillEllipsePixels(brush Brush, bounds Rectangle) error

FillEllipsePixels draws a filled in native pixels.

func (*Canvas) FillRectangle Uses

func (c *Canvas) FillRectangle(brush Brush, bounds Rectangle) error

FillRectangle draws a filled rectangle in 1/96" units.

Deprecated: Newer applications should use FillRectanglePixels.

func (*Canvas) FillRectanglePixels Uses

func (c *Canvas) FillRectanglePixels(brush Brush, bounds Rectangle) error

FillRectanglePixels draws a filled rectangle in native pixels.

func (*Canvas) FillRoundedRectangle Uses

func (c *Canvas) FillRoundedRectangle(brush Brush, bounds Rectangle, ellipseSize Size) error

FillRoundedRectangle draws a filled rounded rectangle in 1/96" units. sizeCorrection parameter is in native pixels.

Deprecated: Newer applications should use FillRoundedRectanglePixels.

func (*Canvas) FillRoundedRectanglePixels Uses

func (c *Canvas) FillRoundedRectanglePixels(brush Brush, bounds Rectangle, ellipseSize Size) error

FillRoundedRectanglePixels draws a filled rounded rectangle in native pixels.

func (*Canvas) GradientFillRectangle Uses

func (c *Canvas) GradientFillRectangle(color1, color2 Color, orientation Orientation, bounds Rectangle) error

GradientFillRectangle draws a gradient filled rectangle in 1/96" units.

Deprecated: Newer applications should use GradientFillRectanglePixels.

func (*Canvas) GradientFillRectanglePixels Uses

func (c *Canvas) GradientFillRectanglePixels(color1, color2 Color, orientation Orientation, bounds Rectangle) error

GradientFillRectanglePixels draws a gradient filled rectangle in native pixels.

func (*Canvas) HDC Uses

func (c *Canvas) HDC() win.HDC

func (*Canvas) MeasureAndModifyTextPixels Uses

func (c *Canvas) MeasureAndModifyTextPixels(text string, font *Font, bounds Rectangle, format DrawTextFormat) (boundsMeasured Rectangle, textDisplayed string, err error)

MeasureAndModifyTextPixels measures text size and also supports modification of the text which occurs if it does not fit into the specified bounds.

Input and output bounds are in native pixels.

func (*Canvas) MeasureText Uses

func (c *Canvas) MeasureText(text string, font *Font, bounds Rectangle, format DrawTextFormat) (boundsMeasured Rectangle, runesFitted int, err error)

MeasureText measures text size. Input and output bounds are in 1/96" units.

Deprecated: Newer applications should use MeasureTextPixels.

func (*Canvas) MeasureTextPixels Uses

func (c *Canvas) MeasureTextPixels(text string, font *Font, bounds Rectangle, format DrawTextFormat) (boundsMeasured Rectangle, runesFitted int, err error)

MeasureTextPixels measures text size. Input and output bounds are in native pixels.

type CaseMode Uses

type CaseMode uint32
const (
    CaseModeMixed CaseMode = iota
    CaseModeUpper
    CaseModeLower
)

type CellStyle Uses

type CellStyle struct {
    BackgroundColor Color
    TextColor       Color
    Font            *Font

    // Image is the image to display in the cell.
    //
    // 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{}
    // contains filtered or unexported fields
}

CellStyle carries information about the display style of a cell in a tabular widget like TableView.

func (*CellStyle) Bounds Uses

func (cs *CellStyle) Bounds() Rectangle

func (*CellStyle) BoundsPixels Uses

func (cs *CellStyle) BoundsPixels() Rectangle

func (*CellStyle) Canvas Uses

func (cs *CellStyle) Canvas() *Canvas

func (*CellStyle) Col Uses

func (cs *CellStyle) Col() int

func (*CellStyle) Row Uses

func (cs *CellStyle) Row() int

type CellStyler Uses

type CellStyler interface {
    // StyleCell is called for each cell to pick up cell style information.
    StyleCell(style *CellStyle)
}

CellStyler is the interface that must be implemented to provide a tabular widget like TableView with cell display style information.

type CheckBox Uses

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

func NewCheckBox Uses

func NewCheckBox(parent Container) (*CheckBox, error)

func (*CheckBox) CheckState Uses

func (cb *CheckBox) CheckState() CheckState

func (*CheckBox) CheckStateChanged Uses

func (cb *CheckBox) CheckStateChanged() *Event

func (*CheckBox) RestoreState Uses

func (cb *CheckBox) RestoreState() error

func (*CheckBox) SaveState Uses

func (cb *CheckBox) SaveState() error

func (*CheckBox) SetCheckState Uses

func (cb *CheckBox) SetCheckState(state CheckState)

func (*CheckBox) SetTextOnLeftSide Uses

func (cb *CheckBox) SetTextOnLeftSide(textLeft bool) error

func (*CheckBox) SetTristate Uses

func (cb *CheckBox) SetTristate(tristate bool) error

func (*CheckBox) TextOnLeftSide Uses

func (cb *CheckBox) TextOnLeftSide() bool

func (*CheckBox) Tristate Uses

func (cb *CheckBox) Tristate() bool

func (*CheckBox) WndProc Uses

func (cb *CheckBox) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type CheckState Uses

type CheckState int
const (
    CheckUnchecked     CheckState = win.BST_UNCHECKED
    CheckChecked       CheckState = win.BST_CHECKED
    CheckIndeterminate CheckState = win.BST_INDETERMINATE
)

type ClipboardService Uses

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

ClipboardService provides access to the system clipboard.

func Clipboard Uses

func Clipboard() *ClipboardService

Clipboard returns an object that provides access to the system clipboard.

func (*ClipboardService) Clear Uses

func (c *ClipboardService) Clear() error

Clear clears the contents of the clipboard.

func (*ClipboardService) ContainsText Uses

func (c *ClipboardService) ContainsText() (available bool, err error)

ContainsText returns whether the clipboard currently contains text data.

func (*ClipboardService) ContentsChanged Uses

func (c *ClipboardService) ContentsChanged() *Event

ContentsChanged returns an Event that you can attach to for handling clipboard content changes.

func (*ClipboardService) SetText Uses

func (c *ClipboardService) SetText(s string) error

SetText sets the current text data of the clipboard.

func (*ClipboardService) Text Uses

func (c *ClipboardService) Text() (text string, err error)

Text returns the current text data of the clipboard.

type CloseEvent Uses

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

func (*CloseEvent) Attach Uses

func (e *CloseEvent) Attach(handler CloseEventHandler) int

func (*CloseEvent) Detach Uses

func (e *CloseEvent) Detach(handle int)

func (*CloseEvent) Once Uses

func (e *CloseEvent) Once(handler CloseEventHandler)

type CloseEventHandler Uses

type CloseEventHandler func(canceled *bool, reason CloseReason)

type CloseEventPublisher Uses

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

func (*CloseEventPublisher) Event Uses

func (p *CloseEventPublisher) Event() *CloseEvent

func (*CloseEventPublisher) Publish Uses

func (p *CloseEventPublisher) Publish(canceled *bool, reason CloseReason)

type CloseReason Uses

type CloseReason byte
const (
    CloseReasonUnknown CloseReason = iota
    CloseReasonUser
)

type Color Uses

type Color uint32

func RGB Uses

func RGB(r, g, b byte) Color

func (Color) B Uses

func (c Color) B() byte

func (Color) G Uses

func (c Color) G() byte

func (Color) R Uses

func (c Color) R() byte

type ComboBox Uses

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

func NewComboBox Uses

func NewComboBox(parent Container) (*ComboBox, error)

func NewDropDownBox Uses

func NewDropDownBox(parent Container) (*ComboBox, error)

func (*ComboBox) BindingMember Uses

func (cb *ComboBox) BindingMember() string

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) CreateLayoutItem Uses

func (cb *ComboBox) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*ComboBox) CurrentIndex Uses

func (cb *ComboBox) CurrentIndex() int

func (*ComboBox) CurrentIndexChanged Uses

func (cb *ComboBox) CurrentIndexChanged() *Event

func (*ComboBox) DisplayMember Uses

func (cb *ComboBox) DisplayMember() string

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) Editable Uses

func (cb *ComboBox) Editable() bool

func (*ComboBox) EditingFinished Uses

func (cb *ComboBox) EditingFinished() *Event

func (*ComboBox) Format Uses

func (cb *ComboBox) Format() string

func (*ComboBox) MaxLength Uses

func (cb *ComboBox) MaxLength() int

func (*ComboBox) Model Uses

func (cb *ComboBox) Model() interface{}

Model returns the model of the ComboBox.

func (*ComboBox) NeedsWmSize Uses

func (*ComboBox) NeedsWmSize() bool

func (*ComboBox) Persistent Uses

func (cb *ComboBox) Persistent() bool

func (*ComboBox) Precision Uses

func (cb *ComboBox) Precision() int

func (*ComboBox) RestoreState Uses

func (cb *ComboBox) RestoreState() error

func (*ComboBox) SaveState Uses

func (cb *ComboBox) SaveState() error

func (*ComboBox) SetBindingMember Uses

func (cb *ComboBox) SetBindingMember(bindingMember string) error

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 Uses

func (cb *ComboBox) SetCurrentIndex(value int) error

func (*ComboBox) SetDisplayMember Uses

func (cb *ComboBox) SetDisplayMember(displayMember string) error

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) SetFormat Uses

func (cb *ComboBox) SetFormat(value string)

func (*ComboBox) SetMaxLength Uses

func (cb *ComboBox) SetMaxLength(value int)

func (*ComboBox) SetModel Uses

func (cb *ComboBox) SetModel(mdl interface{}) error

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) SetPersistent Uses

func (cb *ComboBox) SetPersistent(value bool)

func (*ComboBox) SetPrecision Uses

func (cb *ComboBox) SetPrecision(value int)

func (*ComboBox) SetText Uses

func (cb *ComboBox) SetText(value string) error

func (*ComboBox) SetTextSelection Uses

func (cb *ComboBox) SetTextSelection(start, end int)

func (*ComboBox) Text Uses

func (cb *ComboBox) Text() string

func (*ComboBox) TextChanged Uses

func (cb *ComboBox) TextChanged() *Event

func (*ComboBox) TextSelection Uses

func (cb *ComboBox) TextSelection() (start, end int)

func (*ComboBox) WndProc Uses

func (cb *ComboBox) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type Composite Uses

type Composite struct {
    ContainerBase
}

func NewComposite Uses

func NewComposite(parent Container) (*Composite, error)

func NewCompositeWithStyle Uses

func NewCompositeWithStyle(parent Window, style uint32) (*Composite, error)

type Condition Uses

type Condition interface {
    Expression
    Satisfied() bool
}

func NewAllCondition Uses

func NewAllCondition(items ...Condition) Condition

func NewAnyCondition Uses

func NewAnyCondition(items ...Condition) Condition

func NewNegatedCondition Uses

func NewNegatedCondition(other Condition) Condition

type Container Uses

type Container interface {
    Window
    AsContainerBase() *ContainerBase
    Children() *WidgetList
    Layout() Layout
    SetLayout(value Layout) error
    DataBinder() *DataBinder
    SetDataBinder(dbm *DataBinder)
}

type ContainerBase Uses

type ContainerBase struct {
    WidgetBase
    // contains filtered or unexported fields
}

func (*ContainerBase) ApplyDPI Uses

func (cb *ContainerBase) ApplyDPI(dpi int)

func (*ContainerBase) ApplySysColors Uses

func (cb *ContainerBase) ApplySysColors()

func (*ContainerBase) AsContainerBase Uses

func (cb *ContainerBase) AsContainerBase() *ContainerBase

func (*ContainerBase) AsWidgetBase Uses

func (cb *ContainerBase) AsWidgetBase() *WidgetBase

func (*ContainerBase) Children Uses

func (cb *ContainerBase) Children() *WidgetList

func (*ContainerBase) CreateLayoutItem Uses

func (cb *ContainerBase) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*ContainerBase) DataBinder Uses

func (cb *ContainerBase) DataBinder() *DataBinder

func (*ContainerBase) Layout Uses

func (cb *ContainerBase) Layout() Layout

func (*ContainerBase) NextChildID Uses

func (cb *ContainerBase) NextChildID() int32

func (*ContainerBase) Persistent Uses

func (cb *ContainerBase) Persistent() bool

func (*ContainerBase) RestoreState Uses

func (cb *ContainerBase) RestoreState() error

func (*ContainerBase) SaveState Uses

func (cb *ContainerBase) SaveState() error

func (*ContainerBase) SetDataBinder Uses

func (cb *ContainerBase) SetDataBinder(db *DataBinder)

func (*ContainerBase) SetLayout Uses

func (cb *ContainerBase) SetLayout(value Layout) error

func (*ContainerBase) SetPersistent Uses

func (cb *ContainerBase) SetPersistent(value bool)

func (*ContainerBase) WndProc Uses

func (cb *ContainerBase) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type ContainerLayoutItem Uses

type ContainerLayoutItem interface {
    LayoutItem
    MinSizer
    MinSizeForSizer
    HeightForWidther
    AsContainerLayoutItemBase() *ContainerLayoutItemBase

    // MinSizeEffectiveForChild returns minimum effective size for a child in native pixels.
    MinSizeEffectiveForChild(child LayoutItem) Size

    PerformLayout() []LayoutResultItem
    Children() []LayoutItem
    // contains filtered or unexported methods
}

func CreateLayoutItemsForContainer Uses

func CreateLayoutItemsForContainer(container Container) ContainerLayoutItem

func CreateLayoutItemsForContainerWithContext Uses

func CreateLayoutItemsForContainerWithContext(container Container, ctx *LayoutContext) ContainerLayoutItem

type ContainerLayoutItemBase Uses

type ContainerLayoutItemBase struct {
    LayoutItemBase
    // contains filtered or unexported fields
}

func (*ContainerLayoutItemBase) AsContainerLayoutItemBase Uses

func (clib *ContainerLayoutItemBase) AsContainerLayoutItemBase() *ContainerLayoutItemBase

func (*ContainerLayoutItemBase) Children Uses

func (clib *ContainerLayoutItemBase) Children() []LayoutItem

func (*ContainerLayoutItemBase) HasHeightForWidth Uses

func (clib *ContainerLayoutItemBase) HasHeightForWidth() bool

func (*ContainerLayoutItemBase) MinSizeEffectiveForChild Uses

func (clib *ContainerLayoutItemBase) MinSizeEffectiveForChild(child LayoutItem) Size

func (*ContainerLayoutItemBase) SetChildren Uses

func (clib *ContainerLayoutItemBase) SetChildren(children []LayoutItem)

type CosmeticPen Uses

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

func NewCosmeticPen Uses

func NewCosmeticPen(style PenStyle, color Color) (*CosmeticPen, error)

func (*CosmeticPen) Color Uses

func (p *CosmeticPen) Color() Color

func (*CosmeticPen) Dispose Uses

func (p *CosmeticPen) Dispose()

func (*CosmeticPen) Style Uses

func (p *CosmeticPen) Style() PenStyle

func (*CosmeticPen) Width Uses

func (p *CosmeticPen) Width() int

type Cursor Uses

type Cursor interface {
    Dispose()
    // contains filtered or unexported methods
}

func CursorAppStarting Uses

func CursorAppStarting() Cursor

func CursorArrow Uses

func CursorArrow() Cursor

func CursorCross Uses

func CursorCross() Cursor

func CursorHand Uses

func CursorHand() Cursor

func CursorHelp Uses

func CursorHelp() Cursor

func CursorIBeam Uses

func CursorIBeam() Cursor

func CursorIcon Uses

func CursorIcon() Cursor

func CursorNo Uses

func CursorNo() Cursor

func CursorSize Uses

func CursorSize() Cursor

func CursorSizeAll Uses

func CursorSizeAll() Cursor

func CursorSizeNESW Uses

func CursorSizeNESW() Cursor

func CursorSizeNS Uses

func CursorSizeNS() Cursor

func CursorSizeNWSE Uses

func CursorSizeNWSE() Cursor

func CursorSizeWE Uses

func CursorSizeWE() Cursor

func CursorUpArrow Uses

func CursorUpArrow() Cursor

func CursorWait Uses

func CursorWait() Cursor

func NewCursorFromImage Uses

func NewCursorFromImage(im image.Image, hotspot image.Point) (Cursor, error)

type CustomWidget Uses

type CustomWidget struct {
    WidgetBase
    // contains filtered or unexported fields
}

func NewCustomWidget Uses

func NewCustomWidget(parent Container, style uint, paint PaintFunc) (*CustomWidget, error)

NewCustomWidget creates and initializes a new custom draw widget.

Deprecated: PaintFunc is taking updateBounds parameter at 96dpi for backward compatibility with clients. On high-DPI displays this is too sparse and may incur a thin unpainted edge around control due to rounding errors. Newer applications should use NewCustomWidgetPixels.

func NewCustomWidgetPixels Uses

func NewCustomWidgetPixels(parent Container, style uint, paintPixels PaintFunc) (*CustomWidget, error)

NewCustomWidgetPixels creates and initializes a new custom draw widget.

func (*CustomWidget) ClearsBackground Uses

func (cw *CustomWidget) ClearsBackground() bool

deprecated, use PaintMode

func (*CustomWidget) CreateLayoutItem Uses

func (*CustomWidget) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*CustomWidget) InvalidatesOnResize Uses

func (cw *CustomWidget) InvalidatesOnResize() bool

func (*CustomWidget) PaintMode Uses

func (cw *CustomWidget) PaintMode() PaintMode

func (*CustomWidget) SetClearsBackground Uses

func (cw *CustomWidget) SetClearsBackground(value bool)

deprecated, use SetPaintMode

func (*CustomWidget) SetInvalidatesOnResize Uses

func (cw *CustomWidget) SetInvalidatesOnResize(value bool)

func (*CustomWidget) SetPaintMode Uses

func (cw *CustomWidget) SetPaintMode(value PaintMode)

func (*CustomWidget) WndProc Uses

func (cw *CustomWidget) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type DataBinder Uses

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

func NewDataBinder Uses

func NewDataBinder() *DataBinder

func (*DataBinder) AutoSubmit Uses

func (db *DataBinder) AutoSubmit() bool

func (*DataBinder) AutoSubmitDelay Uses

func (db *DataBinder) AutoSubmitDelay() time.Duration

func (*DataBinder) AutoSubmitSuspended Uses

func (db *DataBinder) AutoSubmitSuspended() bool

func (*DataBinder) BoundWidgets Uses

func (db *DataBinder) BoundWidgets() []Widget

func (*DataBinder) CanSubmit Uses

func (db *DataBinder) CanSubmit() bool

func (*DataBinder) CanSubmitChanged Uses

func (db *DataBinder) CanSubmitChanged() *Event

func (*DataBinder) DataSource Uses

func (db *DataBinder) DataSource() interface{}

func (*DataBinder) DataSourceChanged Uses

func (db *DataBinder) DataSourceChanged() *Event

func (*DataBinder) Dirty Uses

func (db *DataBinder) Dirty() bool

func (*DataBinder) ErrorPresenter Uses

func (db *DataBinder) ErrorPresenter() ErrorPresenter

func (*DataBinder) Expression Uses

func (db *DataBinder) Expression(path string) Expression

func (*DataBinder) Reset Uses

func (db *DataBinder) Reset() error

func (*DataBinder) ResetFinished Uses

func (db *DataBinder) ResetFinished() *Event

func (*DataBinder) SetAutoSubmit Uses

func (db *DataBinder) SetAutoSubmit(autoSubmit bool)

func (*DataBinder) SetAutoSubmitDelay Uses

func (db *DataBinder) SetAutoSubmitDelay(delay time.Duration)

func (*DataBinder) SetAutoSubmitSuspended Uses

func (db *DataBinder) SetAutoSubmitSuspended(suspended bool)

func (*DataBinder) SetBoundWidgets Uses

func (db *DataBinder) SetBoundWidgets(boundWidgets []Widget)

func (*DataBinder) SetDataSource Uses

func (db *DataBinder) SetDataSource(dataSource interface{}) error

func (*DataBinder) SetErrorPresenter Uses

func (db *DataBinder) SetErrorPresenter(ep ErrorPresenter)

func (*DataBinder) Submit Uses

func (db *DataBinder) Submit() error

func (*DataBinder) Submitted Uses

func (db *DataBinder) Submitted() *Event

type DataField Uses

type DataField interface {
    CanSet() bool
    Get() interface{}
    Set(interface{}) error
    Zero() interface{}
}

type DateEdit Uses

type DateEdit struct {
    WidgetBase
    // contains filtered or unexported fields
}

func NewDateEdit Uses

func NewDateEdit(parent Container) (*DateEdit, error)

func NewDateEditWithNoneOption Uses

func NewDateEditWithNoneOption(parent Container) (*DateEdit, error)

func (*DateEdit) CreateLayoutItem Uses

func (de *DateEdit) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*DateEdit) Date Uses

func (de *DateEdit) Date() time.Time

func (*DateEdit) DateChanged Uses

func (de *DateEdit) DateChanged() *Event

func (*DateEdit) Format Uses

func (de *DateEdit) Format() string

func (*DateEdit) NeedsWmSize Uses

func (*DateEdit) NeedsWmSize() bool

func (*DateEdit) Range Uses

func (de *DateEdit) Range() (min, max time.Time)

func (*DateEdit) SetDate Uses

func (de *DateEdit) SetDate(date time.Time) error

func (*DateEdit) SetFormat Uses

func (de *DateEdit) SetFormat(format string) error

func (*DateEdit) SetRange Uses

func (de *DateEdit) SetRange(min, max time.Time) error

func (*DateEdit) WndProc Uses

func (de *DateEdit) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type DateLabel Uses

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

func NewDateLabel Uses

func NewDateLabel(parent Container) (*DateLabel, error)

func (*DateLabel) CreateLayoutItem Uses

func (s *DateLabel) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*DateLabel) Date Uses

func (dl *DateLabel) Date() time.Time

func (*DateLabel) Dispose Uses

func (s *DateLabel) Dispose()

func (*DateLabel) Format Uses

func (dl *DateLabel) Format() string

func (*DateLabel) SetDate Uses

func (dl *DateLabel) SetDate(date time.Time) error

func (*DateLabel) SetFormat Uses

func (dl *DateLabel) SetFormat(format string) error

func (*DateLabel) SetTextAlignment Uses

func (dl *DateLabel) SetTextAlignment(alignment Alignment1D) error

func (*DateLabel) SetTextColor Uses

func (s *DateLabel) SetTextColor(c Color)

func (*DateLabel) TextAlignment Uses

func (dl *DateLabel) TextAlignment() Alignment1D

func (*DateLabel) TextColor Uses

func (s *DateLabel) TextColor() Color

func (*DateLabel) WndProc Uses

func (s *DateLabel) WndProc(hwnd win.HWND, msg uint32, wp, lp uintptr) uintptr

type DelegateCondition Uses

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

func NewDelegateCondition Uses

func NewDelegateCondition(satisfied func() bool, changed *Event) *DelegateCondition

func (*DelegateCondition) Changed Uses

func (dc *DelegateCondition) Changed() *Event

func (*DelegateCondition) Satisfied Uses

func (dc *DelegateCondition) Satisfied() bool

func (*DelegateCondition) Value Uses

func (dc *DelegateCondition) Value() interface{}

type Dialog Uses

type Dialog struct {
    FormBase
    // contains filtered or unexported fields
}

func NewDialog Uses

func NewDialog(owner Form) (*Dialog, error)

func NewDialogWithFixedSize Uses

func NewDialogWithFixedSize(owner Form) (*Dialog, error)

func (*Dialog) Accept Uses

func (dlg *Dialog) Accept()

func (*Dialog) Cancel Uses

func (dlg *Dialog) Cancel()

func (*Dialog) CancelButton Uses

func (dlg *Dialog) CancelButton() *PushButton

func (*Dialog) Close Uses

func (dlg *Dialog) Close(result int)

func (*Dialog) DefaultButton Uses

func (dlg *Dialog) DefaultButton() *PushButton

func (*Dialog) Result Uses

func (dlg *Dialog) Result() int

func (*Dialog) Run Uses

func (dlg *Dialog) Run() int

func (*Dialog) SetCancelButton Uses

func (dlg *Dialog) SetCancelButton(button *PushButton) error

func (*Dialog) SetDefaultButton Uses

func (dlg *Dialog) SetDefaultButton(button *PushButton) error

func (*Dialog) Show Uses

func (dlg *Dialog) Show()

func (*Dialog) WndProc Uses

func (dlg *Dialog) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type Disposable Uses

type Disposable interface {
    Dispose()
}

type Disposables Uses

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

func (*Disposables) Add Uses

func (d *Disposables) Add(item Disposable)

func (*Disposables) Spare Uses

func (d *Disposables) Spare()

func (*Disposables) Treat Uses

func (d *Disposables) Treat()

type DrawTextFormat Uses

type DrawTextFormat uint

DrawText format flags

const (
    TextTop                  DrawTextFormat = win.DT_TOP
    TextLeft                 DrawTextFormat = win.DT_LEFT
    TextCenter               DrawTextFormat = win.DT_CENTER
    TextRight                DrawTextFormat = win.DT_RIGHT
    TextVCenter              DrawTextFormat = win.DT_VCENTER
    TextBottom               DrawTextFormat = win.DT_BOTTOM
    TextWordbreak            DrawTextFormat = win.DT_WORDBREAK
    TextSingleLine           DrawTextFormat = win.DT_SINGLELINE
    TextExpandTabs           DrawTextFormat = win.DT_EXPANDTABS
    TextTabstop              DrawTextFormat = win.DT_TABSTOP
    TextNoClip               DrawTextFormat = win.DT_NOCLIP
    TextExternalLeading      DrawTextFormat = win.DT_EXTERNALLEADING
    TextCalcRect             DrawTextFormat = win.DT_CALCRECT
    TextNoPrefix             DrawTextFormat = win.DT_NOPREFIX
    TextInternal             DrawTextFormat = win.DT_INTERNAL
    TextEditControl          DrawTextFormat = win.DT_EDITCONTROL
    TextPathEllipsis         DrawTextFormat = win.DT_PATH_ELLIPSIS
    TextEndEllipsis          DrawTextFormat = win.DT_END_ELLIPSIS
    TextModifyString         DrawTextFormat = win.DT_MODIFYSTRING
    TextRTLReading           DrawTextFormat = win.DT_RTLREADING
    TextWordEllipsis         DrawTextFormat = win.DT_WORD_ELLIPSIS
    TextNoFullWidthCharBreak DrawTextFormat = win.DT_NOFULLWIDTHCHARBREAK
    TextHidePrefix           DrawTextFormat = win.DT_HIDEPREFIX
    TextPrefixOnly           DrawTextFormat = win.DT_PREFIXONLY
)

type DropFilesEvent Uses

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

func (*DropFilesEvent) Attach Uses

func (e *DropFilesEvent) Attach(handler DropFilesEventHandler) int

func (*DropFilesEvent) Detach Uses

func (e *DropFilesEvent) Detach(handle int)

func (*DropFilesEvent) Once Uses

func (e *DropFilesEvent) Once(handler DropFilesEventHandler)

type DropFilesEventHandler Uses

type DropFilesEventHandler func([]string)

type DropFilesEventPublisher Uses

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

func (*DropFilesEventPublisher) Event Uses

func (p *DropFilesEventPublisher) Event(hWnd win.HWND) *DropFilesEvent

func (*DropFilesEventPublisher) Publish Uses

func (p *DropFilesEventPublisher) Publish(hDrop win.HDROP)

type DropShadowEffect Uses

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

func NewDropShadowEffect Uses

func NewDropShadowEffect(color Color) (*DropShadowEffect, error)

func (*DropShadowEffect) Dispose Uses

func (wgeb *DropShadowEffect) Dispose()

func (*DropShadowEffect) Draw Uses

func (dse *DropShadowEffect) Draw(widget Widget, canvas *Canvas) error

type Error Uses

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

func (*Error) Error Uses

func (err *Error) Error() string

func (*Error) Inner Uses

func (err *Error) Inner() error

func (*Error) Message Uses

func (err *Error) Message() string

func (*Error) Stack Uses

func (err *Error) Stack() []byte

type ErrorEvent Uses

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

func (*ErrorEvent) Attach Uses

func (e *ErrorEvent) Attach(handler ErrorEventHandler) int

func (*ErrorEvent) Detach Uses

func (e *ErrorEvent) Detach(handle int)

func (*ErrorEvent) Once Uses

func (e *ErrorEvent) Once(handler ErrorEventHandler)

type ErrorEventHandler Uses

type ErrorEventHandler func(err error)

type ErrorEventPublisher Uses

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

func (*ErrorEventPublisher) Event Uses

func (p *ErrorEventPublisher) Event() *ErrorEvent

func (*ErrorEventPublisher) Publish Uses

func (p *ErrorEventPublisher) Publish(err error)

type ErrorPresenter Uses

type ErrorPresenter interface {
    PresentError(err error, widget Widget)
}

type Event Uses

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

func (*Event) Attach Uses

func (e *Event) Attach(handler EventHandler) int

func (*Event) Detach Uses

func (e *Event) Detach(handle int)

func (*Event) Once Uses

func (e *Event) Once(handler EventHandler)

type EventHandler Uses

type EventHandler func()

type EventPublisher Uses

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

func (*EventPublisher) Event Uses

func (p *EventPublisher) Event() *Event

func (*EventPublisher) Publish Uses

func (p *EventPublisher) Publish()

type Expression Uses

type Expression interface {
    Value() interface{}
    Changed() *Event
}

func NewReflectExpression Uses

func NewReflectExpression(root Expression, path string) Expression

type ExtractableIcon Uses

type ExtractableIcon interface {
    FilePath_() string
    Index_() int
    Size_() int
}

type FileDialog Uses

type FileDialog struct {
    Title          string
    FilePath       string
    FilePaths      []string
    InitialDirPath string
    Filter         string
    FilterIndex    int
    Flags          uint32
    ShowReadOnlyCB bool
}

func (*FileDialog) ShowBrowseFolder Uses

func (dlg *FileDialog) ShowBrowseFolder(owner Form) (accepted bool, err error)

func (*FileDialog) ShowOpen Uses

func (dlg *FileDialog) ShowOpen(owner Form) (accepted bool, err error)

func (*FileDialog) ShowOpenMultiple Uses

func (dlg *FileDialog) ShowOpenMultiple(owner Form) (accepted bool, err error)

func (*FileDialog) ShowSave Uses

func (dlg *FileDialog) ShowSave(owner Form) (accepted bool, err error)

type FlowLayout Uses

type FlowLayout struct {
    LayoutBase
    // contains filtered or unexported fields
}

func NewFlowLayout Uses

func NewFlowLayout() *FlowLayout

func (*FlowLayout) CreateLayoutItem Uses

func (l *FlowLayout) CreateLayoutItem(ctx *LayoutContext) ContainerLayoutItem

func (*FlowLayout) SetStretchFactor Uses

func (l *FlowLayout) SetStretchFactor(widget Widget, factor int) error

func (*FlowLayout) StretchFactor Uses

func (l *FlowLayout) StretchFactor(widget Widget) int

type Font Uses

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 NewFont Uses

func NewFont(family string, pointSize int, style FontStyle) (*Font, error)

NewFont returns a new Font with the specified attributes.

func (*Font) Bold Uses

func (f *Font) Bold() bool

Bold returns if text drawn using the Font appears with greater weight than normal.

func (*Font) Dispose Uses

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.

func (*Font) Family Uses

func (f *Font) Family() string

Family returns the family name of the Font.

func (*Font) Italic Uses

func (f *Font) Italic() bool

Italic returns if text drawn using the Font appears slanted.

func (*Font) PointSize Uses

func (f *Font) PointSize() int

PointSize returns the size of the Font in point units.

func (*Font) StrikeOut Uses

func (f *Font) StrikeOut() bool

StrikeOut returns if text drawn using the Font appears striked out.

func (*Font) Style Uses

func (f *Font) Style() FontStyle

Style returns the combination of style flags of the Font.

func (*Font) Underline Uses

func (f *Font) Underline() bool

Underline returns if text drawn using the font appears underlined.

type FontMemResource Uses

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

FontMemResource represents a font resource loaded into memory from the application's resources.

func NewFontMemResourceById Uses

func NewFontMemResourceById(id int) (*FontMemResource, error)

NewFontMemResourceById function loads a font resource from the executable's resources using the resource ID. The font must be embedded into resources using corresponding operator in the application's RC script.

func NewFontMemResourceByName Uses

func NewFontMemResourceByName(name string) (*FontMemResource, error)

NewFontMemResourceByName function loads a font resource from the executable's resources using the resource name. The font must be embedded into resources using corresponding operator in the application's RC script.

func (*FontMemResource) Dispose Uses

func (fmr *FontMemResource) Dispose()

Dispose removes the font resource from memory

type FontStyle Uses

type FontStyle byte
const (
    FontBold      FontStyle = 0x01
    FontItalic    FontStyle = 0x02
    FontUnderline FontStyle = 0x04
    FontStrikeOut FontStyle = 0x08
)

Font style flags

type Form Uses

type Form interface {
    Container
    AsFormBase() *FormBase
    Run() int
    Starting() *Event
    Closing() *CloseEvent
    Activating() *Event
    Deactivating() *Event
    Activate() error
    Show()
    Hide()
    Title() string
    SetTitle(title string) error
    TitleChanged() *Event
    Icon() Image
    SetIcon(icon Image) error
    IconChanged() *Event
    Owner() Form
    SetOwner(owner Form) error
    ProgressIndicator() *ProgressIndicator

    // RightToLeftLayout returns whether coordinates on the x axis of the
    // Form increase from right to left.
    RightToLeftLayout() bool

    // SetRightToLeftLayout sets whether coordinates on the x axis of the
    // Form increase from right to left.
    SetRightToLeftLayout(rtl bool) error
}

type FormBase Uses

type FormBase struct {
    WindowBase
    // contains filtered or unexported fields
}

func (*FormBase) Activate Uses

func (fb *FormBase) Activate() error

func (*FormBase) Activating Uses

func (fb *FormBase) Activating() *Event

func (*FormBase) ApplySysColors Uses

func (fb *FormBase) ApplySysColors()

func (*FormBase) AsContainerBase Uses

func (fb *FormBase) AsContainerBase() *ContainerBase

func (*FormBase) AsFormBase Uses

func (fb *FormBase) AsFormBase() *FormBase

func (*FormBase) Background Uses

func (fb *FormBase) Background() Brush

func (*FormBase) Children Uses

func (fb *FormBase) Children() *WidgetList

func (*FormBase) Close Uses

func (fb *FormBase) Close() error

func (*FormBase) Closing Uses

func (fb *FormBase) Closing() *CloseEvent

func (*FormBase) ContextMenu Uses

func (fb *FormBase) ContextMenu() *Menu

func (*FormBase) ContextMenuLocation Uses

func (fb *FormBase) ContextMenuLocation() Point

func (*FormBase) DataBinder Uses

func (fb *FormBase) DataBinder() *DataBinder

func (*FormBase) Deactivating Uses

func (fb *FormBase) Deactivating() *Event

func (*FormBase) Dispose Uses

func (fb *FormBase) Dispose()

func (*FormBase) Hide Uses

func (fb *FormBase) Hide()

func (*FormBase) Icon Uses

func (fb *FormBase) Icon() Image

func (*FormBase) IconChanged Uses

func (fb *FormBase) IconChanged() *Event

func (*FormBase) Layout Uses

func (fb *FormBase) Layout() Layout

func (*FormBase) MouseDown Uses

func (fb *FormBase) MouseDown() *MouseEvent

func (*FormBase) MouseMove Uses

func (fb *FormBase) MouseMove() *MouseEvent

func (*FormBase) MouseUp Uses

func (fb *FormBase) MouseUp() *MouseEvent

func (*FormBase) Owner Uses

func (fb *FormBase) Owner() Form

func (*FormBase) Persistent Uses

func (fb *FormBase) Persistent() bool

func (*FormBase) ProgressIndicator Uses

func (fb *FormBase) ProgressIndicator() *ProgressIndicator

func (*FormBase) RestoreState Uses

func (fb *FormBase) RestoreState() error

func (*FormBase) RightToLeftLayout Uses

func (fb *FormBase) RightToLeftLayout() bool

RightToLeftLayout returns whether coordinates on the x axis of the FormBase increase from right to left.

func (*FormBase) Run Uses

func (fb *FormBase) Run() int

func (*FormBase) SaveState Uses

func (fb *FormBase) SaveState() error

func (*FormBase) SetBackground Uses

func (fb *FormBase) SetBackground(background Brush)

func (*FormBase) SetBoundsPixels Uses

func (fb *FormBase) SetBoundsPixels(bounds Rectangle) error

func (*FormBase) SetContextMenu Uses

func (fb *FormBase) SetContextMenu(contextMenu *Menu)

func (*FormBase) SetDataBinder Uses

func (fb *FormBase) SetDataBinder(db *DataBinder)

func (*FormBase) SetIcon Uses

func (fb *FormBase) SetIcon(icon Image) error

func (*FormBase) SetLayout Uses

func (fb *FormBase) SetLayout(value Layout) error

func (*FormBase) SetOwner Uses

func (fb *FormBase) SetOwner(value Form) error

func (*FormBase) SetPersistent Uses

func (fb *FormBase) SetPersistent(value bool)

func (*FormBase) SetRightToLeftLayout Uses

func (fb *FormBase) SetRightToLeftLayout(rtl bool) error

SetRightToLeftLayout sets whether coordinates on the x axis of the FormBase increase from right to left.

func (*FormBase) SetSuspended Uses

func (fb *FormBase) SetSuspended(suspended bool)

func (*FormBase) SetTitle Uses

func (fb *FormBase) SetTitle(value string) error

func (*FormBase) Show Uses

func (fb *FormBase) Show()

func (*FormBase) Starting Uses

func (fb *FormBase) Starting() *Event

func (*FormBase) Title Uses

func (fb *FormBase) Title() string

func (*FormBase) TitleChanged Uses

func (fb *FormBase) TitleChanged() *Event

func (*FormBase) WndProc Uses

func (fb *FormBase) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type GeometricPen Uses

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

func NewGeometricPen Uses

func NewGeometricPen(style PenStyle, width int, brush Brush) (*GeometricPen, error)

NewGeometricPen prepares new geometric pen. width parameter is specified in 1/96" units.

func (*GeometricPen) Brush Uses

func (p *GeometricPen) Brush() Brush

func (*GeometricPen) Dispose Uses

func (p *GeometricPen) Dispose()

func (*GeometricPen) Style Uses

func (p *GeometricPen) Style() PenStyle

func (*GeometricPen) Width Uses

func (p *GeometricPen) Width() int

Width returns pen width in 1/96" units.

type Geometry Uses

type Geometry struct {
    Alignment                   Alignment2D
    MinSize                     Size // in native pixels
    MaxSize                     Size // in native pixels
    IdealSize                   Size // in native pixels
    Size                        Size // in native pixels
    ClientSize                  Size // in native pixels
    ConsumingSpaceWhenInvisible bool
}

type GradientBrush Uses

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

func NewGradientBrush Uses

func NewGradientBrush(vertexes []GradientVertex, triangles []GradientTriangle) (*GradientBrush, error)

func NewHorizontalGradientBrush Uses

func NewHorizontalGradientBrush(stops []GradientStop) (*GradientBrush, error)

func NewVerticalGradientBrush Uses

func NewVerticalGradientBrush(stops []GradientStop) (*GradientBrush, error)

func (*GradientBrush) Dispose Uses

func (bb *GradientBrush) Dispose()

type GradientComposite Uses

type GradientComposite struct {
    *Composite
    // contains filtered or unexported fields
}

func NewGradientComposite Uses

func NewGradientComposite(parent Container) (*GradientComposite, error)

func NewGradientCompositeWithStyle Uses

func NewGradientCompositeWithStyle(parent Container, style uint32) (*GradientComposite, error)

func (*GradientComposite) Color1 Uses

func (gc *GradientComposite) Color1() Color

func (*GradientComposite) Color2 Uses

func (gc *GradientComposite) Color2() Color

func (*GradientComposite) Dispose Uses

func (gc *GradientComposite) Dispose()

func (*GradientComposite) SetColor1 Uses

func (gc *GradientComposite) SetColor1(c Color) (err error)

func (*GradientComposite) SetColor2 Uses

func (gc *GradientComposite) SetColor2(c Color) (err error)

func (*GradientComposite) SetVertical Uses

func (gc *GradientComposite) SetVertical(vertical bool) (err error)

func (*GradientComposite) Vertical Uses

func (gc *GradientComposite) Vertical() bool

func (*GradientComposite) WndProc Uses

func (gc *GradientComposite) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type GradientStop Uses

type GradientStop struct {
    Offset float64
    Color  Color
}

type GradientTriangle Uses

type GradientTriangle struct {
    Vertex1 int
    Vertex2 int
    Vertex3 int
}

type GradientVertex Uses

type GradientVertex struct {
    X     float64
    Y     float64
    Color Color
}

type GridLayout Uses

type GridLayout struct {
    LayoutBase
    // contains filtered or unexported fields
}

func NewGridLayout Uses

func NewGridLayout() *GridLayout

func (*GridLayout) ColumnStretchFactor Uses

func (l *GridLayout) ColumnStretchFactor(column int) int

func (*GridLayout) CreateLayoutItem Uses

func (l *GridLayout) CreateLayoutItem(ctx *LayoutContext) ContainerLayoutItem

func (*GridLayout) Range Uses

func (l *GridLayout) Range(widget Widget) (r Rectangle, ok bool)

func (*GridLayout) RowStretchFactor Uses

func (l *GridLayout) RowStretchFactor(row int) int

func (*GridLayout) SetColumnStretchFactor Uses

func (l *GridLayout) SetColumnStretchFactor(column, factor int) error

func (*GridLayout) SetRange Uses

func (l *GridLayout) SetRange(widget Widget, r Rectangle) error

func (*GridLayout) SetRowStretchFactor Uses

func (l *GridLayout) SetRowStretchFactor(row, factor int) error

type GroupBox Uses

type GroupBox struct {
    WidgetBase
    // contains filtered or unexported fields
}

func NewGroupBox Uses

func NewGroupBox(parent Container) (*GroupBox, error)

func (*GroupBox) ApplyDPI Uses

func (gb *GroupBox) ApplyDPI(dpi int)

func (*GroupBox) AsContainerBase Uses

func (gb *GroupBox) AsContainerBase() *ContainerBase

func (*GroupBox) Checkable Uses

func (gb *GroupBox) Checkable() bool

func (*GroupBox) Checked Uses

func (gb *GroupBox) Checked() bool

func (*GroupBox) CheckedChanged Uses

func (gb *GroupBox) CheckedChanged() *Event

func (*GroupBox) Children Uses

func (gb *GroupBox) Children() *WidgetList

func (*GroupBox) ClientBoundsPixels Uses

func (gb *GroupBox) ClientBoundsPixels() Rectangle

func (*GroupBox) CreateLayoutItem Uses

func (gb *GroupBox) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*GroupBox) DataBinder Uses

func (gb *GroupBox) DataBinder() *DataBinder

func (*GroupBox) Layout Uses

func (gb *GroupBox) Layout() Layout

func (*GroupBox) MouseDown Uses

func (gb *GroupBox) MouseDown() *MouseEvent

func (*GroupBox) MouseMove Uses

func (gb *GroupBox) MouseMove() *MouseEvent

func (*GroupBox) MouseUp Uses

func (gb *GroupBox) MouseUp() *MouseEvent

func (*GroupBox) Persistent Uses

func (gb *GroupBox) Persistent() bool

func (*GroupBox) RestoreState Uses

func (gb *GroupBox) RestoreState() error

func (*GroupBox) SaveState Uses

func (gb *GroupBox) SaveState() error

func (*GroupBox) SetCheckable Uses

func (gb *GroupBox) SetCheckable(checkable bool)

func (*GroupBox) SetChecked Uses

func (gb *GroupBox) SetChecked(checked bool)

func (*GroupBox) SetDataBinder Uses

func (gb *GroupBox) SetDataBinder(dataBinder *DataBinder)

func (*GroupBox) SetLayout Uses

func (gb *GroupBox) SetLayout(value Layout) error

func (*GroupBox) SetPersistent Uses

func (gb *GroupBox) SetPersistent(value bool)

func (*GroupBox) SetSuspended Uses

func (gb *GroupBox) SetSuspended(suspend bool)

func (*GroupBox) SetTitle Uses

func (gb *GroupBox) SetTitle(title string) error

func (*GroupBox) Title Uses

func (gb *GroupBox) Title() string

func (*GroupBox) WndProc Uses

func (gb *GroupBox) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type HasChilder Uses

type HasChilder interface {
    HasChild() bool
}

HasChilder enables widgets like TreeView to determine if an item has any child, without enforcing to fully count all children.

type HatchBrush Uses

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

func NewHatchBrush Uses

func NewHatchBrush(color Color, style HatchStyle) (*HatchBrush, error)

func (*HatchBrush) Color Uses

func (b *HatchBrush) Color() Color

func (*HatchBrush) Dispose Uses

func (bb *HatchBrush) Dispose()

func (*HatchBrush) Style Uses

func (b *HatchBrush) Style() HatchStyle

type HatchStyle Uses

type HatchStyle int
const (
    HatchHorizontal       HatchStyle = win.HS_HORIZONTAL
    HatchVertical         HatchStyle = win.HS_VERTICAL
    HatchForwardDiagonal  HatchStyle = win.HS_FDIAGONAL
    HatchBackwardDiagonal HatchStyle = win.HS_BDIAGONAL
    HatchCross            HatchStyle = win.HS_CROSS
    HatchDiagonalCross    HatchStyle = win.HS_DIAGCROSS
)

type HeightForWidther Uses

type HeightForWidther interface {
    HasHeightForWidth() bool

    // HeightForWidth returns appropriate height if element has given width. width parameter and
    // return value are in native pixels.
    HeightForWidth(width int) int
}

type Icon Uses

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 IconApplication Uses

func IconApplication() *Icon

func IconError Uses

func IconError() *Icon

func IconFrom Uses

func IconFrom(src interface{}, dpi int) (*Icon, error)

func IconInformation Uses

func IconInformation() *Icon

func IconQuestion Uses

func IconQuestion() *Icon

func IconShield Uses

func IconShield() *Icon

func IconWarning Uses

func IconWarning() *Icon
func IconWinLogo() *Icon

func NewIconExtractedFromFile Uses

func NewIconExtractedFromFile(filePath string, index, _ int) (*Icon, error)

NewIconExtractedFromFile returns a new Icon, as identified by index of size 16x16 from filePath.

func NewIconExtractedFromFileWithSize Uses

func NewIconExtractedFromFileWithSize(filePath string, index, size int) (*Icon, error)

NewIconExtractedFromFileWithSize returns a new Icon, as identified by index of the desired size from filePath.

func NewIconFromBitmap Uses

func NewIconFromBitmap(bmp *Bitmap) (ic *Icon, err error)

NewIconFromBitmap returns a new Icon, using the specified Bitmap as source.

func NewIconFromFile Uses

func NewIconFromFile(filePath string) (*Icon, error)

NewIconFromFile returns a new Icon, using the specified icon image file and default size.

func NewIconFromFileWithSize Uses

func NewIconFromFileWithSize(filePath string, size Size) (*Icon, error)

NewIconFromFileWithSize returns a new Icon, using the specified icon image file and size.

func NewIconFromHICON Uses

func NewIconFromHICON(hIcon win.HICON) (ic *Icon, err error)

NewIconFromHICON returns a new Icon at 96dpi, using the specified win.HICON as source.

Deprecated: Newer applications should use NewIconFromHICONForDPI.

func NewIconFromHICONForDPI Uses

func NewIconFromHICONForDPI(hIcon win.HICON, dpi int) (ic *Icon, err error)

NewIconFromHICONForDPI returns a new Icon at given DPI, using the specified win.HICON as source.

func NewIconFromImage Uses

func NewIconFromImage(im image.Image) (ic *Icon, err error)

NewIconFromImage returns a new Icon at 96dpi, using the specified image.Image as source.

Deprecated: Newer applications should use NewIconFromImageForDPI.

func NewIconFromImageForDPI Uses

func NewIconFromImageForDPI(im image.Image, dpi int) (ic *Icon, err error)

NewIconFromImageForDPI returns a new Icon at given DPI, using the specified image.Image as source.

func NewIconFromImageWithSize Uses

func NewIconFromImageWithSize(image Image, size Size) (*Icon, error)

NewIconFromImageWithSize returns a new Icon of the given size in native pixels, using the specified Image as source.

func NewIconFromResource Uses

func NewIconFromResource(name string) (*Icon, error)

NewIconFromResource returns a new Icon of default size, using the specified icon resource.

func NewIconFromResourceId Uses

func NewIconFromResourceId(id int) (*Icon, error)

NewIconFromResourceId returns a new Icon of default size, using the specified icon resource.

func NewIconFromResourceIdWithSize Uses

func NewIconFromResourceIdWithSize(id int, size Size) (*Icon, error)

NewIconFromResourceIdWithSize returns a new Icon of size size, using the specified icon resource.

func NewIconFromResourceWithSize Uses

func NewIconFromResourceWithSize(name string, size Size) (*Icon, error)

NewIconFromResourceWithSize returns a new Icon of size size, using the specified icon resource.

func NewIconFromSysDLL Uses

func NewIconFromSysDLL(dllBaseName string, index int) (*Icon, error)

NewIconFromSysDLL returns a new Icon, as identified by index of size 16x16 from the system DLL identified by dllBaseName.

func NewIconFromSysDLLWithSize Uses

func NewIconFromSysDLLWithSize(dllBaseName string, index, size int) (*Icon, error)

NewIconFromSysDLLWithSize returns a new Icon, as identified by index of the desired size from the system DLL identified by dllBaseName.

func (*Icon) Dispose Uses

func (i *Icon) Dispose()

Dispose releases the operating system resources associated with the Icon.

func (*Icon) Size Uses

func (i *Icon) Size() Size

Size returns icon size in 1/96" units.

type IconCache Uses

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

func NewIconCache Uses

func NewIconCache() *IconCache

func (*IconCache) Bitmap Uses

func (ic *IconCache) Bitmap(image Image, dpi int) (*Bitmap, error)

func (*IconCache) Clear Uses

func (ic *IconCache) Clear()

func (*IconCache) Dispose Uses

func (ic *IconCache) Dispose()

func (*IconCache) Icon Uses

func (ic *IconCache) Icon(image Image, dpi int) (*Icon, error)

type IdealSizer Uses

type IdealSizer interface {
    // IdealSize returns ideal window size in native pixels.
    IdealSize() Size
}

type Image Uses

type Image interface {
    Dispose()

    // Size returns image size in 1/96" units.
    Size() Size
    // contains filtered or unexported methods
}

func ImageFrom Uses

func ImageFrom(src interface{}) (img Image, err error)

func NewImageFromFile Uses

func NewImageFromFile(filePath string) (Image, error)

NewImageFromFile loads image from file at 96dpi. Supported types are .ico, .emf, .bmp, .png...

Deprecated: Newer applications should use NewImageFromFileForDPI.

func NewImageFromFileForDPI Uses

func NewImageFromFileForDPI(filePath string, dpi int) (Image, error)

NewImageFromFileForDPI loads image from file at given DPI. Supported types are .ico, .emf, .bmp, .png...

type ImageList Uses

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

func NewImageList Uses

func NewImageList(imageSize Size, maskColor Color) (*ImageList, error)

NewImageList creates an empty image list at 96dpi. imageSize parameter is specified in 1/96" units.

Deprecated: Newer applications should use NewImageListForDPI.

func NewImageListForDPI Uses

func NewImageListForDPI(imageSize Size, maskColor Color, dpi int) (*ImageList, error)

NewImageListForDPI creates an empty image list for image size at given DPI. imageSize is specified in native pixels.

func (*ImageList) Add Uses

func (il *ImageList) Add(bitmap, maskBitmap *Bitmap) (int, error)

func (*ImageList) AddIcon Uses

func (il *ImageList) AddIcon(icon *Icon) (int32, error)

func (*ImageList) AddImage Uses

func (il *ImageList) AddImage(image interface{}) (int32, error)

func (*ImageList) AddMasked Uses

func (il *ImageList) AddMasked(bitmap *Bitmap) (int32, error)

func (*ImageList) Dispose Uses

func (il *ImageList) Dispose()

func (*ImageList) DrawPixels Uses

func (il *ImageList) DrawPixels(canvas *Canvas, index int, bounds Rectangle) error

func (*ImageList) Handle Uses

func (il *ImageList) Handle() win.HIMAGELIST

func (*ImageList) MaskColor Uses

func (il *ImageList) MaskColor() Color

type ImageProvider Uses

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 Uses

type ImageView struct {
    *CustomWidget
    // contains filtered or unexported fields
}

func NewImageView Uses

func NewImageView(parent Container) (*ImageView, error)

func (*ImageView) CreateLayoutItem Uses

func (iv *ImageView) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*ImageView) Image Uses

func (iv *ImageView) Image() Image

func (*ImageView) ImageChanged Uses

func (iv *ImageView) ImageChanged() *Event

func (*ImageView) Margin Uses

func (iv *ImageView) Margin() int

func (*ImageView) MarginChanged Uses

func (iv *ImageView) MarginChanged() *Event

func (*ImageView) Mode Uses

func (iv *ImageView) Mode() ImageViewMode

func (*ImageView) SetImage Uses

func (iv *ImageView) SetImage(image Image) error

func (*ImageView) SetMargin Uses

func (iv *ImageView) SetMargin(margin int) error

func (*ImageView) SetMode Uses

func (iv *ImageView) SetMode(mode ImageViewMode)

type ImageViewMode Uses

type ImageViewMode int
const (
    ImageViewModeIdeal ImageViewMode = iota
    ImageViewModeCorner
    ImageViewModeCenter
    ImageViewModeShrink
    ImageViewModeZoom
    ImageViewModeStretch
)

type Imager Uses

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 IniFileSettings Uses

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

func NewIniFileSettings Uses

func NewIniFileSettings(fileName string) *IniFileSettings

func (*IniFileSettings) ExpireDuration Uses

func (ifs *IniFileSettings) ExpireDuration() time.Duration

func (*IniFileSettings) FilePath Uses

func (ifs *IniFileSettings) FilePath() string

func (*IniFileSettings) Get Uses

func (ifs *IniFileSettings) Get(key string) (string, bool)

func (*IniFileSettings) Load Uses

func (ifs *IniFileSettings) Load() error

func (*IniFileSettings) Portable Uses

func (ifs *IniFileSettings) Portable() bool

func (*IniFileSettings) Put Uses

func (ifs *IniFileSettings) Put(key, value string) error

func (*IniFileSettings) PutExpiring Uses

func (ifs *IniFileSettings) PutExpiring(key, value string) error

func (*IniFileSettings) Remove Uses

func (ifs *IniFileSettings) Remove(key string) error

func (*IniFileSettings) Save Uses

func (ifs *IniFileSettings) Save() error

func (*IniFileSettings) SetExpireDuration Uses

func (ifs *IniFileSettings) SetExpireDuration(expireDuration time.Duration)

func (*IniFileSettings) SetPortable Uses

func (ifs *IniFileSettings) SetPortable(portable bool)

func (*IniFileSettings) Timestamp Uses

func (ifs *IniFileSettings) Timestamp(key string) (time.Time, bool)

type IntEvent Uses

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

func (*IntEvent) Attach Uses

func (e *IntEvent) Attach(handler IntEventHandler) int

func (*IntEvent) Detach Uses

func (e *IntEvent) Detach(handle int)

func (*IntEvent) Once Uses

func (e *IntEvent) Once(handler IntEventHandler)

type IntEventHandler Uses

type IntEventHandler func(n int)

type IntEventPublisher Uses

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

func (*IntEventPublisher) Event Uses

func (p *IntEventPublisher) Event() *IntEvent

func (*IntEventPublisher) Publish Uses

func (p *IntEventPublisher) Publish(n int)

type IntRangeEvent Uses

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

func (*IntRangeEvent) Attach Uses

func (e *IntRangeEvent) Attach(handler IntRangeEventHandler) int

func (*IntRangeEvent) Detach Uses

func (e *IntRangeEvent) Detach(handle int)

func (*IntRangeEvent) Once Uses

func (e *IntRangeEvent) Once(handler IntRangeEventHandler)

type IntRangeEventHandler Uses

type IntRangeEventHandler func(from, to int)

type IntRangeEventPublisher Uses

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

func (*IntRangeEventPublisher) Event Uses

func (p *IntRangeEventPublisher) Event() *IntRangeEvent

func (*IntRangeEventPublisher) Publish Uses

func (p *IntRangeEventPublisher) Publish(from, to int)

type ItemChecker Uses

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 Key Uses

type Key uint16
const (
    KeyLButton           Key = win.VK_LBUTTON
    KeyRButton           Key = win.VK_RBUTTON
    KeyCancel            Key = win.VK_CANCEL
    KeyMButton           Key = win.VK_MBUTTON
    KeyXButton1          Key = win.VK_XBUTTON1
    KeyXButton2          Key = win.VK_XBUTTON2
    KeyBack              Key = win.VK_BACK
    KeyTab               Key = win.VK_TAB
    KeyClear             Key = win.VK_CLEAR
    KeyReturn            Key = win.VK_RETURN
    KeyShift             Key = win.VK_SHIFT
    KeyControl           Key = win.VK_CONTROL
    KeyAlt               Key = win.VK_MENU
    KeyMenu              Key = win.VK_MENU
    KeyPause             Key = win.VK_PAUSE
    KeyCapital           Key = win.VK_CAPITAL
    KeyKana              Key = win.VK_KANA
    KeyHangul            Key = win.VK_HANGUL
    KeyJunja             Key = win.VK_JUNJA
    KeyFinal             Key = win.VK_FINAL
    KeyHanja             Key = win.VK_HANJA
    KeyKanji             Key = win.VK_KANJI
    KeyEscape            Key = win.VK_ESCAPE
    KeyConvert           Key = win.VK_CONVERT
    KeyNonconvert        Key = win.VK_NONCONVERT
    KeyAccept            Key = win.VK_ACCEPT
    KeyModeChange        Key = win.VK_MODECHANGE
    KeySpace             Key = win.VK_SPACE
    KeyPrior             Key = win.VK_PRIOR
    KeyNext              Key = win.VK_NEXT
    KeyEnd               Key = win.VK_END
    KeyHome              Key = win.VK_HOME
    KeyLeft              Key = win.VK_LEFT
    KeyUp                Key = win.VK_UP
    KeyRight             Key = win.VK_RIGHT
    KeyDown              Key = win.VK_DOWN
    KeySelect            Key = win.VK_SELECT
    KeyPrint             Key = win.VK_PRINT
    KeyExecute           Key = win.VK_EXECUTE
    KeySnapshot          Key = win.VK_SNAPSHOT
    KeyInsert            Key = win.VK_INSERT
    KeyDelete            Key = win.VK_DELETE
    KeyHelp              Key = win.VK_HELP
    Key0                 Key = 0x30
    Key1                 Key = 0x31
    Key2                 Key = 0x32
    Key3                 Key = 0x33
    Key4                 Key = 0x34
    Key5                 Key = 0x35
    Key6                 Key = 0x36
    Key7                 Key = 0x37
    Key8                 Key = 0x38
    Key9                 Key = 0x39
    KeyA                 Key = 0x41
    KeyB                 Key = 0x42
    KeyC                 Key = 0x43
    KeyD                 Key = 0x44
    KeyE                 Key = 0x45
    KeyF                 Key = 0x46
    KeyG                 Key = 0x47
    KeyH                 Key = 0x48
    KeyI                 Key = 0x49
    KeyJ                 Key = 0x4A
    KeyK                 Key = 0x4B
    KeyL                 Key = 0x4C
    KeyM                 Key = 0x4D
    KeyN                 Key = 0x4E
    KeyO                 Key = 0x4F
    KeyP                 Key = 0x50
    KeyQ                 Key = 0x51
    KeyR                 Key = 0x52
    KeyS                 Key = 0x53
    KeyT                 Key = 0x54
    KeyU                 Key = 0x55
    KeyV                 Key = 0x56
    KeyW                 Key = 0x57
    KeyX                 Key = 0x58
    KeyY                 Key = 0x59
    KeyZ                 Key = 0x5A
    KeyLWin              Key = win.VK_LWIN
    KeyRWin              Key = win.VK_RWIN
    KeyApps              Key = win.VK_APPS
    KeySleep             Key = win.VK_SLEEP
    KeyNumpad0           Key = win.VK_NUMPAD0
    KeyNumpad1           Key = win.VK_NUMPAD1
    KeyNumpad2           Key = win.VK_NUMPAD2
    KeyNumpad3           Key = win.VK_NUMPAD3
    KeyNumpad4           Key = win.VK_NUMPAD4
    KeyNumpad5           Key = win.VK_NUMPAD5
    KeyNumpad6           Key = win.VK_NUMPAD6
    KeyNumpad7           Key = win.VK_NUMPAD7
    KeyNumpad8           Key = win.VK_NUMPAD8
    KeyNumpad9           Key = win.VK_NUMPAD9
    KeyMultiply          Key = win.VK_MULTIPLY
    KeyAdd               Key = win.VK_ADD
    KeySeparator         Key = win.VK_SEPARATOR
    KeySubtract          Key = win.VK_SUBTRACT
    KeyDecimal           Key = win.VK_DECIMAL
    KeyDivide            Key = win.VK_DIVIDE
    KeyF1                Key = win.VK_F1
    KeyF2                Key = win.VK_F2
    KeyF3                Key = win.VK_F3
    KeyF4                Key = win.VK_F4
    KeyF5                Key = win.VK_F5
    KeyF6                Key = win.VK_F6
    KeyF7                Key = win.VK_F7
    KeyF8                Key = win.VK_F8
    KeyF9                Key = win.VK_F9
    KeyF10               Key = win.VK_F10
    KeyF11               Key = win.VK_F11
    KeyF12               Key = win.VK_F12
    KeyF13               Key = win.VK_F13
    KeyF14               Key = win.VK_F14
    KeyF15               Key = win.VK_F15
    KeyF16               Key = win.VK_F16
    KeyF17               Key = win.VK_F17
    KeyF18               Key = win.VK_F18
    KeyF19               Key = win.VK_F19
    KeyF20               Key = win.VK_F20
    KeyF21               Key = win.VK_F21
    KeyF22               Key = win.VK_F22
    KeyF23               Key = win.VK_F23
    KeyF24               Key = win.VK_F24
    KeyNumlock           Key = win.VK_NUMLOCK
    KeyScroll            Key = win.VK_SCROLL
    KeyLShift            Key = win.VK_LSHIFT
    KeyRShift            Key = win.VK_RSHIFT
    KeyLControl          Key = win.VK_LCONTROL
    KeyRControl          Key = win.VK_RCONTROL
    KeyLAlt              Key = win.VK_LMENU
    KeyLMenu             Key = win.VK_LMENU
    KeyRAlt              Key = win.VK_RMENU
    KeyRMenu             Key = win.VK_RMENU
    KeyBrowserBack       Key = win.VK_BROWSER_BACK
    KeyBrowserForward    Key = win.VK_BROWSER_FORWARD
    KeyBrowserRefresh    Key = win.VK_BROWSER_REFRESH
    KeyBrowserStop       Key = win.VK_BROWSER_STOP
    KeyBrowserSearch     Key = win.VK_BROWSER_SEARCH
    KeyBrowserFavorites  Key = win.VK_BROWSER_FAVORITES
    KeyBrowserHome       Key = win.VK_BROWSER_HOME
    KeyVolumeMute        Key = win.VK_VOLUME_MUTE
    KeyVolumeDown        Key = win.VK_VOLUME_DOWN
    KeyVolumeUp          Key = win.VK_VOLUME_UP
    KeyMediaNextTrack    Key = win.VK_MEDIA_NEXT_TRACK
    KeyMediaPrevTrack    Key = win.VK_MEDIA_PREV_TRACK
    KeyMediaStop         Key = win.VK_MEDIA_STOP
    KeyMediaPlayPause    Key = win.VK_MEDIA_PLAY_PAUSE
    KeyLaunchMail        Key = win.VK_LAUNCH_MAIL
    KeyLaunchMediaSelect Key = win.VK_LAUNCH_MEDIA_SELECT
    KeyLaunchApp1        Key = win.VK_LAUNCH_APP1
    KeyLaunchApp2        Key = win.VK_LAUNCH_APP2
    KeyOEM1              Key = win.VK_OEM_1
    KeyOEMPlus           Key = win.VK_OEM_PLUS
    KeyOEMComma          Key = win.VK_OEM_COMMA
    KeyOEMMinus          Key = win.VK_OEM_MINUS
    KeyOEMPeriod         Key = win.VK_OEM_PERIOD
    KeyOEM2              Key = win.VK_OEM_2
    KeyOEM3              Key = win.VK_OEM_3
    KeyOEM4              Key = win.VK_OEM_4
    KeyOEM5              Key = win.VK_OEM_5
    KeyOEM6              Key = win.VK_OEM_6
    KeyOEM7              Key = win.VK_OEM_7
    KeyOEM8              Key = win.VK_OEM_8
    KeyOEM102            Key = win.VK_OEM_102
    KeyProcessKey        Key = win.VK_PROCESSKEY
    KeyPacket            Key = win.VK_PACKET
    KeyAttn              Key = win.VK_ATTN
    KeyCRSel             Key = win.VK_CRSEL
    KeyEXSel             Key = win.VK_EXSEL
    KeyErEOF             Key = win.VK_EREOF
    KeyPlay              Key = win.VK_PLAY
    KeyZoom              Key = win.VK_ZOOM
    KeyNoName            Key = win.VK_NONAME
    KeyPA1               Key = win.VK_PA1
    KeyOEMClear          Key = win.VK_OEM_CLEAR
)

func (Key) String Uses

func (k Key) String() string

type KeyEvent Uses

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

func (*KeyEvent) Attach Uses

func (e *KeyEvent) Attach(handler KeyEventHandler) int

func (*KeyEvent) Detach Uses

func (e *KeyEvent) Detach(handle int)

func (*KeyEvent) Once Uses

func (e *KeyEvent) Once(handler KeyEventHandler)

type KeyEventHandler Uses

type KeyEventHandler func(key Key)

type KeyEventPublisher Uses

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

func (*KeyEventPublisher) Event Uses

func (p *KeyEventPublisher) Event() *KeyEvent

func (*KeyEventPublisher) Publish Uses

func (p *KeyEventPublisher) Publish(key Key)

type Label Uses

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

func NewLabel Uses

func NewLabel(parent Container) (*Label, error)

func NewLabelWithStyle Uses

func NewLabelWithStyle(parent Container, style uint32) (*Label, error)

func (*Label) CreateLayoutItem Uses

func (s *Label) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*Label) Dispose Uses

func (s *Label) Dispose()

func (*Label) SetText Uses

func (l *Label) SetText(text string) error

func (*Label) SetTextAlignment Uses

func (l *Label) SetTextAlignment(alignment Alignment1D) error

func (*Label) SetTextColor Uses

func (s *Label) SetTextColor(c Color)

func (*Label) Text Uses

func (l *Label) Text() string

func (*Label) TextAlignment Uses

func (l *Label) TextAlignment() Alignment1D

func (*Label) TextColor Uses

func (s *Label) TextColor() Color

func (*Label) WndProc Uses

func (s *Label) WndProc(hwnd win.HWND, msg uint32, wp, lp uintptr) uintptr

type Layout Uses

type Layout interface {
    Container() Container
    SetContainer(value Container)
    Margins() Margins
    SetMargins(value Margins) error
    Spacing() int
    SetSpacing(value int) error
    CreateLayoutItem(ctx *LayoutContext) ContainerLayoutItem
    // contains filtered or unexported methods
}

type LayoutBase Uses

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

func (*LayoutBase) Alignment Uses

func (l *LayoutBase) Alignment() Alignment2D

func (*LayoutBase) Container Uses

func (l *LayoutBase) Container() Container

func (*LayoutBase) Margins Uses

func (l *LayoutBase) Margins() Margins

func (*LayoutBase) SetAlignment Uses

func (l *LayoutBase) SetAlignment(alignment Alignment2D) error

func (*LayoutBase) SetContainer Uses

func (l *LayoutBase) SetContainer(value Container)

func (*LayoutBase) SetMargins Uses

func (l *LayoutBase) SetMargins(value Margins) error

func (*LayoutBase) SetSpacing Uses

func (l *LayoutBase) SetSpacing(value int) error

func (*LayoutBase) Spacing Uses

func (l *LayoutBase) Spacing() int

type LayoutContext Uses

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

func (*LayoutContext) DPI Uses

func (ctx *LayoutContext) DPI() int

type LayoutFlags Uses

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 LayoutItem Uses

type LayoutItem interface {
    AsLayoutItemBase() *LayoutItemBase
    Context() *LayoutContext
    Handle() win.HWND
    Geometry() *Geometry
    Parent() ContainerLayoutItem
    Visible() bool
    LayoutFlags() LayoutFlags
}

func NewGreedyLayoutItem Uses

func NewGreedyLayoutItem() LayoutItem

type LayoutItemBase Uses

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

func (*LayoutItemBase) AsLayoutItemBase Uses

func (lib *LayoutItemBase) AsLayoutItemBase() *LayoutItemBase

func (*LayoutItemBase) Context Uses

func (lib *LayoutItemBase) Context() *LayoutContext

func (*LayoutItemBase) Geometry Uses

func (lib *LayoutItemBase) Geometry() *Geometry

func (*LayoutItemBase) Handle Uses

func (lib *LayoutItemBase) Handle() win.HWND

func (*LayoutItemBase) Parent Uses

func (lib *LayoutItemBase) Parent() ContainerLayoutItem

func (*LayoutItemBase) Visible Uses

func (lib *LayoutItemBase) Visible() bool

type LayoutResult Uses

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

type LayoutResultItem Uses

type LayoutResultItem struct {
    Item   LayoutItem
    Bounds Rectangle // in native pixels
}

type LineEdit Uses

type LineEdit struct {
    WidgetBase
    // contains filtered or unexported fields
}

func NewLineEdit Uses

func NewLineEdit(parent Container) (*LineEdit, error)

func (*LineEdit) CaseMode Uses

func (le *LineEdit) CaseMode() CaseMode

func (*LineEdit) CreateLayoutItem Uses

func (le *LineEdit) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*LineEdit) CueBanner Uses

func (le *LineEdit) CueBanner() string

func (*LineEdit) EditingFinished Uses

func (le *LineEdit) EditingFinished() *Event

func (*LineEdit) MaxLength Uses

func (le *LineEdit) MaxLength() int

func (*LineEdit) NeedsWmSize Uses

func (*LineEdit) NeedsWmSize() bool

func (*LineEdit) PasswordMode Uses

func (le *LineEdit) PasswordMode() bool

func (*LineEdit) ReadOnly Uses

func (le *LineEdit) ReadOnly() bool

func (*LineEdit) SetCaseMode Uses

func (le *LineEdit) SetCaseMode(mode CaseMode) error

func (*LineEdit) SetCueBanner Uses

func (le *LineEdit) SetCueBanner(value string) error

func (*LineEdit) SetMaxLength Uses

func (le *LineEdit) SetMaxLength(value int)

func (*LineEdit) SetPasswordMode Uses

func (le *LineEdit) SetPasswordMode(value bool)

func (*LineEdit) SetReadOnly Uses

func (le *LineEdit) SetReadOnly(readOnly bool) error

func (*LineEdit) SetText Uses

func (le *LineEdit) SetText(value string) error

func (*LineEdit) SetTextAlignment Uses

func (le *LineEdit) SetTextAlignment(alignment Alignment1D) error

func (*LineEdit) SetTextColor Uses

func (le *LineEdit) SetTextColor(c Color)

func (*LineEdit) SetTextSelection Uses

func (le *LineEdit) SetTextSelection(start, end int)

func (*LineEdit) Text Uses

func (le *LineEdit) Text() string

func (*LineEdit) TextAlignment Uses

func (le *LineEdit) TextAlignment() Alignment1D

func (*LineEdit) TextChanged Uses

func (le *LineEdit) TextChanged() *Event

func (*LineEdit) TextColor Uses

func (le *LineEdit) TextColor() Color

func (*LineEdit) TextSelection Uses

func (le *LineEdit) TextSelection() (start, end int)

func (*LineEdit) WndProc Uses

func (le *LineEdit) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type LinkLabel Uses

type LinkLabel struct {
    WidgetBase
    // contains filtered or unexported fields
}

func NewLinkLabel Uses

func NewLinkLabel(parent Container) (*LinkLabel, error)

func (*LinkLabel) CreateLayoutItem Uses

func (ll *LinkLabel) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*LinkLabel) LinkActivated Uses

func (ll *LinkLabel) LinkActivated() *LinkLabelLinkEvent

func (*LinkLabel) SetText Uses

func (ll *LinkLabel) SetText(value string) error

func (*LinkLabel) Text Uses

func (ll *LinkLabel) Text() string

func (*LinkLabel) WndProc Uses

func (ll *LinkLabel) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr
type LinkLabelLink struct {
    // contains filtered or unexported fields
}

func (*LinkLabelLink) Enabled Uses

func (lll *LinkLabelLink) Enabled() (bool, error)

func (*LinkLabelLink) Focused Uses

func (lll *LinkLabelLink) Focused() (bool, error)

func (*LinkLabelLink) Id Uses

func (lll *LinkLabelLink) Id() string

func (*LinkLabelLink) Index Uses

func (lll *LinkLabelLink) Index() int

func (*LinkLabelLink) SetEnabled Uses

func (lll *LinkLabelLink) SetEnabled(enabled bool) error

func (*LinkLabelLink) SetFocused Uses

func (lll *LinkLabelLink) SetFocused(focused bool) error

func (*LinkLabelLink) SetVisited Uses

func (lll *LinkLabelLink) SetVisited(visited bool) error

func (*LinkLabelLink) URL Uses

func (lll *LinkLabelLink) URL() string

func (*LinkLabelLink) Visited Uses

func (lll *LinkLabelLink) Visited() (bool, error)

type LinkLabelLinkEvent Uses

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

func (*LinkLabelLinkEvent) Attach Uses

func (e *LinkLabelLinkEvent) Attach(handler LinkLabelLinkEventHandler) int

func (*LinkLabelLinkEvent) Detach Uses

func (e *LinkLabelLinkEvent) Detach(handle int)

type LinkLabelLinkEventHandler Uses

type LinkLabelLinkEventHandler func(link *LinkLabelLink)

type LinkLabelLinkEventPublisher Uses

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

func (*LinkLabelLinkEventPublisher) Event Uses

func (p *LinkLabelLinkEventPublisher) Event() *LinkLabelLinkEvent

func (*LinkLabelLinkEventPublisher) Publish Uses

func (p *LinkLabelLinkEventPublisher) Publish(link *LinkLabelLink)

type ListBox Uses

type ListBox struct {
    WidgetBase
    // contains filtered or unexported fields
}

func NewListBox Uses

func NewListBox(parent Container) (*ListBox, error)

func NewListBoxWithStyle Uses

func NewListBoxWithStyle(parent Container, style uint32) (*ListBox, error)

func (*ListBox) ApplyDPI Uses

func (lb *ListBox) ApplyDPI(dpi int)

func (*ListBox) ApplySysColors Uses

func (lb *ListBox) ApplySysColors()

func (*ListBox) CreateLayoutItem Uses

func (lb *ListBox) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*ListBox) CurrentIndex Uses

func (lb *ListBox) CurrentIndex() int

func (*ListBox) CurrentIndexChanged Uses

func (lb *ListBox) CurrentIndexChanged() *Event

func (*ListBox) DataMember Uses

func (lb *ListBox) DataMember() string

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) EnsureItemVisible Uses

func (lb *ListBox) EnsureItemVisible(index int)

func (*ListBox) Format Uses

func (lb *ListBox) Format() string

func (*ListBox) ItemActivated Uses

func (lb *ListBox) ItemActivated() *Event

func (*ListBox) ItemStyler Uses

func (lb *ListBox) ItemStyler() ListItemStyler

func (*ListBox) ItemVisible Uses

func (lb *ListBox) ItemVisible(index int) bool

func (*ListBox) LayoutFlags Uses

func (*ListBox) LayoutFlags() LayoutFlags

func (*ListBox) Model Uses

func (lb *ListBox) Model() interface{}

Model returns the model of the ListBox.

func (*ListBox) Precision Uses

func (lb *ListBox) Precision() int

func (*ListBox) SelectedIndexes Uses

func (lb *ListBox) SelectedIndexes() []int

func (*ListBox) SelectedIndexesChanged Uses

func (lb *ListBox) SelectedIndexesChanged() *Event

func (*ListBox) SetCurrentIndex Uses

func (lb *ListBox) SetCurrentIndex(value int) error

func (*ListBox) SetDataMember Uses

func (lb *ListBox) SetDataMember(dataMember string) error

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) SetFormat Uses

func (lb *ListBox) SetFormat(value string)

func (*ListBox) SetItemStyler Uses

func (lb *ListBox) SetItemStyler(styler ListItemStyler)

func (*ListBox) SetModel Uses

func (lb *ListBox) SetModel(mdl interface{}) error

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 Uses

func (lb *ListBox) SetPrecision(value int)

func (*ListBox) SetSelectedIndexes Uses

func (lb *ListBox) SetSelectedIndexes(indexes []int)

func (*ListBox) WndProc Uses

func (lb *ListBox) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type ListItemStyle Uses

type ListItemStyle struct {
    BackgroundColor Color
    TextColor       Color
    LineColor       Color
    Font            *Font
    // contains filtered or unexported fields
}

ListItemStyle carries information about the display style of an item in a list widget like ListBox.

func (*ListItemStyle) Bounds Uses

func (lis *ListItemStyle) Bounds() Rectangle

func (*ListItemStyle) BoundsPixels Uses

func (lis *ListItemStyle) BoundsPixels() Rectangle

func (*ListItemStyle) Canvas Uses

func (lis *ListItemStyle) Canvas() *Canvas

func (*ListItemStyle) DrawBackground Uses

func (lis *ListItemStyle) DrawBackground() error

func (*ListItemStyle) DrawText Uses

func (lis *ListItemStyle) DrawText(text string, bounds Rectangle, format DrawTextFormat) error

DrawText draws text inside given bounds specified in native pixels.

func (*ListItemStyle) Index Uses

func (lis *ListItemStyle) Index() int

type ListItemStyler Uses

type ListItemStyler interface {
    // ItemHeightDependsOnWidth returns whether item height depends on width.
    ItemHeightDependsOnWidth() bool

    // DefaultItemHeight returns the initial height in native pixels for any item.
    DefaultItemHeight() int

    // ItemHeight is called for each item to retrieve the height of the item. width parameter and
    // return value are specified in native pixels.
    ItemHeight(index int, width int) int

    // StyleItem is called for each item to pick up item style information.
    StyleItem(style *ListItemStyle)
}

ListItemStyler is the interface that must be implemented to provide a list widget like ListBox with item display style information.

type ListModel Uses

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

    // ItemsInserted returns the event that the model should publish when a
    // contiguous range of items was inserted.
    ItemsInserted() *IntRangeEvent

    // ItemsRemoved returns the event that the model should publish when a
    // contiguous range of items was removed.
    ItemsRemoved() *IntRangeEvent
}

ListModel is the interface that a model must implement to support widgets like ComboBox.

type ListModelBase Uses

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

ListModelBase implements the ItemsReset and ItemChanged methods of the ListModel interface.

func (*ListModelBase) ItemChanged Uses

func (lmb *ListModelBase) ItemChanged() *IntEvent

func (*ListModelBase) ItemsInserted Uses

func (lmb *ListModelBase) ItemsInserted() *IntRangeEvent

func (*ListModelBase) ItemsRemoved Uses

func (lmb *ListModelBase) ItemsRemoved() *IntRangeEvent

func (*ListModelBase) ItemsReset Uses

func (lmb *ListModelBase) ItemsReset() *Event

func (*ListModelBase) PublishItemChanged Uses

func (lmb *ListModelBase) PublishItemChanged(index int)

func (*ListModelBase) PublishItemsInserted Uses

func (lmb *ListModelBase) PublishItemsInserted(from, to int)

func (*ListModelBase) PublishItemsRemoved Uses

func (lmb *ListModelBase) PublishItemsRemoved(from, to int)

func (*ListModelBase) PublishItemsReset Uses

func (lmb *ListModelBase) PublishItemsReset()

type MainWindow Uses

type MainWindow struct {
    FormBase
    // contains filtered or unexported fields
}

func NewMainWindow Uses

func NewMainWindow() (*MainWindow, error)

func NewMainWindowWithName Uses

func NewMainWindowWithName(name string) (*MainWindow, error)

func (*MainWindow) ClientBoundsPixels Uses

func (mw *MainWindow) ClientBoundsPixels() Rectangle

func (*MainWindow) Fullscreen Uses

func (mw *MainWindow) Fullscreen() bool

func (*MainWindow) Menu Uses

func (mw *MainWindow) Menu() *Menu

func (*MainWindow) SetFullscreen Uses

func (mw *MainWindow) SetFullscreen(fullscreen bool) error

func (*MainWindow) SetToolBar Uses

func (mw *MainWindow) SetToolBar(tb *ToolBar)

func (*MainWindow) SetVisible Uses

func (mw *MainWindow) SetVisible(visible bool)

func (*MainWindow) StatusBar Uses

func (mw *MainWindow) StatusBar() *StatusBar

func (*MainWindow) ToolBar Uses

func (mw *MainWindow) ToolBar() *ToolBar

func (*MainWindow) WndProc Uses

func (mw *MainWindow) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type Margins Uses

type Margins struct {
    HNear, VNear, HFar, VFar int
}

Margins define margins in 1/96" units or native pixels.

func MarginsFrom96DPI Uses

func MarginsFrom96DPI(value Margins, dpi int) Margins

MarginsFrom96DPI converts from 1/96" units to native pixels.

func MarginsTo96DPI Uses

func MarginsTo96DPI(value Margins, dpi int) Margins

MarginsTo96DPI converts from native pixels to 1/96" units.

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

func NewMenu Uses

func NewMenu() (*Menu, error)
func (m *Menu) Actions() *ActionList
func (m *Menu) Dispose()
func (m *Menu) IsDisposed() bool

type Metafile Uses

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

func NewMetafile Uses

func NewMetafile(referenceCanvas *Canvas) (*Metafile, error)

func NewMetafileFromFile Uses

func NewMetafileFromFile(filePath string) (*Metafile, error)

func (*Metafile) Dispose Uses

func (mf *Metafile) Dispose()

func (*Metafile) Save Uses

func (mf *Metafile) Save(filePath string) error

func (*Metafile) Size Uses

func (mf *Metafile) Size() Size

Size returns image size in 1/96" units.

type MinSizeForSizer Uses

type MinSizeForSizer interface {
    // MinSize returns minimum window size for given size. Both sizes are in native pixels.
    MinSizeForSize(size Size) Size
}

type MinSizer Uses

type MinSizer interface {
    // MinSize returns minimum window size in native pixels.
    MinSize() Size
}

type Modifiers Uses

type Modifiers byte
const (
    ModShift Modifiers = 1 << iota
    ModControl
    ModAlt
)

func ModifiersDown Uses

func ModifiersDown() Modifiers

func (Modifiers) String Uses

func (m Modifiers) String() string

type MouseButton Uses

type MouseButton int
const (
    LeftButton   MouseButton = win.MK_LBUTTON
    RightButton  MouseButton = win.MK_RBUTTON
    MiddleButton MouseButton = win.MK_MBUTTON
)

type MouseEvent Uses

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

func (*MouseEvent) Attach Uses

func (e *MouseEvent) Attach(handler MouseEventHandler) int

func (*MouseEvent) Detach Uses

func (e *MouseEvent) Detach(handle int)

func (*MouseEvent) Once Uses

func (e *MouseEvent) Once(handler MouseEventHandler)

type MouseEventHandler Uses

type MouseEventHandler func(x, y int, button MouseButton)

MouseEventHandler is called for mouse events. x and y are measured in native pixels.

type MouseEventPublisher Uses

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

func (*MouseEventPublisher) Event Uses

func (p *MouseEventPublisher) Event() *MouseEvent

func (*MouseEventPublisher) Publish Uses

func (p *MouseEventPublisher) Publish(x, y int, button MouseButton)

Publish publishes mouse event. x and y are measured in native pixels.

type MsgBoxStyle Uses

type MsgBoxStyle uint
const (
    MsgBoxOK                  MsgBoxStyle = win.MB_OK
    MsgBoxOKCancel            MsgBoxStyle = win.MB_OKCANCEL
    MsgBoxAbortRetryIgnore    MsgBoxStyle = win.MB_ABORTRETRYIGNORE
    MsgBoxYesNoCancel         MsgBoxStyle = win.MB_YESNOCANCEL
    MsgBoxYesNo               MsgBoxStyle = win.MB_YESNO
    MsgBoxRetryCancel         MsgBoxStyle = win.MB_RETRYCANCEL
    MsgBoxCancelTryContinue   MsgBoxStyle = win.MB_CANCELTRYCONTINUE
    MsgBoxIconHand            MsgBoxStyle = win.MB_ICONHAND
    MsgBoxIconQuestion        MsgBoxStyle = win.MB_ICONQUESTION
    MsgBoxIconExclamation     MsgBoxStyle = win.MB_ICONEXCLAMATION
    MsgBoxIconAsterisk        MsgBoxStyle = win.MB_ICONASTERISK
    MsgBoxUserIcon            MsgBoxStyle = win.MB_USERICON
    MsgBoxIconWarning         MsgBoxStyle = win.MB_ICONWARNING
    MsgBoxIconError           MsgBoxStyle = win.MB_ICONERROR
    MsgBoxIconInformation     MsgBoxStyle = win.MB_ICONINFORMATION
    MsgBoxIconStop            MsgBoxStyle = win.MB_ICONSTOP
    MsgBoxDefButton1          MsgBoxStyle = win.MB_DEFBUTTON1
    MsgBoxDefButton2          MsgBoxStyle = win.MB_DEFBUTTON2
    MsgBoxDefButton3          MsgBoxStyle = win.MB_DEFBUTTON3
    MsgBoxDefButton4          MsgBoxStyle = win.MB_DEFBUTTON4
    MsgBoxApplModal           MsgBoxStyle = win.MB_APPLMODAL
    MsgBoxSystemModal         MsgBoxStyle = win.MB_SYSTEMMODAL
    MsgBoxTaskModal           MsgBoxStyle = win.MB_TASKMODAL
    MsgBoxHelp                MsgBoxStyle = win.MB_HELP
    MsgBoxSetForeground       MsgBoxStyle = win.MB_SETFOREGROUND
    MsgBoxDefaultDesktopOnly  MsgBoxStyle = win.MB_DEFAULT_DESKTOP_ONLY
    MsgBoxTopMost             MsgBoxStyle = win.MB_TOPMOST
    MsgBoxRight               MsgBoxStyle = win.MB_RIGHT
    MsgBoxRTLReading          MsgBoxStyle = win.MB_RTLREADING
    MsgBoxServiceNotification MsgBoxStyle = win.MB_SERVICE_NOTIFICATION
)

type MutableCondition Uses

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

func NewMutableCondition Uses

func NewMutableCondition() *MutableCondition

func (*MutableCondition) Changed Uses

func (mc *MutableCondition) Changed() *Event

func (*MutableCondition) Satisfied Uses

func (mc *MutableCondition) Satisfied() bool

func (*MutableCondition) SetSatisfied Uses

func (mc *MutableCondition) SetSatisfied(satisfied bool) error

func (*MutableCondition) Value Uses

func (mc *MutableCondition) Value() interface{}

type NotifyIcon Uses

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

NotifyIcon represents an icon in the taskbar notification area.

func NewNotifyIcon Uses

func NewNotifyIcon(form Form) (*NotifyIcon, error)

NewNotifyIcon creates and returns a new NotifyIcon.

The NotifyIcon is initially not visible.

func (*NotifyIcon) ContextMenu Uses

func (ni *NotifyIcon) ContextMenu() *Menu

ContextMenu returns the context menu of the NotifyIcon.

func (*NotifyIcon) DPI Uses

func (ni *NotifyIcon) DPI() int

func (*NotifyIcon) Dispose Uses

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 Uses

func (ni *NotifyIcon) Icon() Image

Icon returns the Icon of the NotifyIcon.

func (*NotifyIcon) MessageClicked Uses

func (ni *NotifyIcon) MessageClicked() *Event

MessageClicked occurs when the user clicks a message shown with ShowMessage or one of its iconed variants.

func (*NotifyIcon) MouseDown Uses

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 Uses

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 Uses

func (ni *NotifyIcon) SetIcon(icon Image) error

SetIcon sets the Icon of the NotifyIcon.

func (*NotifyIcon) SetToolTip Uses

func (ni *NotifyIcon) SetToolTip(toolTip string) error

SetToolTip sets the tool tip text of the NotifyIcon.

func (*NotifyIcon) SetVisible Uses

func (ni *NotifyIcon) SetVisible(visible bool) error

SetVisible sets if the NotifyIcon is visible.

func (*NotifyIcon) ShowCustom Uses

func (ni *NotifyIcon) ShowCustom(title, info string, icon Image) error

ShowCustom displays a custom icon message balloon above the NotifyIcon. If icon is nil, the main notification icon is used instead of a custom one.

The NotifyIcon must be visible before calling this method.

func (*NotifyIcon) ShowError Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (ni *NotifyIcon) ToolTip() string

ToolTip returns the tool tip text of the NotifyIcon.

func (*NotifyIcon) Visible Uses

func (ni *NotifyIcon) Visible() bool

Visible returns if the NotifyIcon is visible.

type NumberEdit Uses

type NumberEdit struct {
    WidgetBase
    // contains filtered or unexported fields
}

NumberEdit is a widget that is suited to edit numeric values.

func NewNumberEdit Uses

func NewNumberEdit(parent Container) (*NumberEdit, error)

NewNumberEdit returns a new NumberEdit widget as child of parent.

func (*NumberEdit) Background Uses

func (ne *NumberEdit) Background() Brush

Background returns the background Brush of the NumberEdit.

By default this is nil.

func (*NumberEdit) CreateLayoutItem Uses

func (ne *NumberEdit) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*NumberEdit) Decimals Uses

func (ne *NumberEdit) Decimals() int

Decimals returns the number of decimal places in the NumberEdit.

func (*NumberEdit) Increment Uses

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) MaxValue Uses

func (ne *NumberEdit) MaxValue() float64

MinValue returns the maximum value the NumberEdit will accept.

func (*NumberEdit) MinValue Uses

func (ne *NumberEdit) MinValue() float64

MinValue returns the minimum value the NumberEdit will accept.

func (*NumberEdit) NeedsWmSize Uses

func (*NumberEdit) NeedsWmSize() bool

func (*NumberEdit) Prefix Uses

func (ne *NumberEdit) Prefix() string

Prefix returns the text that appears in the NumberEdit before the number.

func (*NumberEdit) PrefixChanged Uses

func (ne *NumberEdit) PrefixChanged() *Event

PrefixChanged returns the event that is published when the prefix changed.

func (*NumberEdit) ReadOnly Uses

func (ne *NumberEdit) ReadOnly() bool

ReadOnly returns whether the NumberEdit is in read-only mode.

func (*NumberEdit) SetBackground Uses

func (ne *NumberEdit) SetBackground(bg Brush)

SetBackground sets the background Brush of the NumberEdit.

func (*NumberEdit) SetDecimals Uses

func (ne *NumberEdit) SetDecimals(decimals int) error

SetDecimals sets the number of decimal places in the NumberEdit.

func (*NumberEdit) SetFocus Uses

func (ne *NumberEdit) SetFocus() error

SetFocus sets the keyboard input focus to the NumberEdit.

func (*NumberEdit) SetIncrement Uses

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 Uses

func (ne *NumberEdit) SetPrefix(prefix string) error

SetPrefix sets the text that appears in the NumberEdit before the number.

func (*NumberEdit) SetRange Uses

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) SetReadOnly Uses

func (ne *NumberEdit) SetReadOnly(readOnly bool) error

SetReadOnly sets whether the NumberEdit is in read-only mode.

func (*NumberEdit) SetSuffix Uses

func (ne *NumberEdit) SetSuffix(suffix string) error

SetSuffix sets the text that appears in the NumberEdit after the number.

func (*NumberEdit) SetTextColor Uses

func (ne *NumberEdit) SetTextColor(c Color)

TextColor sets the Color used to draw the text of the NumberEdit.

func (*NumberEdit) SetTextSelection Uses

func (ne *NumberEdit) SetTextSelection(start, end int)

SetTextSelection sets the range of the current text selection of the NumberEdit.

func (*NumberEdit) SetToolTipText Uses

func (ne *NumberEdit) SetToolTipText(s string) error

func (*NumberEdit) SetValue Uses

func (ne *NumberEdit) SetValue(value float64) error

SetValue sets the value of the NumberEdit.

func (*NumberEdit) Suffix Uses

func (ne *NumberEdit) Suffix() string

Suffix returns the text that appears in the NumberEdit after the number.

func (*NumberEdit) SuffixChanged Uses

func (ne *NumberEdit) SuffixChanged() *Event

SuffixChanged returns the event that is published when the suffix changed.

func (*NumberEdit) TextColor Uses

func (ne *NumberEdit) TextColor() Color

TextColor returns the Color used to draw the text of the NumberEdit.

func (*NumberEdit) TextSelection Uses

func (ne *NumberEdit) TextSelection() (start, end int)

TextSelection returns the range of the current text selection of the NumberEdit.

func (*NumberEdit) Value Uses

func (ne *NumberEdit) Value() float64

Value returns the value of the NumberEdit.

func (*NumberEdit) ValueChanged Uses

func (ne *NumberEdit) ValueChanged() *Event

ValueChanged returns an Event that can be used to track changes to Value.

func (*NumberEdit) WndProc Uses

func (ne *NumberEdit) WndProc(hwnd win.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 NumberLabel Uses

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

func NewNumberLabel Uses

func NewNumberLabel(parent Container) (*NumberLabel, error)

func (*NumberLabel) CreateLayoutItem Uses

func (s *NumberLabel) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*NumberLabel) Decimals Uses

func (nl *NumberLabel) Decimals() int

func (*NumberLabel) Dispose Uses

func (s *NumberLabel) Dispose()

func (*NumberLabel) SetDecimals Uses

func (nl *NumberLabel) SetDecimals(decimals int) error

func (*NumberLabel) SetSuffix Uses

func (nl *NumberLabel) SetSuffix(suffix string) error

func (*NumberLabel) SetTextAlignment Uses

func (nl *NumberLabel) SetTextAlignment(alignment Alignment1D) error

func (*NumberLabel) SetTextColor Uses

func (s *NumberLabel) SetTextColor(c Color)

func (*NumberLabel) SetValue Uses

func (nl *NumberLabel) SetValue(value float64) error

func (*NumberLabel) Suffix Uses

func (nl *NumberLabel) Suffix() string

func (*NumberLabel) TextAlignment Uses

func (nl *NumberLabel) TextAlignment() Alignment1D

func (*NumberLabel) TextColor Uses

func (s *NumberLabel) TextColor() Color

func (*NumberLabel) Value Uses

func (nl *NumberLabel) Value() float64

func (*NumberLabel) WndProc Uses

func (s *NumberLabel) WndProc(hwnd win.HWND, msg uint32, wp, lp uintptr) uintptr

type Orientation Uses

type Orientation byte

type PIState Uses

type PIState int
const (
    PINoProgress    PIState = win.TBPF_NOPROGRESS
    PIIndeterminate PIState = win.TBPF_INDETERMINATE
    PINormal        PIState = win.TBPF_NORMAL
    PIError         PIState = win.TBPF_ERROR
    PIPaused        PIState = win.TBPF_PAUSED
)

type PaintFunc Uses

type PaintFunc func(canvas *Canvas, updateBounds Rectangle) error

PaintFunc paints custom widget content. updateBounds is specified in 1/96" or native pixels.

type PaintFuncImage Uses

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

func NewPaintFuncImage Uses

func NewPaintFuncImage(size Size, paint func(canvas *Canvas, bounds Rectangle) error) *PaintFuncImage

NewPaintFuncImage creates new PaintFuncImage struct. size parameter and paint function bounds parameter are specified in 1/96" units.

func NewPaintFuncImagePixels Uses

func NewPaintFuncImagePixels(size Size, paint func(canvas *Canvas, bounds Rectangle) error) *PaintFuncImage

NewPaintFuncImagePixels creates new PaintFuncImage struct. size parameter is specified in 1/96" units. paint function bounds parameter is specified in native pixels.

func NewPaintFuncImagePixelsWithDispose Uses

func NewPaintFuncImagePixelsWithDispose(size Size, paint func(canvas *Canvas, bounds Rectangle) error, dispose func()) *PaintFuncImage

NewPaintFuncImagePixelsWithDispose creates new PaintFuncImage struct. size parameter is specified in 1/96" units. paint function bounds parameter is specified in native pixels.

func NewPaintFuncImageWithDispose Uses

func NewPaintFuncImageWithDispose(size Size, paint func(canvas *Canvas, bounds Rectangle) error, dispose func()) *PaintFuncImage

NewPaintFuncImageWithDispose creates new PaintFuncImage struct. size parameter and paint function bounds parameter are specified in 1/96" units.

func (*PaintFuncImage) Dispose Uses

func (pfi *PaintFuncImage) Dispose()

func (*PaintFuncImage) Size Uses

func (pfi *PaintFuncImage) Size() Size

Size returns image size in 1/96" units.

type PaintMode Uses

type PaintMode int
const (
    PaintNormal   PaintMode = iota // erase background before PaintFunc
    PaintNoErase                   // PaintFunc clears background, single buffered
    PaintBuffered                  // PaintFunc clears background, double buffered
)

type Pen Uses

type Pen interface {
    Dispose()
    Style() PenStyle

    // Width returns pen width in 1/96" units.
    Width() int
    // contains filtered or unexported methods
}

func NullPen Uses

func NullPen() Pen

type PenStyle Uses

type PenStyle int
const (
    PenSolid       PenStyle = win.PS_SOLID
    PenDash        PenStyle = win.PS_DASH
    PenDot         PenStyle = win.PS_DOT
    PenDashDot     PenStyle = win.PS_DASHDOT
    PenDashDotDot  PenStyle = win.PS_DASHDOTDOT
    PenNull        PenStyle = win.PS_NULL
    PenInsideFrame PenStyle = win.PS_INSIDEFRAME
    PenUserStyle   PenStyle = win.PS_USERSTYLE
    PenAlternate   PenStyle = win.PS_ALTERNATE
)

Pen styles

const (
    PenCapRound  PenStyle = win.PS_ENDCAP_ROUND
    PenCapSquare PenStyle = win.PS_ENDCAP_SQUARE
    PenCapFlat   PenStyle = win.PS_ENDCAP_FLAT
)

Pen cap styles (geometric pens only)

const (
    PenJoinBevel PenStyle = win.PS_JOIN_BEVEL
    PenJoinMiter PenStyle = win.PS_JOIN_MITER
    PenJoinRound PenStyle = win.PS_JOIN_ROUND
)

Pen join styles (geometric pens only)

type Persistable Uses

type Persistable interface {
    Persistent() bool
    SetPersistent(value bool)
    SaveState() error
    RestoreState() error
}

type Point Uses

type Point struct {
    X, Y int
}

Point defines 2D coordinate in 1/96" units ot native pixels.

func PointFrom96DPI Uses

func PointFrom96DPI(value Point, dpi int) Point

PointFrom96DPI converts from 1/96" units to native pixels.

func PointTo96DPI Uses

func PointTo96DPI(value Point, dpi int) Point

PointTo96DPI converts from native pixels to 1/96" units.

type Populator Uses

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 Uses

type ProgressBar struct {
    WidgetBase
}

func NewProgressBar Uses

func NewProgressBar(parent Container) (*ProgressBar, error)

func (*ProgressBar) CreateLayoutItem Uses

func (pb *ProgressBar) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*ProgressBar) MarqueeMode Uses

func (pb *ProgressBar) MarqueeMode() bool

func (*ProgressBar) MaxValue Uses

func (pb *ProgressBar) MaxValue() int

func (*ProgressBar) MinValue Uses

func (pb *ProgressBar) MinValue() int

func (*ProgressBar) SetMarqueeMode Uses

func (pb *ProgressBar) SetMarqueeMode(marqueeMode bool) error

func (*ProgressBar) SetRange Uses

func (pb *ProgressBar) SetRange(min, max int)

func (*ProgressBar) SetValue Uses

func (pb *ProgressBar) SetValue(value int)

func (*ProgressBar) Value Uses

func (pb *ProgressBar) Value() int

type ProgressIndicator Uses

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

func (*ProgressIndicator) Completed Uses

func (pi *ProgressIndicator) Completed() uint32

func (*ProgressIndicator) SetCompleted Uses

func (pi *ProgressIndicator) SetCompleted(completed uint32) error

func (*ProgressIndicator) SetOverlayIcon Uses

func (pi *ProgressIndicator) SetOverlayIcon(icon *Icon, description string) error

func (*ProgressIndicator) SetState Uses

func (pi *ProgressIndicator) SetState(state PIState) error

func (*ProgressIndicator) SetTotal Uses

func (pi *ProgressIndicator) SetTotal(total uint32)

func (*ProgressIndicator) State Uses

func (pi *ProgressIndicator) State() PIState

func (*ProgressIndicator) Total Uses

func (pi *ProgressIndicator) Total() uint32

type Property Uses

type Property interface {
    Expression
    ReadOnly() bool
    Get() interface{}
    Set(value interface{}) error
    Source() interface{}
    SetSource(source interface{}) error
    Validatable() bool
    Validator() Validator
    SetValidator(validator Validator) error
}

func NewBoolProperty Uses

func NewBoolProperty(get func() bool, set func(b bool) error, changed *Event) Property

func NewProperty Uses

func NewProperty(get func() interface{}, set func(v interface{}) error, changed *Event) Property

func NewReadOnlyBoolProperty Uses

func NewReadOnlyBoolProperty(get func() bool, changed *Event) Property

func NewReadOnlyProperty Uses

func NewReadOnlyProperty(get func() interface{}, changed *Event) Property

type PushButton Uses

type PushButton struct {
    Button
}

func NewPushButton Uses

func NewPushButton(parent Container) (*PushButton, error)

func (*PushButton) CreateLayoutItem Uses

func (pb *PushButton) CreateLayoutItem(ctx *LayoutContext) LayoutItem

func (*PushButton) ImageAboveText Uses

func (pb *PushButton) ImageAboveText() bool

func (*PushButton) SetImageAboveText Uses

func (pb *PushButton) SetImageAboveText(value bool) error

func (*PushButton) WndProc Uses

func (pb *PushButton) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type RadioButton Uses

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

func NewRadioButton Uses

func NewRadioButton(parent Container) (*RadioButton, error)

func (*RadioButton) Group Uses

func (rb *RadioButton) Group() *RadioButtonGroup

func (*RadioButton) SetTextOnLeftSide Uses

func (rb *RadioButton) SetTextOnLeftSide(textLeft bool) error

func (*RadioButton) SetValue Uses

func (rb *RadioButton) SetValue(value interface{})

func (*RadioButton) TextOnLeftSide Uses

func (rb *RadioButton) TextOnLeftSide() bool

func (*RadioButton) Value Uses

func (rb *RadioButton) Value() interface{}

func (*RadioButton) WndProc Uses

func (rb *RadioButton) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

type RadioButtonGroup Uses

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

func (*RadioButtonGroup) Buttons Uses

func (rbg *RadioButtonGroup) Buttons() []*RadioButton

func (*RadioButtonGroup) CheckedButton Uses

func (rbg *RadioButtonGroup) CheckedButton() *RadioButton

type RangeValidator Uses

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

func NewRangeValidator Uses

func NewRangeValidator(min, max float64) (*RangeValidator, error)

func (*RangeValidator) Max Uses

func (rv *RangeValidator) Max() float64

func (*RangeValidator) Min Uses

func (rv *RangeValidator) Min() float64

func (*RangeValidator) Reset Uses

func (rv *RangeValidator) Reset(min, max float64) error

func (*RangeValidator) Validate Uses

func (rv *RangeValidator) Validate(v interface{}) error

type Rectangle Uses

type Rectangle struct {
    X, Y, Width, Height int
}

Rectangle defines upper left corner with width and height region in 1/96" units, or native pixels, or grid rows and columns.

func RectangleFrom96DPI Uses

func RectangleFrom96DPI(value Rectangle, dpi int) Rectangle

RectangleFrom96DPI converts from 1/96" units to native pixels.

func RectangleTo96DPI Uses

func RectangleTo96DPI(value Rectangle, dpi int) Rectangle

RectangleTo96DPI converts from native pixels to 1/96" units.

func (Rectangle) Bottom Uses

func (r Rectangle) Bottom() int

func (Rectangle) Left Uses

func (r Rectangle) Left() int

func (Rectangle) Location Uses

func (r Rectangle) Location() Point

func (Rectangle) Right Uses

func (r Rectangle) Right() int

func (*Rectangle) SetLocation Uses

func (r *Rectangle) SetLocation(p Point) Rectangle

func (*Rectangle) SetSize Uses

func (r *Rectangle) SetSize(s Size) Rectangle

func (Rectangle) Size Uses

func (r Rectangle) Size() Size

func (Rectangle) Top Uses

func (r Rectangle) Top() int

type ReflectListModel