fyne: fyne.io/fyne/widget Index | Files

package widget

import "fyne.io/fyne/widget"

Package widget defines the UI widgets within the Fyne toolkit

Index

Package Files

box.go button.go check.go entry.go form.go group.go hyperlink.go icon.go label.go menu.go popup.go progressbar.go progressbarinfinite.go radio.go scroller.go select.go shadow.go tabcontainer.go text.go toolbar.go widget.go

func DestroyRenderer Uses

func DestroyRenderer(wid fyne.Widget)

DestroyRenderer frees a render implementation for a widget. This is typically for internal use only.

func Refresh Uses

func Refresh(wid fyne.Widget)

Refresh instructs the containing canvas to refresh the specified widget.

func Renderer Uses

func Renderer(wid fyne.Widget) fyne.WidgetRenderer

Renderer looks up the render implementation for a widget

type Box Uses

type Box struct {
    Horizontal bool
    Children   []fyne.CanvasObject
    // contains filtered or unexported fields
}

Box widget is a simple list where the child elements are arranged in a single column for vertical or a single row for horizontal arrangement

func NewHBox Uses

func NewHBox(children ...fyne.CanvasObject) *Box

NewHBox creates a new horizontally aligned box widget with the specified list of child objects

func NewVBox Uses

func NewVBox(children ...fyne.CanvasObject) *Box

NewVBox creates a new vertically aligned box widget with the specified list of child objects

func (*Box) Append Uses

func (b *Box) Append(object fyne.CanvasObject)

Append adds a new CanvasObject to the end/right of the box

func (*Box) ApplyTheme Uses

func (b *Box) ApplyTheme()

ApplyTheme updates this box to match the current theme

func (*Box) CreateRenderer Uses

func (b *Box) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Box) Hide Uses

func (b *Box) Hide()

Hide this widget, if it was previously visible

func (*Box) MinSize Uses

func (b *Box) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Box) Move Uses

func (b *Box) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Box) Position Uses

func (w *Box) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*Box) Prepend Uses

func (b *Box) Prepend(object fyne.CanvasObject)

Prepend inserts a new CanvasObject at the top/left of the box

func (*Box) Resize Uses

func (b *Box) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Box) Show Uses

func (b *Box) Show()

Show this widget, if it was previously hidden

func (*Box) Size Uses

func (w *Box) Size() fyne.Size

Get the current size of this widget.

func (*Box) Visible Uses

func (w *Box) Visible() bool

type Button Uses

type Button struct {
    Text  string
    Style ButtonStyle
    Icon  fyne.Resource

    OnTapped func() `json:"-"`

    HideShadow bool
    // contains filtered or unexported fields
}

Button widget has a text label and triggers an event func when clicked

func NewButton Uses

func NewButton(label string, tapped func()) *Button

NewButton creates a new button widget with the set label and tap handler

func NewButtonWithIcon Uses

func NewButtonWithIcon(label string, icon fyne.Resource, tapped func()) *Button

NewButtonWithIcon creates a new button widget with the specified label, themed icon and tap handler

func (*Button) CreateRenderer Uses

func (b *Button) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Button) Disable Uses

func (b *Button) Disable()

Disable this widget, if it was previously enabled

func (*Button) Disabled Uses

func (b *Button) Disabled() bool

Disabled returns true if the widget is disabled

func (*Button) Enable Uses

func (b *Button) Enable()

Enable this widget, if it was previously disabled

func (*Button) Hide Uses

func (b *Button) Hide()

Hide this widget, if it was previously visible

func (*Button) MinSize Uses

func (b *Button) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Button) MouseIn Uses

func (b *Button) MouseIn(*desktop.MouseEvent)

MouseIn is called when a desktop pointer enters the widget

func (*Button) MouseMoved Uses

func (b *Button) MouseMoved(*desktop.MouseEvent)

MouseMoved is called when a desktop pointer hovers over the widget

func (*Button) MouseOut Uses

func (b *Button) MouseOut()

MouseOut is called when a desktop pointer exits the widget

func (*Button) Move Uses

func (b *Button) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Button) Position Uses

func (w *Button) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*Button) Resize Uses

func (b *Button) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Button) SetIcon Uses

func (b *Button) SetIcon(icon fyne.Resource)

SetIcon updates the icon on a label - pass nil to hide an icon

func (*Button) SetText Uses

func (b *Button) SetText(text string)

SetText allows the button label to be changed

func (*Button) Show Uses

func (b *Button) Show()

Show this widget, if it was previously hidden

func (*Button) Size Uses

func (w *Button) Size() fyne.Size

Get the current size of this widget.

func (*Button) Tapped Uses

func (b *Button) Tapped(*fyne.PointEvent)

Tapped is called when a pointer tapped event is captured and triggers any tap handler

func (*Button) TappedSecondary Uses

func (b *Button) TappedSecondary(*fyne.PointEvent)

