Documentation ¶
Overview ¶
Package widget defines the UI widgets within the Fyne toolkit
Index ¶
- func DestroyRenderer(wid fyne.Widget)
- func Refresh(wid fyne.Widget)
- func Renderer(wid fyne.Widget) fyne.WidgetRenderer
- type Box
- func (b *Box) Append(object fyne.CanvasObject)
- func (b *Box) ApplyTheme()
- func (b *Box) CreateRenderer() fyne.WidgetRenderer
- func (b *Box) Hide()
- func (b *Box) MinSize() fyne.Size
- func (b *Box) Move(pos fyne.Position)
- func (w *Box) Position() fyne.Position
- func (b *Box) Prepend(object fyne.CanvasObject)
- func (b *Box) Resize(size fyne.Size)
- func (b *Box) Show()
- func (w *Box) Size() fyne.Size
- func (w *Box) Visible() bool
- type Button
- func (b *Button) CreateRenderer() fyne.WidgetRenderer
- func (b *Button) Hide()
- func (b *Button) MinSize() fyne.Size
- func (b *Button) Move(pos fyne.Position)
- func (w *Button) Position() fyne.Position
- func (b *Button) Resize(size fyne.Size)
- func (b *Button) SetIcon(icon fyne.Resource)
- func (b *Button) SetText(text string)
- func (b *Button) Show()
- func (w *Button) Size() fyne.Size
- func (b *Button) Tapped(*fyne.PointEvent)
- func (b *Button) TappedSecondary(*fyne.PointEvent)
- func (w *Button) Visible() bool
- type ButtonStyle
- type Check
- func (c *Check) CreateRenderer() fyne.WidgetRenderer
- func (c *Check) Hide()
- func (c *Check) MinSize() fyne.Size
- func (c *Check) Move(pos fyne.Position)
- func (w *Check) Position() fyne.Position
- func (c *Check) Resize(size fyne.Size)
- func (c *Check) SetChecked(checked bool)
- func (c *Check) Show()
- func (w *Check) Size() fyne.Size
- func (c *Check) Tapped(*fyne.PointEvent)
- func (c *Check) TappedSecondary(*fyne.PointEvent)
- func (w *Check) Visible() bool
- type Entry
- func (e *Entry) CreateRenderer() fyne.WidgetRenderer
- func (e *Entry) FocusGained()
- func (e *Entry) FocusLost()
- func (e *Entry) Focused() bool
- func (e *Entry) Hide()
- func (e *Entry) MinSize() fyne.Size
- func (e *Entry) Move(pos fyne.Position)
- func (w *Entry) Position() fyne.Position
- func (e *Entry) Resize(size fyne.Size)
- func (e *Entry) SetPlaceHolder(text string)
- func (e *Entry) SetReadOnly(ro bool)
- func (e *Entry) SetText(text string)
- func (e *Entry) Show()
- func (w *Entry) Size() fyne.Size
- func (e *Entry) TypedKey(key *fyne.KeyEvent)
- func (e *Entry) TypedRune(r rune)
- func (e *Entry) TypedShortcut(shortcut fyne.Shortcut) bool
- func (w *Entry) Visible() bool
- type Form
- func (f *Form) Append(text string, widget fyne.CanvasObject)
- func (f *Form) AppendItem(item *FormItem)
- func (f *Form) CreateRenderer() fyne.WidgetRenderer
- func (f *Form) Hide()
- func (f *Form) MinSize() fyne.Size
- func (f *Form) Move(pos fyne.Position)
- func (w *Form) Position() fyne.Position
- func (f *Form) Resize(size fyne.Size)
- func (f *Form) Show()
- func (w *Form) Size() fyne.Size
- func (w *Form) Visible() bool
- type FormItem
- type Group
- func (g *Group) Append(object fyne.CanvasObject)
- func (g *Group) CreateRenderer() fyne.WidgetRenderer
- func (g *Group) Hide()
- func (g *Group) MinSize() fyne.Size
- func (g *Group) Move(pos fyne.Position)
- func (w *Group) Position() fyne.Position
- func (g *Group) Prepend(object fyne.CanvasObject)
- func (g *Group) Resize(size fyne.Size)
- func (g *Group) Show()
- func (w *Group) Size() fyne.Size
- func (w *Group) Visible() bool
- type Hyperlink
- func (hl *Hyperlink) CreateRenderer() fyne.WidgetRenderer
- func (hl *Hyperlink) Hide()
- func (hl *Hyperlink) MinSize() fyne.Size
- func (hl *Hyperlink) Move(pos fyne.Position)
- func (hl *Hyperlink) Resize(size fyne.Size)
- func (hl *Hyperlink) SetText(text string)
- func (hl *Hyperlink) SetURL(url *url.URL)
- func (hl *Hyperlink) SetURLFromString(str string) error
- func (hl *Hyperlink) Show()
- func (t *Hyperlink) String() string
- func (hl *Hyperlink) Tapped(*fyne.PointEvent)
- func (hl *Hyperlink) TappedSecondary(*fyne.PointEvent)
- type Icon
- func (i *Icon) CreateRenderer() fyne.WidgetRenderer
- func (i *Icon) Hide()
- func (i *Icon) MinSize() fyne.Size
- func (i *Icon) Move(pos fyne.Position)
- func (w *Icon) Position() fyne.Position
- func (i *Icon) Resize(size fyne.Size)
- func (i *Icon) SetResource(res fyne.Resource)
- func (i *Icon) Show()
- func (w *Icon) Size() fyne.Size
- func (w *Icon) Visible() bool
- type Label
- type ProgressBar
- func (p *ProgressBar) CreateRenderer() fyne.WidgetRenderer
- func (p *ProgressBar) Hide()
- func (p *ProgressBar) MinSize() fyne.Size
- func (p *ProgressBar) Move(pos fyne.Position)
- func (w *ProgressBar) Position() fyne.Position
- func (p *ProgressBar) Resize(size fyne.Size)
- func (p *ProgressBar) SetValue(v float64)
- func (p *ProgressBar) Show()
- func (w *ProgressBar) Size() fyne.Size
- func (w *ProgressBar) Visible() bool
- type ProgressBarInfinite
- func (p *ProgressBarInfinite) CreateRenderer() fyne.WidgetRenderer
- func (p *ProgressBarInfinite) Hide()
- func (p *ProgressBarInfinite) MinSize() fyne.Size
- func (p *ProgressBarInfinite) Move(pos fyne.Position)
- func (w *ProgressBarInfinite) Position() fyne.Position
- func (p *ProgressBarInfinite) Resize(size fyne.Size)
- func (p *ProgressBarInfinite) Running() bool
- func (p *ProgressBarInfinite) Show()
- func (w *ProgressBarInfinite) Size() fyne.Size
- func (p *ProgressBarInfinite) Start()
- func (p *ProgressBarInfinite) Stop()
- func (w *ProgressBarInfinite) Visible() bool
- type Radio
- func (r *Radio) CreateRenderer() fyne.WidgetRenderer
- func (r *Radio) Hide()
- func (r *Radio) MinSize() fyne.Size
- func (r *Radio) Move(pos fyne.Position)
- func (w *Radio) Position() fyne.Position
- func (r *Radio) Resize(size fyne.Size)
- func (r *Radio) Show()
- func (w *Radio) Size() fyne.Size
- func (r *Radio) Tapped(event *fyne.PointEvent)
- func (r *Radio) TappedSecondary(*fyne.PointEvent)
- func (w *Radio) Visible() bool
- type ScrollContainer
- func (s *ScrollContainer) CreateRenderer() fyne.WidgetRenderer
- func (s *ScrollContainer) Hide()
- func (s *ScrollContainer) MinSize() fyne.Size
- func (s *ScrollContainer) Move(pos fyne.Position)
- func (w *ScrollContainer) Position() fyne.Position
- func (s *ScrollContainer) Resize(size fyne.Size)
- func (s *ScrollContainer) Scrolled(ev *fyne.ScrollEvent)
- func (s *ScrollContainer) Show()
- func (w *ScrollContainer) Size() fyne.Size
- func (w *ScrollContainer) Visible() bool
- type TabContainer
- func (t *TabContainer) CreateRenderer() fyne.WidgetRenderer
- func (t *TabContainer) CurrentTab() *TabItem
- func (t *TabContainer) CurrentTabIndex() int
- func (t *TabContainer) Hide()
- func (t *TabContainer) MinSize() fyne.Size
- func (t *TabContainer) Move(pos fyne.Position)
- func (w *TabContainer) Position() fyne.Position
- func (t *TabContainer) Resize(size fyne.Size)
- func (t *TabContainer) SelectTab(item *TabItem)
- func (t *TabContainer) SelectTabIndex(index int)
- func (t *TabContainer) Show()
- func (w *TabContainer) Size() fyne.Size
- func (w *TabContainer) Visible() bool
- type TabItem
- type Toolbar
- func (t *Toolbar) Append(item ToolbarItem)
- func (t *Toolbar) ApplyTheme()
- func (t *Toolbar) CreateRenderer() fyne.WidgetRenderer
- func (t *Toolbar) Hide()
- func (t *Toolbar) MinSize() fyne.Size
- func (t *Toolbar) Move(pos fyne.Position)
- func (w *Toolbar) Position() fyne.Position
- func (t *Toolbar) Prepend(item ToolbarItem)
- func (t *Toolbar) Resize(size fyne.Size)
- func (t *Toolbar) Show()
- func (w *Toolbar) Size() fyne.Size
- func (w *Toolbar) Visible() bool
- type ToolbarAction
- type ToolbarItem
- type ToolbarSeparator
- type ToolbarSpacer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DestroyRenderer ¶
DestroyRenderer frees a render implementation for a widget. This is typically for internal use only.
Types ¶
type Box ¶
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 ¶
func NewHBox(children ...fyne.CanvasObject) *Box
NewHBox creates a new horizontally aligned box widget with the specified list of child objects
func NewVBox ¶
func NewVBox(children ...fyne.CanvasObject) *Box
NewVBox creates a new vertically aligned box widget with the specified list of child objects
func (*Box) Append ¶
func (b *Box) Append(object fyne.CanvasObject)
Append adds a new CanvasObject to the end/right of the box
func (*Box) ApplyTheme ¶
func (b *Box) ApplyTheme()
ApplyTheme updates this box to match the current theme
func (*Box) CreateRenderer ¶
func (b *Box) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*Box) Move ¶
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*Box) Prepend ¶
func (b *Box) Prepend(object fyne.CanvasObject)
Prepend inserts a new CanvasObject at the top/left of the box
type Button ¶
type Button struct { Text string Style ButtonStyle Icon fyne.Resource OnTapped func() `json:"-"` // contains filtered or unexported fields }
Button widget has a text label and triggers an event func when clicked
func NewButtonWithIcon ¶
NewButtonWithIcon creates a new button widget with the specified label, themed icon and tap handler
func (*Button) CreateRenderer ¶
func (b *Button) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*Button) Move ¶
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*Button) Resize ¶
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) Tapped ¶
func (b *Button) Tapped(*fyne.PointEvent)
Tapped is called when a pointer tapped event is captured and triggers any tap handler
func (*Button) TappedSecondary ¶
func (b *Button) TappedSecondary(*fyne.PointEvent)
TappedSecondary is called when a secondary pointer tapped event is captured
type ButtonStyle ¶
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 ¶
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 (*Check) CreateRenderer ¶
func (c *Check) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*Check) Move ¶
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*Check) Resize ¶
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 ¶
SetChecked sets the the checked state and refreshes widget
func (*Check) Tapped ¶
func (c *Check) Tapped(*fyne.PointEvent)
Tapped is called when a pointer tapped event is captured and triggers any change handler
func (*Check) TappedSecondary ¶
func (c *Check) TappedSecondary(*fyne.PointEvent)
TappedSecondary is called when a secondary pointer tapped event is captured
type Entry ¶
type Entry struct { Text string PlaceHolder string OnChanged func(string) `json:"-"` Password bool ReadOnly bool MultiLine bool CursorRow, CursorColumn int // contains filtered or unexported fields }
Entry widget allows simple text to be input when focused.
func NewMultiLineEntry ¶
func NewMultiLineEntry() *Entry
NewMultiLineEntry creates a new entry that allows multiple lines
func NewPasswordEntry ¶
func NewPasswordEntry() *Entry
NewPasswordEntry creates a new entry password widget
func (*Entry) CreateRenderer ¶
func (e *Entry) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*Entry) FocusGained ¶
func (e *Entry) FocusGained()
FocusGained is called when the Entry has been given focus.
func (*Entry) FocusLost ¶
func (e *Entry) FocusLost()
FocusLost is called when the Entry has had focus removed.
func (*Entry) Move ¶
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*Entry) Resize ¶
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 ¶
SetPlaceHolder sets the text that will be displayed if the entry is otherwise empty
func (*Entry) SetReadOnly ¶
SetReadOnly sets whether or not the Entry should not be editable
func (*Entry) TypedShortcut ¶
TypedShortcut implements the Shortcutable interface
type Form ¶
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 ¶
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 ¶
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 ¶
AppendItem adds the specified row to the end of the Form
func (*Form) CreateRenderer ¶
func (f *Form) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*Form) Move ¶
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
type FormItem ¶
type FormItem struct { Text string Widget fyne.CanvasObject }
FormItem provides the details for a row in a form
type Group ¶
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 ¶
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 ¶
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 ¶
func (g *Group) Append(object fyne.CanvasObject)
Append adds a new CanvasObject to the end of the group
func (*Group) CreateRenderer ¶
func (g *Group) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*Group) Move ¶
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*Group) Prepend ¶
func (g *Group) Prepend(object fyne.CanvasObject)
Prepend inserts a new CanvasObject at the top of the group
type Hyperlink ¶
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 ¶
NewHyperlink creates a new hyperlink widget with the set text content
func NewHyperlinkWithStyle ¶
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 ¶
func (hl *Hyperlink) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*Hyperlink) Move ¶
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*Hyperlink) Resize ¶
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) SetURLFromString ¶
SetURLFromString sets the URL of the hyperlink, taking in a string type
func (*Hyperlink) String ¶
func (t *Hyperlink) String() string
String returns the text widget buffer as string
func (*Hyperlink) Tapped ¶
func (hl *Hyperlink) Tapped(*fyne.PointEvent)
Tapped is called when a pointer tapped event is captured and triggers any change handler
func (*Hyperlink) TappedSecondary ¶
func (hl *Hyperlink) TappedSecondary(*fyne.PointEvent)
TappedSecondary is called when a secondary pointer tapped event is captured
type Icon ¶
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 (*Icon) CreateRenderer ¶
func (i *Icon) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*Icon) Move ¶
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*Icon) Resize ¶
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 ¶
SetResource updates the resource rendered in this icon widget
type Label ¶
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 NewLabelWithStyle ¶
NewLabelWithStyle creates a new label widget with the set text content
func (*Label) CreateRenderer ¶
func (l *Label) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*Label) Move ¶
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
type ProgressBar ¶
type ProgressBar struct {
Min, Max, Value float64
// contains filtered or unexported fields
}
ProgressBar widget creates a horizontal panel that indicates progress
func NewProgressBar ¶
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 ¶
func (p *ProgressBar) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*ProgressBar) Hide ¶
func (p *ProgressBar) Hide()
Hide this widget, if it was previously visible
func (*ProgressBar) MinSize ¶
func (p *ProgressBar) MinSize() fyne.Size
MinSize returns the smallest size this widget can shrink to
func (*ProgressBar) Move ¶
func (p *ProgressBar) Move(pos fyne.Position)
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*ProgressBar) Resize ¶
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 ¶
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 ¶
func (p *ProgressBar) Show()
Show this widget, if it was previously hidden
type ProgressBarInfinite ¶
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 ¶
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 ¶
func (p *ProgressBarInfinite) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*ProgressBarInfinite) Hide ¶
func (p *ProgressBarInfinite) Hide()
Hide this widget, if it was previously visible
func (*ProgressBarInfinite) MinSize ¶
func (p *ProgressBarInfinite) MinSize() fyne.Size
MinSize returns the smallest size this widget can shrink to
func (*ProgressBarInfinite) Move ¶
func (p *ProgressBarInfinite) Move(pos fyne.Position)
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*ProgressBarInfinite) Position ¶
Get the current position of this widget, relative to it's parent.
func (*ProgressBarInfinite) Resize ¶
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 ¶
func (p *ProgressBarInfinite) Running() bool
Running returns the current state of the infinite progress animation
func (*ProgressBarInfinite) Show ¶
func (p *ProgressBarInfinite) Show()
Show this widget, if it was previously hidden
func (*ProgressBarInfinite) Start ¶
func (p *ProgressBarInfinite) Start()
Start the infinite progress bar background thread to update it continuously
func (*ProgressBarInfinite) Stop ¶
func (p *ProgressBarInfinite) Stop()
Stop the infinite progress goroutine and sets value to the Max
type Radio ¶
type Radio struct { Options []string Selected string OnChanged func(string) `json:"-"` // 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 (*Radio) CreateRenderer ¶
func (r *Radio) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*Radio) Move ¶
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*Radio) Resize ¶
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) Tapped ¶
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 ¶
func (r *Radio) TappedSecondary(*fyne.PointEvent)
TappedSecondary is called when a secondary pointer tapped event is captured
type ScrollContainer ¶
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 ¶
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 ¶
func (s *ScrollContainer) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*ScrollContainer) Hide ¶
func (s *ScrollContainer) Hide()
Hide this widget, if it was previously visible
func (*ScrollContainer) MinSize ¶
func (s *ScrollContainer) MinSize() fyne.Size
MinSize returns the smallest size this widget can shrink to
func (*ScrollContainer) Move ¶
func (s *ScrollContainer) Move(pos fyne.Position)
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*ScrollContainer) Position ¶
Get the current position of this widget, relative to it's parent.
func (*ScrollContainer) Resize ¶
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 ¶
func (s *ScrollContainer) Scrolled(ev *fyne.ScrollEvent)
Scrolled is called when an input device triggers a scroll event
func (*ScrollContainer) Show ¶
func (s *ScrollContainer) Show()
Show this widget, if it was previously hidden
type TabContainer ¶
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 ¶
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 ¶
func (t *TabContainer) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*TabContainer) CurrentTab ¶
func (t *TabContainer) CurrentTab() *TabItem
CurrentTab returns the currently selected TabItem.
func (*TabContainer) CurrentTabIndex ¶
func (t *TabContainer) CurrentTabIndex() int
CurrentTabIndex returns the index of the currently selected TabItem.
func (*TabContainer) Hide ¶
func (t *TabContainer) Hide()
Hide this widget, if it was previously visible
func (*TabContainer) MinSize ¶
func (t *TabContainer) MinSize() fyne.Size
MinSize returns the smallest size this widget can shrink to
func (*TabContainer) Move ¶
func (t *TabContainer) Move(pos fyne.Position)
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*TabContainer) Resize ¶
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 ¶
func (t *TabContainer) SelectTab(item *TabItem)
SelectTab sets the specified TabItem to be selected and it's content visible.
func (*TabContainer) SelectTabIndex ¶
func (t *TabContainer) SelectTabIndex(index int)
SelectTabIndex sets the TabItem at the specifie index to be selected and it's content visible.
func (*TabContainer) Show ¶
func (t *TabContainer) Show()
Show this widget, if it was previously hidden
type TabItem ¶
type TabItem struct { Text string Content fyne.CanvasObject }
TabItem represents a single view in a TabContainer. The Text is used for the tab button and the Content is shown when the corresponding tab is active.
func NewTabItem ¶
func NewTabItem(text string, content fyne.CanvasObject) *TabItem
NewTabItem creates a new item for a tabbed widget - each item specifies the content an a label for it's tab.
type Toolbar ¶
type Toolbar struct { Items []ToolbarItem // contains filtered or unexported fields }
Toolbar widget creates a horizontal list of tool buttons
func NewToolbar ¶
func NewToolbar(items ...ToolbarItem) *Toolbar
NewToolbar creates a new toolbar widget.
func (*Toolbar) Append ¶
func (t *Toolbar) Append(item ToolbarItem)
Append a new ToolbarItem to the end of this Toolbar
func (*Toolbar) ApplyTheme ¶
func (t *Toolbar) ApplyTheme()
ApplyTheme updates this widget's visuals to reflect the current theme
func (*Toolbar) CreateRenderer ¶
func (t *Toolbar) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*Toolbar) Move ¶
Move the widget to a new position, relative to it's parent. Note this should not be used if the widget is being managed by a Layout within a Container.
func (*Toolbar) Prepend ¶
func (t *Toolbar) Prepend(item ToolbarItem)
Prepend a new ToolbarItem to the start of this Toolbar
type ToolbarAction ¶
ToolbarAction is push button style of ToolbarItem
func (*ToolbarAction) ToolbarObject ¶
func (t *ToolbarAction) ToolbarObject() fyne.CanvasObject
ToolbarObject gets a button to render this ToolbarAction
type ToolbarItem ¶
type ToolbarItem interface {
ToolbarObject() fyne.CanvasObject
}
ToolbarItem represents any interface element that can be added to a toolbar
func NewToolbarAction ¶
func NewToolbarAction(icon fyne.Resource, onActivated func()) ToolbarItem
NewToolbarAction returns a new push button style ToolbarItem
func NewToolbarSeparator ¶
func NewToolbarSeparator() ToolbarItem
NewToolbarSeparator returns a new separator item for a Toolbar to assist with ToolbarItem grouping
func NewToolbarSpacer ¶
func NewToolbarSpacer() ToolbarItem
NewToolbarSpacer returns a new spacer item for a Toolbar to assist with ToolbarItem alignment
type ToolbarSeparator ¶
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 ¶
func (t *ToolbarSeparator) ToolbarObject() fyne.CanvasObject
ToolbarObject gets the visible line object for this ToolbarSeparator
type ToolbarSpacer ¶
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 ¶
func (t *ToolbarSpacer) ToolbarObject() fyne.CanvasObject
ToolbarObject gets the actual spacer object for this ToolbarSpacer