Versions in this module Expand all Collapse all v0 v0.9.0 Oct 31, 2021 Changes in this version + type Control struct — js/wasm + func (w *Control) Close() + func (w *Control) Layout(bc base.Constraints) base.Size + func (w *Control) MinIntrinsicHeight(width base.Length) base.Length + func (w *Control) MinIntrinsicWidth(base.Length) base.Length + func (w *Control) SetBounds(bounds base.Rectangle) + func (w *Control) TakeFocus() bool type Insets + func (i *Insets) Dx() base.Length + func (i *Insets) Dy() base.Length type Window + func (w *Window) MinSize() base.Size + func (w *Window) OnDeleteEvent() bool v0.8.0 May 1, 2020 Changes in this version + const DIP + const Inch + const PC + const PT + const Scale — windows/amd64 + var ErrSetChildrenNotReentrant = errors.New("method SetChild is not reentrant") + type Align struct + Child base.Widget + HAlign Alignment + HeightFactor float64 + VAlign Alignment + WidthFactor float64 + func (*Align) Kind() *base.Kind + func (w *Align) Mount(parent base.Control) (base.Element, error) + type Alignment int16 + const AlignCenter + const AlignEnd + const AlignStart + type Button struct + Default bool + Disabled bool + OnBlur func() + OnClick func() + OnFocus func() + Text string + func (*Button) Kind() *base.Kind + func (w *Button) Mount(parent base.Control) (base.Element, error) + type Checkbox struct + Disabled bool + OnBlur func() + OnChange func(value bool) + OnFocus func() + Text string + Value bool + func (*Checkbox) Kind() *base.Kind + func (w *Checkbox) Mount(parent base.Control) (base.Element, error) + type Control struct — linux/amd64, windows/amd64 + func (w *Control) Close() + func (w *Control) Handle() uintptr + func (w *Control) Layout(bc base.Constraints) base.Size + func (w *Control) MinIntrinsicHeight(width base.Length) base.Length + func (w *Control) MinIntrinsicWidth(base.Length) base.Length + func (w *Control) OnDestroy() + func (w *Control) SetBounds(bounds base.Rectangle) + func (w *Control) SetOrder(previous win.HWND) win.HWND + func (w *Control) TakeFocus() bool + func (w *Control) TypeKeys(text string) chan error + func (w Control) CalcRect(text []uint16) (int32, int32) + func (w Control) SetDisabled(value bool) + func (w Control) SetText(value string) error + func (w Control) Text() string + type CrossAxisAlign uint8 + const CrossCenter + const CrossEnd + const CrossStart + const Stretch + type DateInput struct + Disabled bool + OnBlur func() + OnChange func(value time.Time) + OnFocus func() + Value time.Time + func (*DateInput) Kind() *base.Kind + func (w *DateInput) Mount(parent base.Control) (base.Element, error) + type Decoration struct + Child base.Widget + Fill color.RGBA + Insets Insets + Radius base.Length + Stroke color.RGBA + func (*Decoration) Kind() *base.Kind + func (w *Decoration) Mount(parent base.Control) (base.Element, error) + type Empty struct + func (*Empty) Kind() *base.Kind + func (w *Empty) Mount(parent base.Control) (base.Element, error) + type Expand struct + Child base.Widget + Factor int + func (*Expand) Kind() *base.Kind + func (w *Expand) Mount(parent base.Control) (base.Element, error) + type HBox struct + AlignCross CrossAxisAlign + AlignMain MainAxisAlign + Children []base.Widget + func (*HBox) Kind() *base.Kind + func (w *HBox) Mount(parent base.Control) (base.Element, error) + type HR struct + func (*HR) Kind() *base.Kind + func (w *HR) Mount(parent base.Control) (base.Element, error) + type Img struct + Height base.Length + Image image.Image + Width base.Length + func (*Img) Kind() *base.Kind + func (w *Img) Mount(parent base.Control) (base.Element, error) + func (w *Img) UpdateDimensions() + type Insets struct + Bottom base.Length + Left base.Length + Right base.Length + Top base.Length + func DefaultInsets() Insets + func UniformInsets(l base.Length) Insets + func (i *Insets) String() string + type IntInput struct + Disabled bool + Max int64 + Min int64 + OnBlur func() + OnChange func(value int64) + OnEnterKey func(value int64) + OnFocus func() + Placeholder string + Value int64 + func (*IntInput) Kind() *base.Kind + func (w *IntInput) Mount(parent base.Control) (base.Element, error) + func (w *IntInput) UpdateRange() + func (w *IntInput) UpdateValue() + type Label struct + Text string + func (*Label) Kind() *base.Kind + func (w *Label) Mount(parent base.Control) (base.Element, error) + type MainAxisAlign uint8 + const Homogeneous + const MainCenter + const MainEnd + const MainStart + const SpaceAround + const SpaceBetween + func (a MainAxisAlign) IsPacked() bool + type P struct + Align TextAlignment + Text string + func (*P) Kind() *base.Kind + func (w *P) Mount(parent base.Control) (base.Element, error) + type Padding struct + Child base.Widget + Insets Insets + func (*Padding) Kind() *base.Kind + func (w *Padding) Mount(parent base.Control) (base.Element, error) + type Progress struct + Max int + Min int + Value int + func (*Progress) Kind() *base.Kind + func (w *Progress) Mount(parent base.Control) (base.Element, error) + func (w *Progress) UpdateRange() + func (w *Progress) UpdateValue() + type SelectInput struct + Disabled bool + Items []string + OnBlur func() + OnChange func(value int) + OnFocus func() + Unset bool + Value int + func (*SelectInput) Kind() *base.Kind + func (w *SelectInput) Mount(parent base.Control) (base.Element, error) + func (w *SelectInput) UpdateValue() + type Slider struct + Disabled bool + Max float64 + Min float64 + OnBlur func() + OnChange func(float64) + OnFocus func() + Value float64 + func (*Slider) Kind() *base.Kind + func (w *Slider) Mount(parent base.Control) (base.Element, error) + func (w *Slider) UpdateRange() + func (w *Slider) UpdateValue() + type TabItem struct + Caption string + Child base.Widget + type Tabs struct + Children []TabItem + Insets Insets + OnChange func(int) + Value int + func (*Tabs) Kind() *base.Kind + func (w *Tabs) Mount(parent base.Control) (base.Element, error) + func (w *Tabs) UpdateValue() + type TextAlignment uint8 + const JustifyCenter + const JustifyFull + const JustifyLeft + const JustifyRight + type TextArea struct + Disabled bool + MinLines int + OnBlur func() + OnChange func(value string) + OnFocus func() + Placeholder string + ReadOnly bool + Value string + func (*TextArea) Kind() *base.Kind + func (w *TextArea) Mount(parent base.Control) (base.Element, error) + type TextInput struct + Disabled bool + OnBlur func() + OnChange func(value string) + OnEnterKey func(value string) + OnFocus func() + Password bool + Placeholder string + ReadOnly bool + Value string + func (*TextInput) Kind() *base.Kind + func (w *TextInput) Mount(parent base.Control) (base.Element, error) + type VBox struct + AlignCross CrossAxisAlign + AlignMain MainAxisAlign + Children []base.Widget + func (*VBox) Kind() *base.Kind + func (w *VBox) Mount(parent base.Control) (base.Element, error) + type Window struct + func NewWindow(title string, child base.Widget) (*Window, error) + func (w *Window) Child() base.Element + func (w *Window) Close() + func (w *Window) Message(text string) *dialog.Message + func (w *Window) NativeHandle() win.HWND + func (w *Window) OnDeleteEvent() bool + func (w *Window) OnDestroy() + func (w *Window) OnSizeAllocate(width, height int) + func (w *Window) OpenFileDialog() *dialog.OpenFile + func (w *Window) SaveFileDialog() *dialog.SaveFile + func (w *Window) Screenshot() (image.Image, error) + func (w *Window) Scroll() (horizontal, vertical bool) + func (w *Window) SetChild(child base.Widget) error + func (w *Window) SetIcon(img image.Image) error + func (w *Window) SetOnClosing(callback func() bool) + func (w *Window) SetScroll(horizontal, vertical bool) + func (w *Window) SetTitle(title string) error + func (w *Window) Title() (string, error)