TappedSecondary is called when a secondary pointer tapped event is captured

func (*Button) Visible Uses

func (w *Button) Visible() bool

type ButtonStyle Uses

type ButtonStyle int

ButtonStyle determines the behaviour and rendering of a button.

const (
    // DefaultButton is the standard button style
    DefaultButton ButtonStyle = iota
    // PrimaryButton that should be more prominent to the user
    PrimaryButton
)

type Check Uses

type Check struct {
    Text    string
    Checked bool

    OnChanged func(bool) `json:"-"`
    // contains filtered or unexported fields
}

Check widget has a text label and a checked (or unchecked) icon and triggers an event func when toggled

func NewCheck Uses

func NewCheck(label string, changed func(bool)) *Check

NewCheck creates a new check widget with the set label and change handler

func (*Check) CreateRenderer Uses

func (c *Check) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Check) Disable Uses

func (c *Check) Disable()

Disable this widget, if it was previously enabled

func (*Check) Disabled Uses

func (c *Check) Disabled() bool

Disabled returns true if the widget is disabled

func (*Check) Enable Uses

func (c *Check) Enable()

Enable this widget, if it was previously disabled

func (*Check) FocusGained Uses

func (c *Check) FocusGained()

FocusGained is called when the Check has been given focus.

func (*Check) FocusLost Uses

func (c *Check) FocusLost()

FocusLost is called when the Check has had focus removed.

func (*Check) Focused Uses

func (c *Check) Focused() bool

Focused returns whether or not this Check has focus.

func (*Check) Hide Uses

func (c *Check) Hide()

Hide this widget, if it was previously visible

func (*Check) MinSize Uses

func (c *Check) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Check) MouseIn Uses

func (c *Check) MouseIn(*desktop.MouseEvent)

MouseIn is called when a desktop pointer enters the widget

func (*Check) MouseMoved Uses

func (c *Check) MouseMoved(*desktop.MouseEvent)

MouseMoved is called when a desktop pointer hovers over the widget

func (*Check) MouseOut Uses

func (c *Check) MouseOut()

MouseOut is called when a desktop pointer exits the widget

func (*Check) Move Uses

func (c *Check) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Check) Position Uses

func (w *Check) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*Check) Resize Uses

func (c *Check) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Check) SetChecked Uses

func (c *Check) SetChecked(checked bool)

SetChecked sets the the checked state and refreshes widget

func (*Check) Show Uses

func (c *Check) Show()

Show this widget, if it was previously hidden

func (*Check) Size Uses

func (w *Check) Size() fyne.Size

Get the current size of this widget.

func (*Check) Tapped Uses

func (c *Check) Tapped(*fyne.PointEvent)

Tapped is called when a pointer tapped event is captured and triggers any change handler

func (*Check) TappedSecondary Uses

func (c *Check) TappedSecondary(*fyne.PointEvent)

TappedSecondary is called when a secondary pointer tapped event is captured

func (*Check) TypedKey Uses

func (c *Check) TypedKey(key *fyne.KeyEvent)

TypedKey receives key input events when the Check is focused.

func (*Check) TypedRune Uses

func (c *Check) TypedRune(r rune)

TypedRune receives text input events when the Check is focused.

func (*Check) Visible Uses

func (w *Check) Visible() bool

type Entry Uses

type Entry struct {
    sync.RWMutex

    Text        string
    PlaceHolder string
    OnChanged   func(string) `json:"-"`
    Password    bool
    ReadOnly    bool
    MultiLine   bool

    CursorRow, CursorColumn int
    OnCursorChanged         func() `json:"-"`
    // contains filtered or unexported fields
}

Entry widget allows simple text to be input when focused.

func NewEntry Uses

func NewEntry() *Entry

NewEntry creates a new single line entry widget.

func NewMultiLineEntry Uses

func NewMultiLineEntry() *Entry

NewMultiLineEntry creates a new entry that allows multiple lines

func NewPasswordEntry Uses

func NewPasswordEntry() *Entry

NewPasswordEntry creates a new entry password widget

func (*Entry) CreateRenderer Uses

func (e *Entry) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Entry) DoubleTapped Uses

func (e *Entry) DoubleTapped(ev *fyne.PointEvent)

DoubleTapped is called when this entry has been double tapped so we should select text below the pointer

func (*Entry) DragEnd Uses

func (e *Entry) DragEnd()

DragEnd is called at end of a drag event - currently ignored

func (*Entry) Dragged Uses

func (e *Entry) Dragged(d *fyne.DragEvent)

Dragged is called when the pointer moves while a button is held down

func (*Entry) FocusGained Uses

func (e *Entry) FocusGained()

FocusGained is called when the Entry has been given focus.

func (*Entry) FocusLost Uses

func (e *Entry) FocusLost()

FocusLost is called when the Entry has had focus removed.

func (*Entry) Focused Uses

