Versions in this module Expand all Collapse all v1 v1.3.1 Jun 14, 2020 Changes in this version + const SettingsScaleAuto + func IsHorizontal(orient DeviceOrientation) bool + func IsVertical(orient DeviceOrientation) bool type App + Preferences func() Preferences + SendNotification func(*Notification) + UniqueID func() string type Canvas + Capture func() image.Image + Overlay func() CanvasObject + Overlays func() OverlayStack + PixelCoordinateForPosition func(Position) (int, int) + SetOverlay func(CanvasObject) + Unfocus func() type CanvasObject + Refresh func() type Container + func (c *Container) Refresh() + type Device interface + HasKeyboard func() bool + IsMobile func() bool + Orientation func() DeviceOrientation + SystemScale func() float32 + SystemScaleForWindow func(Window) float32 + func CurrentDevice() Device + type DeviceOrientation int + const OrientationHorizontalLeft + const OrientationHorizontalRight + const OrientationVertical + const OrientationVerticalUpsideDown + type Disableable interface + Disable func() + Disabled func() bool + Enable func() + type DoubleTappable interface + DoubleTapped func(*PointEvent) + type DragEvent struct + DraggedX int + DraggedY int + type Draggable interface + DragEnd func() + Dragged func(*DragEvent) type Driver + AbsolutePositionForObject func(CanvasObject) Position + Device func() Device + FileReaderForURI func(URI) (URIReadCloser, error) + FileWriterForURI func(URI) (URIWriteCloser, error) type KeyName + const KeyApostrophe + const KeyBackTick + const KeyBackslash + const KeyComma + const KeyEqual + const KeyLeftBracket + const KeyMinus + const KeyPeriod + const KeyRightBracket + const KeySemicolon + const KeySlash + const KeySpace + type MainMenu struct + Items []*Menu + func NewMainMenu(items ...*Menu) *MainMenu + type Menu struct + Items []*MenuItem + Label string + func NewMenu(label string, items ...*MenuItem) *Menu + type MenuItem struct + Action func() + ChildMenu *Menu + IsSeparator bool + Label string + func NewMenuItem(label string, action func()) *MenuItem + func NewMenuItemSeparator() *MenuItem + type Notification struct + Content string + Title string + func NewNotification(title, content string) *Notification + type OverlayStack interface + Add func(overlay CanvasObject) + List func() []CanvasObject + Remove func(overlay CanvasObject) + Top func() CanvasObject type PointEvent + AbsolutePosition Position type Position + func (p Position) IsZero() bool + type Preferences interface + Bool func(key string) bool + BoolWithFallback func(key string, fallback bool) bool + Float func(key string) float64 + FloatWithFallback func(key string, fallback float64) float64 + Int func(key string) int + IntWithFallback func(key string, fallback int) int + RemoveValue func(key string) + SetBool func(key string, value bool) + SetFloat func(key string, value float64) + SetInt func(key string, value int) + SetString func(key string, value string) + String func(key string) string + StringWithFallback func(key, fallback string) string type Resource + func LoadResourceFromPath(path string) (Resource, error) + func LoadResourceFromURLString(urlStr string) (Resource, error) + type SecondaryTappable interface + TappedSecondary func(*PointEvent) type Settings + Scale func() float32 + type ShortcutSelectAll struct + func (se *ShortcutSelectAll) ShortcutName() string type Size + func MeasureText(text string, size int, style TextStyle) Size + func (s Size) IsZero() bool + func (s Size) Max(s2 Size) Size + func (s Size) Min(s2 Size) Size + type TextWrap int + const TextTruncate + const TextWrapBreak + const TextWrapOff + const TextWrapWord type Theme + DisabledButtonColor func() color.Color + DisabledIconColor func() color.Color + DisabledTextColor func() color.Color + HoverColor func() color.Color + IconColor func() color.Color + ScrollBarSmallSize func() int + ShadowColor func() color.Color + type URI interface + Extension func() string + MimeType func() string + Scheme func() string + type URIReadCloser interface + Name func() string + URI func() URI + type URIWriteCloser interface + Name func() string + URI func() URI type Window + MainMenu func() *MainMenu + SetMainMenu func(*MainMenu) + SetMaster func() v1.0.0 Mar 19, 2019 Changes in this version + func LogError(reason string, err error) + func Max(x, y int) int + func Min(x, y int) int + func SetCurrentApp(current App) + type App interface + Driver func() Driver + Icon func() Resource + NewWindow func(title string) Window + OpenURL func(url *url.URL) error + Quit func() + Run func() + SetIcon func(Resource) + Settings func() Settings + func CurrentApp() App + type Canvas interface + AddShortcut func(shortcut Shortcut, handler func(shortcut Shortcut)) + Content func() CanvasObject + Focus func(Focusable) + Focused func() Focusable + OnTypedKey func() func(*KeyEvent) + OnTypedRune func() func(rune) + Refresh func(CanvasObject) + Scale func() float32 + SetContent func(CanvasObject) + SetOnTypedKey func(func(*KeyEvent)) + SetOnTypedRune func(func(rune)) + SetScale func(float32) + Size func() Size + type CanvasObject interface + Hide func() + MinSize func() Size + Move func(Position) + Position func() Position + Resize func(Size) + Show func() + Size func() Size + Visible func() bool + type Clipboard interface + Content func() string + SetContent func(content string) + type Container struct + Hidden bool + Layout Layout + Objects []CanvasObject + func NewContainer(objects ...CanvasObject) *Container + func NewContainerWithLayout(layout Layout, objects ...CanvasObject) *Container + func (c *Container) AddObject(o CanvasObject) + func (c *Container) Hide() + func (c *Container) MinSize() Size + func (c *Container) Move(pos Position) + func (c *Container) Position() Position + func (c *Container) Resize(size Size) + func (c *Container) Show() + func (c *Container) Size() Size + func (c *Container) Visible() bool + type Driver interface + AllWindows func() []Window + CanvasForObject func(CanvasObject) Canvas + CreateWindow func(string) Window + Quit func() + RenderedTextSize func(string, int, TextStyle) Size + Run func() + type Focusable interface + FocusGained func() + FocusLost func() + Focused func() bool + TypedKey func(*KeyEvent) + TypedRune func(rune) + type KeyEvent struct + Name KeyName + type KeyName string + const Key0 + const Key1 + const Key2 + const Key3 + const Key4 + const Key5 + const Key6 + const Key7 + const Key8 + const Key9 + const KeyA + const KeyB + const KeyBackspace + const KeyC + const KeyD + const KeyDelete + const KeyDown + const KeyE + const KeyEnd + const KeyEnter + const KeyEscape + const KeyF + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF2 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyG + const KeyH + const KeyHome + const KeyI + const KeyInsert + const KeyJ + const KeyK + const KeyL + const KeyLeft + const KeyM + const KeyN + const KeyO + const KeyP + const KeyPageDown + const KeyPageUp + const KeyQ + const KeyR + const KeyReturn + const KeyRight + const KeyS + const KeyT + const KeyTab + const KeyU + const KeyUp + const KeyV + const KeyW + const KeyX + const KeyY + const KeyZ + type Layout interface + Layout func([]CanvasObject, Size) + MinSize func(objects []CanvasObject) Size + type PointEvent struct + Position Position + type Position struct + X int + Y int + func NewPos(x int, y int) Position + func (p1 Position) Add(p2 Position) Position + func (p1 Position) Subtract(p2 Position) Position + type Resource interface + Content func() []byte + Name func() string + type ScrollEvent struct + DeltaX int + DeltaY int + type Scrollable interface + Scrolled func(*ScrollEvent) + type Settings interface + AddChangeListener func(chan Settings) + SetTheme func(Theme) + Theme func() Theme + type Shortcut interface + ShortcutName func() string + type ShortcutCopy struct + Clipboard Clipboard + func (se *ShortcutCopy) ShortcutName() string + type ShortcutCut struct + Clipboard Clipboard + func (se *ShortcutCut) ShortcutName() string + type ShortcutHandler struct + func (sh *ShortcutHandler) AddShortcut(shortcut Shortcut, handler func(shortcut Shortcut)) + func (sh *ShortcutHandler) TypedShortcut(shortcut Shortcut) bool + type ShortcutPaste struct + Clipboard Clipboard + func (se *ShortcutPaste) ShortcutName() string + type Shortcutable interface + TypedShortcut func(shortcut Shortcut) bool + type Size struct + Height int + Width int + func NewSize(w int, h int) Size + func (s1 Size) Add(s2 Size) Size + func (s1 Size) Subtract(s2 Size) Size + func (s1 Size) Union(s2 Size) Size + type StaticResource struct + StaticContent []byte + StaticName string + func NewStaticResource(name string, content []byte) *StaticResource + func (r *StaticResource) Content() []byte + func (r *StaticResource) GoString() string + func (r *StaticResource) Name() string + type Tappable interface + Tapped func(*PointEvent) + TappedSecondary func(*PointEvent) + type TextAlign int + const TextAlignCenter + const TextAlignLeading + const TextAlignTrailing + type TextStyle struct + Bold bool + Italic bool + Monospace bool + type Theme interface + BackgroundColor func() color.Color + ButtonColor func() color.Color + FocusColor func() color.Color + HyperlinkColor func() color.Color + IconInlineSize func() int + Padding func() int + PlaceHolderColor func() color.Color + PrimaryColor func() color.Color + ScrollBarColor func() color.Color + ScrollBarSize func() int + TextBoldFont func() Resource + TextBoldItalicFont func() Resource + TextColor func() color.Color + TextFont func() Resource + TextItalicFont func() Resource + TextMonospaceFont func() Resource + TextSize func() int + type Themeable interface + ApplyTheme func() + type Widget interface + CreateRenderer func() WidgetRenderer + type WidgetRenderer interface + ApplyTheme func() + BackgroundColor func() color.Color + Destroy func() + Layout func(Size) + MinSize func() Size + Objects func() []CanvasObject + Refresh func() + type Window interface + Canvas func() Canvas + CenterOnScreen func() + Clipboard func() Clipboard + Close func() + Content func() CanvasObject + FixedSize func() bool + FullScreen func() bool + Hide func() + Icon func() Resource + Padded func() bool + RequestFocus func() + Resize func(Size) + SetContent func(CanvasObject) + SetFixedSize func(bool) + SetFullScreen func(bool) + SetIcon func(Resource) + SetOnClosed func(func()) + SetPadded func(bool) + SetTitle func(string) + Show func() + ShowAndRun func() + Title func() string