func (e *Entry) Focused() bool

Focused returns whether or not this Entry has focus.

func (*Entry) Hide Uses

func (e *Entry) Hide()

Hide this widget, if it was previously visible

func (*Entry) KeyDown Uses

func (e *Entry) KeyDown(key *fyne.KeyEvent)

KeyDown handler for keypress events - used to store shift modifier state for text selection

func (*Entry) KeyUp Uses

func (e *Entry) KeyUp(key *fyne.KeyEvent)

KeyUp handler for key release events - used to reset shift modifier state for text selection

func (*Entry) MinSize Uses

func (e *Entry) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Entry) MouseDown Uses

func (e *Entry) MouseDown(m *desktop.MouseEvent)

MouseDown called on mouse click, this triggers a mouse click which can move the cursor, update the existing selection (if shift is held), or start a selection dragging operation.

func (*Entry) MouseUp Uses

func (e *Entry) MouseUp(m *desktop.MouseEvent)

MouseUp called on mouse release If a mouse drag event has completed then check to see if it has resulted in an empty selection, if so, and if a text select key isn't held, then disable selecting

func (*Entry) Move Uses

func (e *Entry) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Entry) Position Uses

func (w *Entry) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*Entry) Resize Uses

func (e *Entry) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Entry) SetPlaceHolder Uses

func (e *Entry) SetPlaceHolder(text string)

SetPlaceHolder sets the text that will be displayed if the entry is otherwise empty

func (*Entry) SetReadOnly Uses

func (e *Entry) SetReadOnly(ro bool)

SetReadOnly sets whether or not the Entry should not be editable

func (*Entry) SetText Uses

func (e *Entry) SetText(text string)

SetText manually sets the text of the Entry to the given text value.

func (*Entry) Show Uses

func (e *Entry) Show()

Show this widget, if it was previously hidden

func (*Entry) Size Uses

func (w *Entry) Size() fyne.Size

Get the current size of this widget.

func (*Entry) Tapped Uses

func (e *Entry) Tapped(ev *fyne.PointEvent)

Tapped is called when this entry has been tapped so we should update the cursor position.

func (*Entry) TappedSecondary Uses

func (e *Entry) TappedSecondary(_ *fyne.PointEvent)

TappedSecondary is called when right or alternative tap is invoked - this is currently ignored.

func (*Entry) TypedKey Uses

func (e *Entry) TypedKey(key *fyne.KeyEvent)

TypedKey receives key input events when the Entry widget is focused.

func (*Entry) TypedRune Uses

func (e *Entry) TypedRune(r rune)

TypedRune receives text input events when the Entry widget is focused.

func (*Entry) TypedShortcut Uses

func (e *Entry) TypedShortcut(shortcut fyne.Shortcut) bool

TypedShortcut implements the Shortcutable interface

func (*Entry) Visible Uses

func (w *Entry) Visible() bool

type Form Uses

type Form struct {
    Items    []*FormItem
    OnSubmit func()
    OnCancel func()
    // contains filtered or unexported fields
}

Form widget is two column grid where each row has a label and a widget (usually an input). The last row of the grid will contain the appropriate form control buttons if any should be shown. Setting OnSubmit will set the submit button to be visible and call back the function when tapped. Setting OnCancel will do the same for a cancel button.

func NewForm Uses

func NewForm(items ...*FormItem) *Form

NewForm creates a new form widget with the specified rows of form items and (if any of them should be shown) a form controls row at the bottom

func (*Form) Append Uses

func (f *Form) Append(text string, widget fyne.CanvasObject)

Append adds a new row to the form, using the text as a label next to the specified Widget

func (*Form) AppendItem Uses

func (f *Form) AppendItem(item *FormItem)

AppendItem adds the specified row to the end of the Form

func (*Form) CreateRenderer Uses

func (f *Form) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Form) Hide Uses

func (f *Form) Hide()

Hide this widget, if it was previously visible

func (*Form) MinSize Uses

func (f *Form) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Form) Move Uses

func (f *Form) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Form) Position Uses

func (w *Form) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*Form) Resize Uses

func (f *Form) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Form) Show Uses

func (f *Form) Show()

Show this widget, if it was previously hidden

func (*Form) Size Uses

func (w *Form) Size() fyne.Size

Get the current size of this widget.

func (*Form) Visible Uses

func (w *Form) Visible() bool

type FormItem Uses

type FormItem struct {
    Text   string
    Widget fyne.CanvasObject
}

FormItem provides the details for a row in a form

type Group Uses

type Group struct {
    Text string
    // contains filtered or unexported fields
}

Group widget is list of widgets that contains a visual border around the list and a group title at the top.

func NewGroup Uses

func NewGroup(title string, children ...fyne.CanvasObject) *Group

NewGroup creates a new grouped list widget with a title and the specified list of child objects.

func NewGroupWithScroller Uses

func NewGroupWithScroller(title string, children ...fyne.CanvasObject) *Group

NewGroupWithScroller creates a new grouped list widget with a title and the specified list of child objects. This group will scroll when the available space is less than needed to display the items it contains.

func (*Group) Append Uses

func (g *Group) Append(object fyne.CanvasObject)

Append adds a new CanvasObject to the end of the group

func (*Group) CreateRenderer Uses

func (g *Group) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Group) Hide Uses

func (g *Group) Hide()

Hide this widget, if it was previously visible

func (*Group) MinSize Uses

func (g *Group) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Group) Move Uses

func (g *Group) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Group) Position Uses

func (w *Group) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*Group) Prepend Uses

func (g *Group) Prepend(object fyne.CanvasObject)

Prepend inserts a new CanvasObject at the top of the group

func (*Group) Resize Uses

func (g *Group) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Group) Show Uses

func (g *Group) Show()

Show this widget, if it was previously hidden

func (*Group) Size Uses

func (w *Group) Size() fyne.Size

Get the current size of this widget.

func (*Group) Visible Uses

func (w *Group) Visible() bool
type Hyperlink struct {
    Text      string
    URL       *url.URL
    Alignment fyne.TextAlign // The alignment of the Text
    TextStyle fyne.TextStyle // The style of the hyperlink text
    // contains filtered or unexported fields
}

Hyperlink widget is a text component with appropriate padding and layout. When clicked, the default web browser should open with a URL

func NewHyperlink(text string, url *url.URL) *Hyperlink

NewHyperlink creates a new hyperlink widget with the set text content

func NewHyperlinkWithStyle Uses

func NewHyperlinkWithStyle(text string, url *url.URL, alignment fyne.TextAlign, style fyne.TextStyle) *Hyperlink

NewHyperlinkWithStyle creates a new hyperlink widget with the set text content

func (*Hyperlink) CreateRenderer Uses

func (hl *Hyperlink) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Hyperlink) Hide Uses

func (hl *Hyperlink) Hide()

Hide this widget, if it was previously visible

func (*Hyperlink) MinSize Uses

func (hl *Hyperlink) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Hyperlink) Move Uses

func (hl *Hyperlink) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Hyperlink) Resize Uses

func (hl *Hyperlink) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Hyperlink) SetText Uses

func (hl *Hyperlink) SetText(text string)

SetText sets the text of the hyperlink

func (*Hyperlink) SetURL Uses

func (hl *Hyperlink) SetURL(url *url.URL)

SetURL sets the URL of the hyperlink, taking in a URL type

func (*Hyperlink) SetURLFromString Uses

func (hl *Hyperlink) SetURLFromString(str string) error

SetURLFromString sets the URL of the hyperlink, taking in a string type

func (*Hyperlink) Show Uses

func (hl *Hyperlink) Show()

Show this widget, if it was previously hidden

func (*Hyperlink) String Uses

func (t *Hyperlink) String() string

String returns the text widget buffer as string

func (*Hyperlink) Tapped Uses

func (hl *Hyperlink) Tapped(*fyne.PointEvent)

Tapped is called when a pointer tapped event is captured and triggers any change handler

func (*Hyperlink) TappedSecondary Uses

func (hl *Hyperlink) TappedSecondary(*fyne.PointEvent)

TappedSecondary is called when a secondary pointer tapped event is captured

type Icon Uses

type Icon struct {
    Resource fyne.Resource // The resource for this icon
    // contains filtered or unexported fields
}

Icon widget is a basic image component that load's its resource to match the theme.

func NewIcon Uses

func NewIcon(res fyne.Resource) *Icon

NewIcon returns a new icon widget that displays a themed icon resource

func (*Icon) CreateRenderer Uses

func (i *Icon) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Icon) Hide Uses

func (i *Icon) Hide()

Hide this widget, if it was previously visible

func (*Icon) MinSize Uses

func (i *Icon) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Icon) Move Uses

func (i *Icon) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Icon) Position Uses

func (w *Icon) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*Icon) Resize Uses

func (i *Icon) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Icon) SetResource Uses

func (i *Icon) SetResource(res fyne.Resource)

SetResource updates the resource rendered in this icon widget

func (*Icon) Show Uses

func (i *Icon) Show()

Show this widget, if it was previously hidden

func (*Icon) Size Uses

func (w *Icon) Size() fyne.Size

Get the current size of this widget.

func (*Icon) Visible Uses

func (w *Icon) Visible() bool

type Label Uses

type Label struct {
    Text      string
    Alignment fyne.TextAlign // The alignment of the Text
    TextStyle fyne.TextStyle // The style of the label text
    // contains filtered or unexported fields
}

Label widget is a label component with appropriate padding and layout.

func NewLabel Uses

func NewLabel(text string) *Label

NewLabel creates a new label widget with the set text content

func NewLabelWithStyle Uses

func NewLabelWithStyle(text string, alignment fyne.TextAlign, style fyne.TextStyle) *Label

NewLabelWithStyle creates a new label widget with the set text content

func (*Label) CreateRenderer Uses

func (l *Label) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Label) Hide Uses

func (l *Label) Hide()

Hide this widget, if it was previously visible

func (*Label) MinSize Uses

func (l *Label) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Label) Move Uses

func (l *Label) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Label) Resize Uses

func (l *Label) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Label) SetText Uses

func (l *Label) SetText(text string)

SetText sets the text of the label

func (*Label) Show Uses

func (l *Label) Show()

Show this widget, if it was previously hidden

func (*Label) String Uses

func (t *Label) String() string

String returns the text widget buffer as string

type PopUp struct {
    Content fyne.CanvasObject
    Canvas  fyne.Canvas
    // contains filtered or unexported fields
}

PopUp is a widget that can float above the user interface. It wraps any standard elements with padding and a shadow. If it is modal then the shadow will cover the entire canvas it hovers over and block interactions.

func NewModalPopUp Uses

func NewModalPopUp(content fyne.CanvasObject, canvas fyne.Canvas) *PopUp

NewModalPopUp creates a new popUp for the specified content and displays it on the passed canvas. A modal PopUp blocks interactions with underlying elements, covered with a semi-transparent overlay.

func NewPopUp Uses

func NewPopUp(content fyne.CanvasObject, canvas fyne.Canvas) *PopUp

NewPopUp creates a new popUp for the specified content and displays it on the passed canvas.

func NewPopUpMenu Uses

func NewPopUpMenu(menu *fyne.Menu, c fyne.Canvas) *PopUp

NewPopUpMenu creates a PopUp widget populated with menu items from the passed menu structure. It will automatically be shown as an overlay on the specified canvas.

func (*PopUp) CreateRenderer Uses

func (p *PopUp) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*PopUp) Hide Uses

func (p *PopUp) Hide()

Hide this widget, if it was previously visible

func (*PopUp) MinSize Uses

func (p *PopUp) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*PopUp) Move Uses

func (p *PopUp) Move(pos fyne.Position)

Move the widget to a new position. A PopUp position is absolute to the top, left of its canvas. For PopUp this actually moves the content so checking Position() will not return the same value as is set here.

func (*PopUp) Position Uses

func (w *PopUp) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*PopUp) Resize Uses

func (p *PopUp) Resize(size fyne.Size)

Resize sets a new size for a widget. Most PopUp widgets are shown at MinSize.

func (*PopUp) Show Uses

func (p *PopUp) Show()

Show this widget, if it was previously hidden

func (*PopUp) Size Uses

func (w *PopUp) Size() fyne.Size

Get the current size of this widget.

func (*PopUp) Tapped Uses

func (p *PopUp) Tapped(_ *fyne.PointEvent)

Tapped is called when the user taps the popUp background - if not modal then dismiss this widget

func (*PopUp) TappedSecondary Uses

func (p *PopUp) TappedSecondary(_ *fyne.PointEvent)

TappedSecondary is called when the user right/alt taps the background - if not modal then dismiss this widget

func (*PopUp) Visible Uses

func (w *PopUp) Visible() bool

type ProgressBar Uses

type ProgressBar struct {
    Min, Max, Value float64
    // contains filtered or unexported fields
}

ProgressBar widget creates a horizontal panel that indicates progress

func NewProgressBar Uses

func NewProgressBar() *ProgressBar

NewProgressBar creates a new progress bar widget. The default Min is 0 and Max is 1, Values set should be between those numbers. The display will convert this to a percentage.

func (*ProgressBar) CreateRenderer Uses

func (p *ProgressBar) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*ProgressBar) Hide Uses

func (p *ProgressBar) Hide()

Hide this widget, if it was previously visible

func (*ProgressBar) MinSize Uses

func (p *ProgressBar) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*ProgressBar) Move Uses

func (p *ProgressBar) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*ProgressBar) Position Uses

func (w *ProgressBar) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*ProgressBar) Resize Uses

func (p *ProgressBar) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*ProgressBar) SetValue Uses

func (p *ProgressBar) SetValue(v float64)

SetValue changes the current value of this progress bar (from p.Min to p.Max). The widget will be refreshed to indicate the change.

func (*ProgressBar) Show Uses

func (p *ProgressBar) Show()

Show this widget, if it was previously hidden

func (*ProgressBar) Size Uses

func (w *ProgressBar) Size() fyne.Size

Get the current size of this widget.

func (*ProgressBar) Visible Uses

func (w *ProgressBar) Visible() bool

type ProgressBarInfinite Uses

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

ProgressBarInfinite widget creates a horizontal panel that indicates waiting indefinitely An infinite progress bar loops 0% -> 100% repeatedly until Stop() is called

func NewProgressBarInfinite Uses

func NewProgressBarInfinite() *ProgressBarInfinite

NewProgressBarInfinite creates a new progress bar widget that loops indefinitely from 0% -> 100% SetValue() is not defined for infinite progress bar To stop the looping progress and set the progress bar to 100%, call ProgressBarInfinite.Stop()

func (*ProgressBarInfinite) CreateRenderer Uses

func (p *ProgressBarInfinite) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*ProgressBarInfinite) Hide Uses

func (p *ProgressBarInfinite) Hide()

Hide this widget, if it was previously visible

func (*ProgressBarInfinite) MinSize Uses

func (p *ProgressBarInfinite) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*ProgressBarInfinite) Move Uses

func (p *ProgressBarInfinite) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*ProgressBarInfinite) Position Uses

func (w *ProgressBarInfinite) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*ProgressBarInfinite) Resize Uses

func (p *ProgressBarInfinite) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*ProgressBarInfinite) Running Uses

func (p *ProgressBarInfinite) Running() bool

Running returns the current state of the infinite progress animation

func (*ProgressBarInfinite) Show Uses

func (p *ProgressBarInfinite) Show()

Show this widget, if it was previously hidden

func (*ProgressBarInfinite) Size Uses

func (w *ProgressBarInfinite) Size() fyne.Size

Get the current size of this widget.

func (*ProgressBarInfinite) Start Uses

func (p *ProgressBarInfinite) Start()

Start the infinite progress bar background thread to update it continuously

func (*ProgressBarInfinite) Stop Uses

func (p *ProgressBarInfinite) Stop()

Stop the infinite progress goroutine and sets value to the Max

func (*ProgressBarInfinite) Visible Uses

func (w *ProgressBarInfinite) Visible() bool

type Radio Uses

type Radio struct {
    Options  []string
    Selected string

    OnChanged  func(string) `json:"-"`
    Horizontal bool
    // contains filtered or unexported fields
}

Radio widget has a list of text labels and radio check icons next to each. Changing the selection (only one can be selected) will trigger the changed func.

func NewRadio Uses

func NewRadio(options []string, changed func(string)) *Radio

NewRadio creates a new radio widget with the set options and change handler

func (*Radio) Append Uses

func (r *Radio) Append(option string)

Append adds a new option to the end of a Radio widget.

func (*Radio) CreateRenderer Uses

func (r *Radio) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Radio) Disable Uses

func (r *Radio) Disable()

Disable this widget, if it was previously enabled

func (*Radio) Disabled Uses

func (r *Radio) Disabled() bool

Disabled returns true if the widget is disabled

func (*Radio) Enable Uses

func (r *Radio) Enable()

Enable this widget, if it was previously disabled

func (*Radio) Hide Uses

func (r *Radio) Hide()

Hide this widget, if it was previously visible

func (*Radio) MinSize Uses

func (r *Radio) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Radio) MouseIn Uses

func (r *Radio) MouseIn(event *desktop.MouseEvent)

MouseIn is called when a desktop pointer enters the widget

func (*Radio) MouseMoved Uses

func (r *Radio) MouseMoved(event *desktop.MouseEvent)

MouseMoved is called when a desktop pointer hovers over the widget

func (*Radio) MouseOut Uses

func (r *Radio) MouseOut()

MouseOut is called when a desktop pointer exits the widget

func (*Radio) Move Uses

func (r *Radio) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Radio) Position Uses

func (w *Radio) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*Radio) Resize Uses

func (r *Radio) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Radio) SetSelected Uses

func (r *Radio) SetSelected(option string)

SetSelected sets the radio option, it can be used to set a default option.

func (*Radio) Show Uses

func (r *Radio) Show()

Show this widget, if it was previously hidden

func (*Radio) Size Uses

func (w *Radio) Size() fyne.Size

Get the current size of this widget.

func (*Radio) Tapped Uses

func (r *Radio) Tapped(event *fyne.PointEvent)

Tapped is called when a pointer tapped event is captured and triggers any change handler

func (*Radio) TappedSecondary Uses

func (r *Radio) TappedSecondary(*fyne.PointEvent)

TappedSecondary is called when a secondary pointer tapped event is captured

func (*Radio) Visible Uses

func (w *Radio) Visible() bool

type ScrollContainer Uses

type ScrollContainer struct {
    Content fyne.CanvasObject
    Offset  fyne.Position
    // contains filtered or unexported fields
}

ScrollContainer defines a container that is smaller than the Content. The Offset is used to determine the position of the child widgets within the container.

func NewScrollContainer Uses

func NewScrollContainer(content fyne.CanvasObject) *ScrollContainer

NewScrollContainer creates a scrollable parent wrapping the specified content. Note that this may cause the MinSize to be smaller than that of the passed objects.

func (*ScrollContainer) CreateRenderer Uses

func (s *ScrollContainer) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*ScrollContainer) Hide Uses

func (s *ScrollContainer) Hide()

Hide this widget, if it was previously visible

func (*ScrollContainer) MinSize Uses

func (s *ScrollContainer) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*ScrollContainer) Move Uses

func (s *ScrollContainer) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*ScrollContainer) Position Uses

func (w *ScrollContainer) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*ScrollContainer) Resize Uses

func (s *ScrollContainer) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*ScrollContainer) Scrolled Uses

func (s *ScrollContainer) Scrolled(ev *fyne.ScrollEvent)

Scrolled is called when an input device triggers a scroll event

func (*ScrollContainer) Show Uses

func (s *ScrollContainer) Show()

Show this widget, if it was previously hidden

func (*ScrollContainer) Size Uses

func (w *ScrollContainer) Size() fyne.Size

Get the current size of this widget.

func (*ScrollContainer) Visible Uses

func (w *ScrollContainer) Visible() bool

type Select Uses

type Select struct {
    Selected string
    Options  []string

    OnChanged func(string) `json:"-"`
    // contains filtered or unexported fields
}

Select widget has a list of options, with the current one shown, and triggers an event func when clicked

func NewSelect Uses

func NewSelect(options []string, changed func(string)) *Select

NewSelect creates a new select widget with the set list of options and changes handler

func (*Select) CreateRenderer Uses

func (s *Select) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Select) Hide Uses

func (s *Select) Hide()

Hide this widget, if it was previously visible

func (*Select) MinSize Uses

func (s *Select) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Select) MouseIn Uses

func (s *Select) MouseIn(*desktop.MouseEvent)

MouseIn is called when a desktop pointer enters the widget

func (*Select) MouseMoved Uses

func (s *Select) MouseMoved(*desktop.MouseEvent)

MouseMoved is called when a desktop pointer hovers over the widget

func (*Select) MouseOut Uses

func (s *Select) MouseOut()

MouseOut is called when a desktop pointer exits the widget

func (*Select) Move Uses

func (s *Select) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Select) Position Uses

func (w *Select) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*Select) Resize Uses

func (s *Select) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Select) SetSelected Uses

func (s *Select) SetSelected(text string)

SetSelected sets the current option of the select widget

func (*Select) Show Uses

func (s *Select) Show()

Show this widget, if it was previously hidden

func (*Select) Size Uses

func (w *Select) Size() fyne.Size

Get the current size of this widget.

func (*Select) Tapped Uses

func (s *Select) Tapped(*fyne.PointEvent)

Tapped is called when a pointer tapped event is captured and triggers any tap handler

func (*Select) TappedSecondary Uses

func (s *Select) TappedSecondary(*fyne.PointEvent)

TappedSecondary is called when a secondary pointer tapped event is captured

func (*Select) Visible Uses

func (w *Select) Visible() bool

type TabContainer Uses

type TabContainer struct {
    Items []*TabItem
    // contains filtered or unexported fields
}

TabContainer widget allows switching visible content from a list of TabItems. Each item is represented by a button at the top of the widget.

func NewTabContainer Uses

func NewTabContainer(items ...*TabItem) *TabContainer

NewTabContainer creates a new tab bar widget that allows the user to choose between different visible containers

func (*TabContainer) CreateRenderer Uses

func (t *TabContainer) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*TabContainer) CurrentTab Uses

func (t *TabContainer) CurrentTab() *TabItem

CurrentTab returns the currently selected TabItem.

func (*TabContainer) CurrentTabIndex Uses

func (t *TabContainer) CurrentTabIndex() int

CurrentTabIndex returns the index of the currently selected TabItem.

func (*TabContainer) Hide Uses

func (t *TabContainer) Hide()

Hide this widget, if it was previously visible

func (*TabContainer) MinSize Uses

func (t *TabContainer) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*TabContainer) Move Uses

func (t *TabContainer) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*TabContainer) Position Uses

func (w *TabContainer) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*TabContainer) Resize Uses

func (t *TabContainer) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*TabContainer) SelectTab Uses

func (t *TabContainer) SelectTab(item *TabItem)

SelectTab sets the specified TabItem to be selected and its content visible.

func (*TabContainer) SelectTabIndex Uses

func (t *TabContainer) SelectTabIndex(index int)

SelectTabIndex sets the TabItem at the specific index to be selected and its content visible.

func (*TabContainer) SetTabLocation Uses

func (t *TabContainer) SetTabLocation(l TabLocation)

SetTabLocation sets the location of the tab bar

func (*TabContainer) Show Uses

func (t *TabContainer) Show()

Show this widget, if it was previously hidden

func (*TabContainer) Size Uses

func (w *TabContainer) Size() fyne.Size

Get the current size of this widget.

func (*TabContainer) Visible Uses

func (w *TabContainer) Visible() bool

type TabItem Uses

type TabItem struct {
    Text    string
    Icon    fyne.Resource
    Content fyne.CanvasObject
}

TabItem represents a single view in a TabContainer. The Text and Icon are used for the tab button and the Content is shown when the corresponding tab is active.

func NewTabItem Uses

func NewTabItem(text string, content fyne.CanvasObject) *TabItem

NewTabItem creates a new item for a tabbed widget - each item specifies the content and a label for its tab.

func NewTabItemWithIcon Uses

func NewTabItemWithIcon(text string, icon fyne.Resource, content fyne.CanvasObject) *TabItem

NewTabItemWithIcon creates a new item for a tabbed widget - each item specifies the content and a label with an icon for its tab.

type TabLocation Uses

type TabLocation int

TabLocation ist the location where the tabs of a tab container should be rendered

const (
    TabLocationTop TabLocation = iota
    TabLocationLeading
    TabLocationBottom
    TabLocationTrailing
)

TabLocation values

type Toolbar Uses

type Toolbar struct {
    Items []ToolbarItem
    // contains filtered or unexported fields
}

Toolbar widget creates a horizontal list of tool buttons

func NewToolbar Uses

func NewToolbar(items ...ToolbarItem) *Toolbar

NewToolbar creates a new toolbar widget.

func (*Toolbar) Append Uses

func (t *Toolbar) Append(item ToolbarItem)

Append a new ToolbarItem to the end of this Toolbar

func (*Toolbar) ApplyTheme Uses

func (t *Toolbar) ApplyTheme()

ApplyTheme updates this widget's visuals to reflect the current theme

func (*Toolbar) CreateRenderer Uses

func (t *Toolbar) CreateRenderer() fyne.WidgetRenderer

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*Toolbar) Hide Uses

func (t *Toolbar) Hide()

Hide this widget, if it was previously visible

func (*Toolbar) MinSize Uses

func (t *Toolbar) MinSize() fyne.Size

MinSize returns the smallest size this widget can shrink to

func (*Toolbar) Move Uses

func (t *Toolbar) Move(pos fyne.Position)

Move the widget to a new position, relative to its parent. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Toolbar) Position Uses

func (w *Toolbar) Position() fyne.Position

Get the current position of this widget, relative to its parent.

func (*Toolbar) Prepend Uses

func (t *Toolbar) Prepend(item ToolbarItem)

Prepend a new ToolbarItem to the start of this Toolbar

func (*Toolbar) Resize Uses

func (t *Toolbar) Resize(size fyne.Size)

Resize sets a new size for a widget. Note this should not be used if the widget is being managed by a Layout within a Container.

func (*Toolbar) Show Uses

func (t *Toolbar) Show()

Show this widget, if it was previously hidden

func (*Toolbar) Size Uses

func (w *Toolbar) Size() fyne.Size

Get the current size of this widget.

func (*Toolbar) Visible Uses

func (w *Toolbar) Visible() bool

type ToolbarAction Uses

type ToolbarAction struct {
    Icon        fyne.Resource
    OnActivated func()
}

ToolbarAction is push button style of ToolbarItem

func (*ToolbarAction) ToolbarObject Uses

func (t *ToolbarAction) ToolbarObject() fyne.CanvasObject

ToolbarObject gets a button to render this ToolbarAction

type ToolbarItem Uses

type ToolbarItem interface {
    ToolbarObject() fyne.CanvasObject
}

ToolbarItem represents any interface element that can be added to a toolbar

func NewToolbarAction Uses

func NewToolbarAction(icon fyne.Resource, onActivated func()) ToolbarItem

NewToolbarAction returns a new push button style ToolbarItem

func NewToolbarSeparator Uses

func NewToolbarSeparator() ToolbarItem

NewToolbarSeparator returns a new separator item for a Toolbar to assist with ToolbarItem grouping

func NewToolbarSpacer Uses

func NewToolbarSpacer() ToolbarItem

NewToolbarSpacer returns a new spacer item for a Toolbar to assist with ToolbarItem alignment

type ToolbarSeparator Uses

type ToolbarSeparator struct {
}

ToolbarSeparator is a thin, visible divide that can be added to a Toolbar. This is typically used to assist visual grouping of ToolbarItems.

func (*ToolbarSeparator) ToolbarObject Uses

func (t *ToolbarSeparator) ToolbarObject() fyne.CanvasObject

ToolbarObject gets the visible line object for this ToolbarSeparator

type ToolbarSpacer Uses

type ToolbarSpacer struct {
}

ToolbarSpacer is a blank, stretchable space for a toolbar. This is typically used to assist layout if you wish some left and some right aligned items. Space will be split evebly amongst all the spacers on a toolbar.

func (*ToolbarSpacer) ToolbarObject Uses

func (t *ToolbarSpacer) ToolbarObject() fyne.CanvasObject

ToolbarObject gets the actual spacer object for this ToolbarSpacer

Package widget imports 15 packages (graph) and is imported by 14 packages. Updated 2019-10-11. Refresh now. Tools for package owners.