Documentation ¶
Overview ¶
Package widget defines the UI widgets within the Fyne toolkit
Index ¶
- func DestroyRenderer(wid fyne.Widget)deprecated
- func Refresh(wid fyne.Widget)deprecated
- func Renderer(wid fyne.Widget) fyne.WidgetRendererdeprecated
- func ShowModalPopUp(content fyne.CanvasObject, canvas fyne.Canvas)
- func ShowPopUp(content fyne.CanvasObject, canvas fyne.Canvas)
- func ShowPopUpAtPosition(content fyne.CanvasObject, canvas fyne.Canvas, pos fyne.Position)
- func ShowPopUpMenuAtPosition(menu *fyne.Menu, c fyne.Canvas, pos fyne.Position)
- type Accordion
- func (a *Accordion) Append(item *AccordionItem)
- func (a *Accordion) Close(index int)
- func (a *Accordion) CloseAll()
- func (a *Accordion) CreateRenderer() fyne.WidgetRenderer
- func (a *Accordion) MinSize() fyne.Size
- func (a *Accordion) Open(index int)
- func (a *Accordion) OpenAll()
- func (a *Accordion) Remove(item *AccordionItem)
- func (a *Accordion) RemoveIndex(index int)
- type AccordionContainerdeprecated
- type AccordionItem
- type BaseWidget
- func (w *BaseWidget) ExtendBaseWidget(wid fyne.Widget)
- func (w *BaseWidget) Hide()
- func (w *BaseWidget) MinSize() fyne.Size
- func (w *BaseWidget) Move(pos fyne.Position)
- func (w *BaseWidget) Position() fyne.Position
- func (w *BaseWidget) Refresh()
- func (w *BaseWidget) Resize(size fyne.Size)
- func (w *BaseWidget) Show()
- func (w *BaseWidget) Size() fyne.Size
- func (w *BaseWidget) Visible() bool
- type Box
- type Button
- func (b *Button) CreateRenderer() fyne.WidgetRenderer
- func (b *Button) Cursor() desktop.Cursor
- func (b *Button) MinSize() fyne.Size
- func (b *Button) MouseIn(*desktop.MouseEvent)
- func (b *Button) MouseMoved(*desktop.MouseEvent)
- func (b *Button) MouseOut()
- func (b *Button) SetIcon(icon fyne.Resource)
- func (b *Button) SetText(text string)
- func (b *Button) Tapped(*fyne.PointEvent)
- type ButtonAlign
- type ButtonIconPlacement
- type ButtonImportance
- type ButtonStyle
- type Card
- type Check
- func (c *Check) CreateRenderer() fyne.WidgetRenderer
- func (c *Check) FocusGained()
- func (c *Check) FocusLost()
- func (c *Check) Focused() booldeprecated
- func (c *Check) Hide()
- func (c *Check) MinSize() fyne.Size
- func (c *Check) MouseIn(*desktop.MouseEvent)
- func (c *Check) MouseMoved(*desktop.MouseEvent)
- func (c *Check) MouseOut()
- func (c *Check) SetChecked(checked bool)
- func (c *Check) Tapped(*fyne.PointEvent)
- func (c *Check) TypedKey(key *fyne.KeyEvent)
- func (c *Check) TypedRune(r rune)
- type CustomTextGridStyle
- type DisableableWidget
- type Entry
- func (e *Entry) CreateRenderer() fyne.WidgetRenderer
- func (e *Entry) Cursor() desktop.Cursor
- func (e *Entry) Disable()
- func (e *Entry) Disabled() bool
- func (e *Entry) DoubleTapped(_ *fyne.PointEvent)
- func (e *Entry) DragEnd()
- func (e *Entry) Dragged(d *fyne.DragEvent)
- func (e *Entry) Enable()
- func (e *Entry) ExtendBaseWidget(wid fyne.Widget)
- func (e *Entry) FocusGained()
- func (e *Entry) FocusLost()
- func (e *Entry) Focused() booldeprecated
- func (e *Entry) Hide()
- func (e *Entry) KeyDown(key *fyne.KeyEvent)
- func (e *Entry) KeyUp(key *fyne.KeyEvent)
- func (e *Entry) Keyboard() mobile.KeyboardType
- func (e *Entry) MinSize() fyne.Size
- func (e *Entry) MouseDown(m *desktop.MouseEvent)
- func (e *Entry) MouseUp(_ *desktop.MouseEvent)
- func (e *Entry) SelectedText() string
- func (e *Entry) SetOnValidationChanged(callback func(error))
- func (e *Entry) SetPlaceHolder(text string)
- func (e *Entry) SetReadOnly(ro bool)deprecated
- func (e *Entry) SetText(text string)
- func (e *Entry) SetValidationError(err error)
- func (e *Entry) Tapped(ev *fyne.PointEvent)
- func (e *Entry) TappedSecondary(pe *fyne.PointEvent)
- func (e *Entry) TypedKey(key *fyne.KeyEvent)
- func (e *Entry) TypedRune(r rune)
- func (e *Entry) TypedShortcut(shortcut fyne.Shortcut)
- func (e *Entry) Validate() error
- type FileIcon
- type Form
- type FormItem
- type Group
- type Hyperlink
- func (hl *Hyperlink) CreateRenderer() fyne.WidgetRenderer
- func (hl *Hyperlink) Cursor() desktop.Cursor
- func (hl *Hyperlink) MinSize() fyne.Size
- 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) Tapped(*fyne.PointEvent)
- type Icon
- type Label
- type List
- type ListItemID
- type Menu
- func (m *Menu) CreateRenderer() fyne.WidgetRenderer
- func (m *Menu) DeactivateChild()
- func (m *Menu) Dismiss()
- func (m *Menu) Hide()
- func (m *Menu) MinSize() fyne.Size
- func (m *Menu) Move(pos fyne.Position)
- func (m *Menu) Refresh()
- func (m *Menu) Resize(size fyne.Size)
- func (m *Menu) Show()
- func (m *Menu) Tapped(*fyne.PointEvent)
- type Orientation
- type PopUp
- func NewModalPopUp(content fyne.CanvasObject, canvas fyne.Canvas) *PopUpdeprecated
- func NewPopUp(content fyne.CanvasObject, canvas fyne.Canvas) *PopUpdeprecated
- func NewPopUpAtPosition(content fyne.CanvasObject, canvas fyne.Canvas, pos fyne.Position) *PopUpdeprecated
- func NewPopUpMenu(menu *fyne.Menu, c fyne.Canvas) *PopUpdeprecated
- func NewPopUpMenuAtPosition(menu *fyne.Menu, c fyne.Canvas, pos fyne.Position) *PopUpdeprecated
- func (p *PopUp) CreateRenderer() fyne.WidgetRenderer
- func (p *PopUp) Hide()
- func (p *PopUp) MinSize() fyne.Size
- func (p *PopUp) Move(pos fyne.Position)
- func (p *PopUp) Resize(size fyne.Size)
- func (p *PopUp) Show()
- func (p *PopUp) ShowAtPosition(pos fyne.Position)
- func (p *PopUp) Tapped(_ *fyne.PointEvent)
- func (p *PopUp) TappedSecondary(_ *fyne.PointEvent)
- type PopUpMenu
- type ProgressBar
- type ProgressBarInfinite
- func (p *ProgressBarInfinite) CreateRenderer() fyne.WidgetRenderer
- func (p *ProgressBarInfinite) Hide()
- func (p *ProgressBarInfinite) MinSize() fyne.Size
- func (p *ProgressBarInfinite) Running() bool
- func (p *ProgressBarInfinite) Show()
- func (p *ProgressBarInfinite) Start()
- func (p *ProgressBarInfinite) Stop()
- type Radiodeprecated
- func (r *Radio) Append(option string)
- func (r *Radio) CreateRenderer() fyne.WidgetRenderer
- func (r *Radio) MinSize() fyne.Size
- func (r *Radio) MouseIn(event *desktop.MouseEvent)
- func (r *Radio) MouseMoved(event *desktop.MouseEvent)
- func (r *Radio) MouseOut()
- func (r *Radio) SetSelected(option string)
- func (r *Radio) Tapped(event *fyne.PointEvent)
- type RadioGroup
- type ScrollContainerdeprecated
- func (s *ScrollContainer) CreateRenderer() fyne.WidgetRenderer
- func (s *ScrollContainer) DragEnd()
- func (s *ScrollContainer) Dragged(e *fyne.DragEvent)
- func (s *ScrollContainer) MinSize() fyne.Size
- func (s *ScrollContainer) Refresh()
- func (s *ScrollContainer) Resize(size fyne.Size)
- func (s *ScrollContainer) ScrollToBottom()
- func (s *ScrollContainer) ScrollToTop()
- func (s *ScrollContainer) Scrolled(ev *fyne.ScrollEvent)
- func (s *ScrollContainer) SetMinSize(size fyne.Size)
- type ScrollDirectiondeprecated
- type Select
- func (s *Select) ClearSelected()
- func (s *Select) CreateRenderer() fyne.WidgetRenderer
- func (s *Select) FocusGained()
- func (s *Select) FocusLost()
- func (s *Select) Focused() booldeprecated
- func (s *Select) Hide()
- func (s *Select) MinSize() fyne.Size
- func (s *Select) MouseIn(*desktop.MouseEvent)
- func (s *Select) MouseMoved(*desktop.MouseEvent)
- func (s *Select) MouseOut()
- func (s *Select) Move(pos fyne.Position)
- func (s *Select) Resize(size fyne.Size)
- func (s *Select) SelectedIndex() int
- func (s *Select) SetSelected(text string)
- func (s *Select) SetSelectedIndex(index int)
- func (s *Select) Tapped(*fyne.PointEvent)
- func (s *Select) TypedKey(event *fyne.KeyEvent)
- func (s *Select) TypedRune(_ rune)
- type SelectEntry
- type Separator
- type Slider
- type SplitContainerdeprecated
- type TabContainerdeprecated
- func (c *TabContainer) Append(item *TabItem)
- func (c *TabContainer) CreateRenderer() fyne.WidgetRenderer
- func (c *TabContainer) CurrentTab() *TabItem
- func (c *TabContainer) CurrentTabIndex() int
- func (c *TabContainer) MinSize() fyne.Size
- func (c *TabContainer) Remove(item *TabItem)
- func (c *TabContainer) RemoveIndex(index int)
- func (c *TabContainer) SelectTab(item *TabItem)
- func (c *TabContainer) SelectTabIndex(index int)
- func (c *TabContainer) SetItems(items []*TabItem)
- func (c *TabContainer) SetTabLocation(l TabLocation)
- func (c *TabContainer) Show()
- type TabItemdeprecated
- type TabLocationdeprecated
- type Table
- type TableCellID
- type TextGrid
- func (t *TextGrid) CreateRenderer() fyne.WidgetRenderer
- func (t *TextGrid) MinSize() fyne.Size
- func (t *TextGrid) Resize(size fyne.Size)
- func (t *TextGrid) Row(row int) TextGridRow
- func (t *TextGrid) RowText(row int) string
- func (t *TextGrid) SetCell(row, col int, cell TextGridCell)
- func (t *TextGrid) SetRow(row int, content TextGridRow)
- func (t *TextGrid) SetRowStyle(row int, style TextGridStyle)
- func (t *TextGrid) SetRune(row, col int, r rune)
- func (t *TextGrid) SetStyle(row, col int, style TextGridStyle)
- func (t *TextGrid) SetStyleRange(startRow, startCol, endRow, endCol int, style TextGridStyle)
- func (t *TextGrid) SetText(text string)
- func (t *TextGrid) Text() string
- type TextGridCell
- type TextGridRow
- type TextGridStyle
- type Toolbar
- type ToolbarAction
- type ToolbarItem
- type ToolbarSeparator
- type ToolbarSpacer
- type Tree
- func (t *Tree) CloseAllBranches()
- func (t *Tree) CloseBranch(uid TreeNodeID)
- func (t *Tree) CreateRenderer() fyne.WidgetRenderer
- func (t *Tree) IsBranchOpen(uid TreeNodeID) bool
- func (t *Tree) MinSize() fyne.Size
- func (t *Tree) OpenAllBranches()
- func (t *Tree) OpenBranch(uid TreeNodeID)
- func (t *Tree) Resize(size fyne.Size)
- func (t *Tree) Select(uid TreeNodeID)
- func (t *Tree) ToggleBranch(uid string)
- func (t *Tree) Unselect(uid TreeNodeID)
- type TreeNodeID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DestroyRenderer
deprecated
func Renderer
deprecated
func Renderer(wid fyne.Widget) fyne.WidgetRenderer
Renderer looks up the render implementation for a widget
Deprecated: Access to widget renderers is being removed, render details should be private to a WidgetRenderer.
func ShowModalPopUp ¶ added in v1.3.0
func ShowModalPopUp(content fyne.CanvasObject, canvas fyne.Canvas)
ShowModalPopUp 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 ShowPopUp ¶ added in v1.3.0
func ShowPopUp(content fyne.CanvasObject, canvas fyne.Canvas)
ShowPopUp creates a new popUp for the specified content and displays it on the passed canvas.
func ShowPopUpAtPosition ¶ added in v1.3.0
ShowPopUpAtPosition creates a new popUp for the specified content at the specified absolute position. It will then display the popup on the passed canvas.
func ShowPopUpMenuAtPosition ¶ added in v1.3.0
ShowPopUpMenuAtPosition creates a PopUp menu populated with items from the passed menu structure. It will automatically be positioned at the provided location and shown as an overlay on the specified canvas.
Types ¶
type Accordion ¶ added in v1.4.0
type Accordion struct { BaseWidget Items []*AccordionItem MultiOpen bool }
Accordion displays a list of AccordionItems. Each item is represented by a button that reveals a detailed view when tapped.
func NewAccordion ¶ added in v1.4.0
func NewAccordion(items ...*AccordionItem) *Accordion
NewAccordion creates a new accordion widget.
func (*Accordion) Append ¶ added in v1.4.0
func (a *Accordion) Append(item *AccordionItem)
Append adds the given item to this Accordion.
func (*Accordion) CloseAll ¶ added in v1.4.0
func (a *Accordion) CloseAll()
CloseAll collapses all items.
func (*Accordion) CreateRenderer ¶ added in v1.4.0
func (a *Accordion) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*Accordion) MinSize ¶ added in v1.4.0
MinSize returns the size that this widget should not shrink below.
func (*Accordion) OpenAll ¶ added in v1.4.0
func (a *Accordion) OpenAll()
OpenAll expands all items.
func (*Accordion) Remove ¶ added in v1.4.0
func (a *Accordion) Remove(item *AccordionItem)
Remove deletes the given item from this Accordion.
func (*Accordion) RemoveIndex ¶ added in v1.4.0
RemoveIndex deletes the item at the given index from this Accordion.
type AccordionContainer
deprecated
added in
v1.3.0
type AccordionContainer = Accordion
AccordionContainer displays a list of AccordionItems. Each item is represented by a button that reveals a detailed view when tapped.
Deprecated: This has been renamed to Accordion
func NewAccordionContainer
deprecated
added in
v1.3.0
func NewAccordionContainer(items ...*AccordionItem) *AccordionContainer
NewAccordionContainer creates a new accordion widget.
Deprecated: Use NewAccordion instead
type AccordionItem ¶ added in v1.3.0
type AccordionItem struct { Title string Detail fyne.CanvasObject Open bool }
AccordionItem represents a single item in an Accordion.
func NewAccordionItem ¶ added in v1.3.0
func NewAccordionItem(title string, detail fyne.CanvasObject) *AccordionItem
NewAccordionItem creates a new item for an Accordion.
type BaseWidget ¶ added in v1.2.0
type BaseWidget struct { Hidden bool // contains filtered or unexported fields }
BaseWidget provides a helper that handles basic widget behaviours.
func (*BaseWidget) ExtendBaseWidget ¶ added in v1.2.0
func (w *BaseWidget) ExtendBaseWidget(wid fyne.Widget)
ExtendBaseWidget is used by an extending widget to make use of BaseWidget functionality.
func (*BaseWidget) Hide ¶ added in v1.2.0
func (w *BaseWidget) Hide()
Hide this widget so it is no longer visible
func (*BaseWidget) MinSize ¶ added in v1.2.0
func (w *BaseWidget) MinSize() fyne.Size
MinSize for the widget - it should never be resized below this value.
func (*BaseWidget) Move ¶ added in v1.2.0
func (w *BaseWidget) 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 (*BaseWidget) Position ¶ added in v1.2.0
func (w *BaseWidget) Position() fyne.Position
Position gets the current position of this widget, relative to its parent.
func (*BaseWidget) Refresh ¶ added in v1.2.0
func (w *BaseWidget) Refresh()
Refresh causes this widget to be redrawn in it's current state
func (*BaseWidget) Resize ¶ added in v1.2.0
func (w *BaseWidget) 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 (*BaseWidget) Show ¶ added in v1.2.0
func (w *BaseWidget) Show()
Show this widget so it becomes visible
func (*BaseWidget) Size ¶ added in v1.2.0
func (w *BaseWidget) Size() fyne.Size
Size gets the current size of this widget.
func (*BaseWidget) Visible ¶ added in v1.2.0
func (w *BaseWidget) Visible() bool
Visible returns whether or not this widget should be visible. Note that this may not mean it is currently visible if a parent has been hidden.
type Box ¶
type Box struct { BaseWidget 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. Deprecated: Use container.NewVBox() or container.NewHBox().
func NewHBox ¶
func NewHBox(children ...fyne.CanvasObject) *Box
NewHBox creates a new horizontally aligned box widget with the specified list of child objects. Deprecated: Use container.NewHBox() instead.
func NewVBox ¶
func NewVBox(children ...fyne.CanvasObject) *Box
NewVBox creates a new vertically aligned box widget with the specified list of child objects. Deprecated: Use container.NewVBox() instead.
func (*Box) Append ¶
func (b *Box) Append(object fyne.CanvasObject)
Append adds a new CanvasObject to the end/right of the box
func (*Box) CreateRenderer ¶
func (b *Box) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
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 { DisableableWidget Text string // Deprecated, use Importance instead, where HighImportance matches PrimaryButton Style ButtonStyle Icon fyne.Resource // Specify how prominent the button should be, High will highlight the button and Low will remove some decoration. // // Since: 1.4 Importance ButtonImportance Alignment ButtonAlign IconPlacement ButtonIconPlacement OnTapped func() `json:"-"` // Deprecated: use Importance = LowImportance instead of HideShadow = true. HideShadow bool // 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 its renderer
func (*Button) MouseIn ¶ added in v1.1.0
func (b *Button) MouseIn(*desktop.MouseEvent)
MouseIn is called when a desktop pointer enters the widget
func (*Button) MouseMoved ¶ added in v1.1.0
func (b *Button) MouseMoved(*desktop.MouseEvent)
MouseMoved is called when a desktop pointer hovers over the widget
func (*Button) MouseOut ¶ added in v1.1.0
func (b *Button) MouseOut()
MouseOut is called when a desktop pointer exits the widget
func (*Button) Tapped ¶
func (b *Button) Tapped(*fyne.PointEvent)
Tapped is called when a pointer tapped event is captured and triggers any tap handler
type ButtonAlign ¶ added in v1.3.0
type ButtonAlign int
ButtonAlign represents the horizontal alignment of a button.
const ( // ButtonAlignCenter aligns the icon and the text centrally. ButtonAlignCenter ButtonAlign = iota // ButtonAlignLeading aligns the icon and the text with the leading edge. ButtonAlignLeading // ButtonAlignTrailing aligns the icon and the text with the trailing edge. ButtonAlignTrailing )
type ButtonIconPlacement ¶ added in v1.3.0
type ButtonIconPlacement int
ButtonIconPlacement represents the ordering of icon & text within a button.
const ( // ButtonIconLeadingText aligns the icon on the leading edge of the text. ButtonIconLeadingText ButtonIconPlacement = iota // ButtonIconTrailingText aligns the icon on the trailing edge of the text. ButtonIconTrailingText )
type ButtonImportance ¶ added in v1.4.0
type ButtonImportance int
ButtonImportance represents how prominent the button should appear
Since: 1.4
const ( // MediumImportance applies a standard appearance. MediumImportance ButtonImportance = iota // HighImportance applies a prominent appearance. HighImportance // LowImportance applies a subtle appearance. LowImportance )
type ButtonStyle ¶
type ButtonStyle int
ButtonStyle determines the behaviour and rendering of a button.
const ( // DefaultButton is the standard button style. // Deprecated: use Importance = MediumImportance instead. DefaultButton ButtonStyle = iota // PrimaryButton that should be more prominent to the user. // Deprecated: use Importance = HighImportance instead. PrimaryButton )
type Card ¶ added in v1.4.0
type Card struct { BaseWidget Title, Subtitle string Image *canvas.Image Content fyne.CanvasObject }
Card widget groups title, subtitle with content and a header image
Since: 1.4
func NewCard ¶ added in v1.4.0
func NewCard(title, subtitle string, content fyne.CanvasObject) *Card
NewCard creates a new card widget with the specified title, subtitle and content (all optional).
Since: 1.4
func (*Card) CreateRenderer ¶ added in v1.4.0
func (c *Card) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*Card) MinSize ¶ added in v1.4.0
MinSize returns the size that this widget should not shrink below
func (*Card) SetContent ¶ added in v1.4.0
func (c *Card) SetContent(obj fyne.CanvasObject)
SetContent changes the body of this card to have the specified content.
func (*Card) SetImage ¶ added in v1.4.0
SetImage changes the image displayed above the title for this card.
func (*Card) SetSubTitle ¶ added in v1.4.0
SetSubTitle updates the secondary title for this card.
type Check ¶
type Check struct { DisableableWidget 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 its renderer
func (*Check) FocusGained ¶ added in v1.1.0
func (c *Check) FocusGained()
FocusGained is called when the Check has been given focus.
func (*Check) FocusLost ¶ added in v1.1.0
func (c *Check) FocusLost()
FocusLost is called when the Check has had focus removed.
func (*Check) MouseIn ¶ added in v1.1.0
func (c *Check) MouseIn(*desktop.MouseEvent)
MouseIn is called when a desktop pointer enters the widget
func (*Check) MouseMoved ¶ added in v1.1.0
func (c *Check) MouseMoved(*desktop.MouseEvent)
MouseMoved is called when a desktop pointer hovers over the widget
func (*Check) MouseOut ¶ added in v1.1.0
func (c *Check) MouseOut()
MouseOut is called when a desktop pointer exits the widget
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
type CustomTextGridStyle ¶ added in v1.3.0
CustomTextGridStyle is a utility type for those not wanting to define their own style types.
func (*CustomTextGridStyle) BackgroundColor ¶ added in v1.3.0
func (c *CustomTextGridStyle) BackgroundColor() color.Color
BackgroundColor is the color a cell should use for the background.
func (*CustomTextGridStyle) TextColor ¶ added in v1.3.0
func (c *CustomTextGridStyle) TextColor() color.Color
TextColor is the color a cell should use for the text.
type DisableableWidget ¶ added in v1.2.0
type DisableableWidget struct { BaseWidget // contains filtered or unexported fields }
DisableableWidget describes an extension to BaseWidget which can be disabled. Disabled widgets should have a visually distinct style when disabled, normally using theme.DisabledButtonColor.
func (*DisableableWidget) Disable ¶ added in v1.2.0
func (w *DisableableWidget) Disable()
Disable this widget so that it cannot be interacted with, updating any style appropriately.
func (*DisableableWidget) Disabled ¶ added in v1.2.0
func (w *DisableableWidget) Disabled() bool
Disabled returns true if this widget is currently disabled or false if it can currently be interacted with.
func (*DisableableWidget) Enable ¶ added in v1.2.0
func (w *DisableableWidget) Enable()
Enable this widget, updating any style or features appropriately.
type Entry ¶
type Entry struct { DisableableWidget Text string PlaceHolder string OnChanged func(string) `json:"-"` Password bool // Deprecated: Use Disable() instead ReadOnly bool MultiLine bool Wrapping fyne.TextWrap // Set a validator that this entry will check against // Since: 1.4 Validator fyne.StringValidator CursorRow, CursorColumn int OnCursorChanged func() `json:"-"` // ActionItem is a small item which is displayed at the outer right of the entry (like a password revealer) ActionItem fyne.CanvasObject // 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 its renderer
Implements: fyne.Widget
func (*Entry) Cursor ¶ added in v1.3.0
Cursor returns the cursor type of this widget
Implements: desktop.Cursorable
func (*Entry) Disable ¶ added in v1.2.0
func (e *Entry) Disable()
Disable this widget so that it cannot be interacted with, updating any style appropriately.
Implements: fyne.Disableable
func (*Entry) Disabled ¶ added in v1.3.0
Disabled returns whether the entry is disabled or read-only.
Implements: fyne.Disableable
func (*Entry) DoubleTapped ¶ added in v1.1.0
func (e *Entry) DoubleTapped(_ *fyne.PointEvent)
DoubleTapped is called when this entry has been double tapped so we should select text below the pointer
Implements: fyne.DoubleTappable
func (*Entry) DragEnd ¶ added in v1.1.0
func (e *Entry) DragEnd()
DragEnd is called at end of a drag event. It does nothing.
Implements: fyne.Draggable
func (*Entry) Dragged ¶ added in v1.1.0
Dragged is called when the pointer moves while a button is held down. It updates the selection accordingly.
Implements: fyne.Draggable
func (*Entry) Enable ¶ added in v1.2.0
func (e *Entry) Enable()
Enable this widget, updating any style or features appropriately.
Implements: fyne.Disableable
func (*Entry) ExtendBaseWidget ¶ added in v1.2.2
ExtendBaseWidget is used by an extending widget to make use of BaseWidget functionality.
func (*Entry) FocusGained ¶
func (e *Entry) FocusGained()
FocusGained is called when the Entry has been given focus.
Implements: fyne.Focusable
func (*Entry) FocusLost ¶
func (e *Entry) FocusLost()
FocusLost is called when the Entry has had focus removed.
Implements: fyne.Focusable
func (*Entry) KeyDown ¶ added in v1.1.0
KeyDown handler for keypress events - used to store shift modifier state for text selection
Implements: desktop.Keyable
func (*Entry) KeyUp ¶ added in v1.1.0
KeyUp handler for key release events - used to reset shift modifier state for text selection
Implements: desktop.Keyable
func (*Entry) Keyboard ¶ added in v1.3.0
func (e *Entry) Keyboard() mobile.KeyboardType
Keyboard implements the Keyboardable interface
Implements: mobile.Keyboardable
func (*Entry) MinSize ¶
MinSize returns the size that this widget should not shrink below.
Implements: fyne.Widget
func (*Entry) MouseDown ¶ added in v1.1.0
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.
Implements: desktop.Mouseable
func (*Entry) MouseUp ¶ added in v1.1.0
func (e *Entry) MouseUp(_ *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
Implements: desktop.Mouseable
func (*Entry) SelectedText ¶ added in v1.2.2
SelectedText returns the text currently selected in this Entry. If there is no selection it will return the empty string.
func (*Entry) SetOnValidationChanged ¶ added in v1.4.0
SetOnValidationChanged is intended for parent widgets or containers to hook into the validation. The function might be overwritten by a parent that cares about child validation (e.g. widget.Form).
func (*Entry) SetPlaceHolder ¶
SetPlaceHolder sets the text that will be displayed if the entry is otherwise empty
func (*Entry) SetReadOnly
deprecated
func (*Entry) SetValidationError ¶ added in v1.4.0
SetValidationError manually updates the validation status until the next input change
func (*Entry) Tapped ¶ added in v1.1.0
func (e *Entry) Tapped(ev *fyne.PointEvent)
Tapped is called when this entry has been tapped so we should update the cursor position.
Implements: fyne.Tappable
func (*Entry) TappedSecondary ¶ added in v1.1.0
func (e *Entry) TappedSecondary(pe *fyne.PointEvent)
TappedSecondary is called when right or alternative tap is invoked.
Opens the PopUpMenu with `Paste` item to paste text from the clipboard.
Implements: fyne.SecondaryTappable
func (*Entry) TypedKey ¶
TypedKey receives key input events when the Entry widget is focused.
Implements: fyne.Focusable
func (*Entry) TypedRune ¶
TypedRune receives text input events when the Entry widget is focused.
Implements: fyne.Focusable
func (*Entry) TypedShortcut ¶
TypedShortcut implements the Shortcutable interface
Implements: fyne.Shortcutable
type FileIcon ¶ added in v1.4.0
type FileIcon struct { BaseWidget Selected bool URI fyne.URI // contains filtered or unexported fields }
FileIcon is an adaption of widget.Icon for showing files and folders
Since: 1.4
func NewFileIcon ¶ added in v1.4.0
NewFileIcon takes a filepath and creates an icon with an overlayed label using the detected mimetype and extension
Since: 1.4
func (*FileIcon) CreateRenderer ¶ added in v1.4.0
func (i *FileIcon) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*FileIcon) MinSize ¶ added in v1.4.0
MinSize returns the size that this widget should not shrink below
func (*FileIcon) SetSelected ¶ added in v1.4.0
SetSelected makes the file look like it is selected
type Form ¶
type Form struct { BaseWidget Items []*FormItem OnSubmit func() OnCancel func() SubmitText string CancelText string // 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. If you change OnSubmit/OnCancel after the form is created and rendered, you need to call Refresh() to update the form with the correct buttons. Setting OnSubmit/OnCancel to nil will remove the buttons.
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 its renderer
type FormItem ¶
type FormItem struct { Text string Widget fyne.CanvasObject // contains filtered or unexported fields }
FormItem provides the details for a row in a form
func NewFormItem ¶ added in v1.2.0
func NewFormItem(text string, widget fyne.CanvasObject) *FormItem
NewFormItem creates a new form item with the specified label text and input widget
type Group ¶
type Group struct { BaseWidget Text string // contains filtered or unexported fields }
Group widget contains a list of widgets that are grouped under a dividing line and 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. Deprecated: Consider using the Card instead.
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. Deprecated: Consider using the Card instead.
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 its renderer
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 { BaseWidget Text string URL *url.URL Alignment fyne.TextAlign // The alignment of the Text Wrapping fyne.TextWrap // The wrapping 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 its renderer
func (*Hyperlink) Resize ¶
Resize sets a new size for the hyperlink. 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) Tapped ¶
func (hl *Hyperlink) Tapped(*fyne.PointEvent)
Tapped is called when a pointer tapped event is captured and triggers any change handler
type Icon ¶
type Icon struct { BaseWidget 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 its renderer
func (*Icon) SetResource ¶
SetResource updates the resource rendered in this icon widget
type Label ¶
type Label struct { BaseWidget Text string Alignment fyne.TextAlign // The alignment of the Text Wrapping fyne.TextWrap // The wrapping 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 its renderer
func (*Label) Refresh ¶ added in v1.2.3
func (l *Label) Refresh()
Refresh checks if the text content should be updated then refreshes the graphical context
type List ¶ added in v1.4.0
type List struct { BaseWidget Length func() int CreateItem func() fyne.CanvasObject UpdateItem func(id ListItemID, item fyne.CanvasObject) OnSelected func(id ListItemID) OnUnselected func(id ListItemID) // contains filtered or unexported fields }
List is a widget that pools list items for performance and lays the items out in a vertical direction inside of a scroller. List requires that all items are the same size.
Since: 1.4
func NewList ¶ added in v1.4.0
func NewList(length func() int, createItem func() fyne.CanvasObject, updateItem func(ListItemID, fyne.CanvasObject)) *List
NewList creates and returns a list widget for displaying items in a vertical layout with scrolling and caching for performance.
Since: 1.4
func (*List) CreateRenderer ¶ added in v1.4.0
func (l *List) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer.
func (*List) MinSize ¶ added in v1.4.0
MinSize returns the size that this widget should not shrink below.
func (*List) Select ¶ added in v1.4.0
func (l *List) Select(id ListItemID)
Select add the item identified by the given ID to the selection.
func (*List) Unselect ¶ added in v1.4.0
func (l *List) Unselect(id ListItemID)
Unselect removes the item identified by the given ID from the selection.
type ListItemID ¶ added in v1.4.0
type ListItemID = int
ListItemID uniquely identifies an item within a list.
type Menu ¶ added in v1.3.0
type Menu struct { widget.Base Items []fyne.CanvasObject OnDismiss func() // contains filtered or unexported fields }
Menu is a widget for displaying a fyne.Menu.
func (*Menu) CreateRenderer ¶ added in v1.3.0
func (m *Menu) CreateRenderer() fyne.WidgetRenderer
CreateRenderer returns a new renderer for the menu.
Implements: fyne.Widget
func (*Menu) DeactivateChild ¶ added in v1.3.0
func (m *Menu) DeactivateChild()
DeactivateChild deactivates the active child menu.
func (*Menu) Dismiss ¶ added in v1.3.0
func (m *Menu) Dismiss()
Dismiss dismisses the menu by dismissing and hiding the active child and performing OnDismiss.
func (*Menu) Hide ¶ added in v1.3.0
func (m *Menu) Hide()
Hide hides the menu.
Implements: fyne.Widget
func (*Menu) MinSize ¶ added in v1.3.0
MinSize returns the minimal size of the menu.
Implements: fyne.Widget
func (*Menu) Move ¶ added in v1.3.0
Move sets the position of the widget relative to its parent.
Implements: fyne.Widget
func (*Menu) Refresh ¶ added in v1.3.0
func (m *Menu) Refresh()
Refresh triggers a redraw of the menu.
Implements: fyne.Widget
func (*Menu) Resize ¶ added in v1.3.0
Resize has no effect because menus are always displayed with their minimal size.
Implements: fyne.Widget
func (*Menu) Show ¶ added in v1.3.0
func (m *Menu) Show()
Show makes the menu visible.
Implements: fyne.Widget
func (*Menu) Tapped ¶ added in v1.3.0
func (m *Menu) Tapped(*fyne.PointEvent)
Tapped catches taps on separators and the menu background. It doesn’t perform any action.
Implements: fyne.Tappable
type Orientation ¶ added in v1.2.0
type Orientation int
Orientation controls the horizontal/vertical layout of a widget
const ( Horizontal Orientation = 0 Vertical Orientation = 1 )
Orientation constants to control widget layout
type PopUp ¶ added in v1.1.0
type PopUp struct { BaseWidget 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
deprecated
added in
v1.1.0
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.
Deprecated: This will no longer show the pop-up in 2.0. Use ShowModalPopUp instead.
func NewPopUpAtPosition
deprecated
added in
v1.2.0
func NewPopUpMenu
deprecated
added in
v1.1.0
func NewPopUpMenuAtPosition
deprecated
added in
v1.2.0
NewPopUpMenuAtPosition creates a PopUp widget populated with menu items from the passed menu structure. It will automatically be positioned at the provided location and shown as an overlay on the specified canvas.
Deprecated: Use ShowPopUpMenuAtPosition() instead.
func (*PopUp) CreateRenderer ¶ added in v1.1.0
func (p *PopUp) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*PopUp) Hide ¶ added in v1.1.0
func (p *PopUp) Hide()
Hide this widget, if it was previously visible
func (*PopUp) MinSize ¶ added in v1.1.0
MinSize returns the size that this widget should not shrink below
func (*PopUp) Move ¶ added in v1.1.0
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) Resize ¶ added in v1.1.0
Resize changes the size of the PopUp. PopUps always have the size of their canvas. However, Resize changes the size of the PopUp's content.
Implements: fyne.Widget
func (*PopUp) Show ¶ added in v1.1.0
func (p *PopUp) Show()
Show this pop-up as overlay if not already shown.
func (*PopUp) ShowAtPosition ¶ added in v1.3.0
ShowAtPosition shows this pop-up at the given position.
func (*PopUp) Tapped ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (p *PopUp) TappedSecondary(_ *fyne.PointEvent)
TappedSecondary is called when the user right/alt taps the background - if not modal then dismiss this widget
type PopUpMenu ¶ added in v1.3.0
type PopUpMenu struct { *Menu // contains filtered or unexported fields }
PopUpMenu is a Menu which displays itself in an OverlayContainer.
func (*PopUpMenu) CreateRenderer ¶ added in v1.3.0
func (p *PopUpMenu) CreateRenderer() fyne.WidgetRenderer
CreateRenderer returns a new renderer for the pop-up menu.
Implements: fyne.Widget
func (*PopUpMenu) Hide ¶ added in v1.3.0
func (p *PopUpMenu) Hide()
Hide hides the pop-up menu.
Implements: fyne.Widget
func (*PopUpMenu) Move ¶ added in v1.3.0
Move moves the pop-up menu. The position is absolute because pop-up menus are shown in an overlay which covers the whole canvas.
Implements: fyne.Widget
func (*PopUpMenu) Resize ¶ added in v1.3.0
Resize changes the size of the pop-up menu.
Implements: fyne.Widget
func (*PopUpMenu) Show ¶ added in v1.3.0
func (p *PopUpMenu) Show()
Show makes the pop-up menu visible.
Implements: fyne.Widget
func (*PopUpMenu) ShowAtPosition ¶ added in v1.3.0
ShowAtPosition shows the pop-up menu at the specified position.
type ProgressBar ¶
type ProgressBar struct { BaseWidget Min, Max, Value float64 // TextFormatter can be used to have a custom format of progress text. // If set, it overrides the percentage readout and runs each time the value updates. // // Since: 1.4 TextFormatter func() string }
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 its renderer
func (*ProgressBar) MinSize ¶
func (p *ProgressBar) MinSize() fyne.Size
MinSize returns the size that this widget should not shrink below
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.
type ProgressBarInfinite ¶
type ProgressBarInfinite struct {
BaseWidget
}
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 its 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 size that this widget should not shrink below
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
deprecated
type Radio struct { DisableableWidget Horizontal bool Required bool OnChanged func(string) `json:"-"` Options []string Selected string // 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.
Deprecated: Use RadioGroup instead.
func (*Radio) CreateRenderer ¶
func (r *Radio) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*Radio) MouseIn ¶ added in v1.1.0
func (r *Radio) MouseIn(event *desktop.MouseEvent)
MouseIn is called when a desktop pointer enters the widget
func (*Radio) MouseMoved ¶ added in v1.1.0
func (r *Radio) MouseMoved(event *desktop.MouseEvent)
MouseMoved is called when a desktop pointer hovers over the widget
func (*Radio) MouseOut ¶ added in v1.1.0
func (r *Radio) MouseOut()
MouseOut is called when a desktop pointer exits the widget
func (*Radio) SetSelected ¶ added in v1.0.1
SetSelected sets the radio option, it can be used to set a default option.
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
type RadioGroup ¶ added in v1.4.0
type RadioGroup struct { DisableableWidget Horizontal bool Required bool OnChanged func(string) `json:"-"` Options []string Selected string // contains filtered or unexported fields }
RadioGroup 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.
Since: 1.4
func NewRadioGroup ¶ added in v1.4.0
func NewRadioGroup(options []string, changed func(string)) *RadioGroup
NewRadioGroup creates a new radio widget with the set options and change handler
Since: 1.4
func (*RadioGroup) Append ¶ added in v1.4.0
func (r *RadioGroup) Append(option string)
Append adds a new option to the end of a RadioGroup widget.
func (*RadioGroup) CreateRenderer ¶ added in v1.4.0
func (r *RadioGroup) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*RadioGroup) MinSize ¶ added in v1.4.0
func (r *RadioGroup) MinSize() fyne.Size
MinSize returns the size that this widget should not shrink below
func (*RadioGroup) Refresh ¶ added in v1.4.0
func (r *RadioGroup) Refresh()
Refresh causes this widget to be redrawn in it's current state.
Implements: fyne.CanvasObject
func (*RadioGroup) SetSelected ¶ added in v1.4.0
func (r *RadioGroup) SetSelected(option string)
SetSelected sets the radio option, it can be used to set a default option.
type ScrollContainer
deprecated
type ScrollContainer struct { BaseWidget Direction ScrollDirection 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.
Deprecated: use container.Scroll instead.
func NewHScrollContainer
deprecated
added in
v1.2.4
func NewHScrollContainer(content fyne.CanvasObject) *ScrollContainer
NewHScrollContainer create a scrollable parent wrapping the specified content. Note that this may cause the MinSize.Width to be smaller than that of the passed object.
Deprecated: use container.NewHScroll instead.
func NewScrollContainer
deprecated
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 object.
Deprecated: use container.NewScroll instead.
func NewVScrollContainer
deprecated
added in
v1.2.4
func NewVScrollContainer(content fyne.CanvasObject) *ScrollContainer
NewVScrollContainer create a scrollable parent wrapping the specified content. Note that this may cause the MinSize.Height to be smaller than that of the passed object.
Deprecated: use container.NewVScroll instead.
func (*ScrollContainer) CreateRenderer ¶
func (s *ScrollContainer) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*ScrollContainer) DragEnd ¶ added in v1.2.0
func (s *ScrollContainer) DragEnd()
DragEnd will stop scrolling on mobile has stopped
func (*ScrollContainer) Dragged ¶ added in v1.2.0
func (s *ScrollContainer) Dragged(e *fyne.DragEvent)
Dragged will scroll on any drag - bar or otherwise - for mobile
func (*ScrollContainer) MinSize ¶
func (s *ScrollContainer) MinSize() fyne.Size
MinSize returns the smallest size this widget can shrink to
func (*ScrollContainer) Refresh ¶ added in v1.2.0
func (s *ScrollContainer) Refresh()
Refresh causes this widget to be redrawn in it's current state
func (*ScrollContainer) Resize ¶
func (s *ScrollContainer) Resize(size fyne.Size)
Resize sets a new size for the scroll container.
func (*ScrollContainer) ScrollToBottom ¶ added in v1.3.3
func (s *ScrollContainer) ScrollToBottom()
ScrollToBottom will scroll content to container bottom - to show latest info which end user just added
func (*ScrollContainer) ScrollToTop ¶ added in v1.3.3
func (s *ScrollContainer) ScrollToTop()
ScrollToTop will scroll content to container top
func (*ScrollContainer) Scrolled ¶
func (s *ScrollContainer) Scrolled(ev *fyne.ScrollEvent)
Scrolled is called when an input device triggers a scroll event
func (*ScrollContainer) SetMinSize ¶ added in v1.2.4
func (s *ScrollContainer) SetMinSize(size fyne.Size)
SetMinSize specifies a minimum size for this scroll container. If the specified size is larger than the content size then scrolling will not be enabled This can be helpful to appear larger than default if the layout is collapsing this widget.
type ScrollDirection
deprecated
added in
v1.2.4
type ScrollDirection int
ScrollDirection represents the directions in which a ScrollContainer can scroll its child content.
Deprecated: use container.ScrollDirection instead.
const ( // Deprecated: use container.ScrollBoth instead ScrollBoth ScrollDirection = iota // Deprecated: use container.ScrollHorizontalOnly instead ScrollHorizontalOnly // Deprecated: use container.ScrollVerticalOnly instead ScrollVerticalOnly )
Constants for valid values of ScrollDirection.
type Select ¶ added in v1.1.0
type Select struct { DisableableWidget Selected string Options []string PlaceHolder 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 ¶ added in v1.1.0
NewSelect creates a new select widget with the set list of options and changes handler
func (*Select) ClearSelected ¶ added in v1.3.0
func (s *Select) ClearSelected()
ClearSelected clears the current option of the select widget. After clearing the current option, the Select widget's PlaceHolder will be displayed.
func (*Select) CreateRenderer ¶ added in v1.1.0
func (s *Select) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*Select) FocusGained ¶ added in v1.4.0
func (s *Select) FocusGained()
FocusGained is called after this Select has gained focus.
Implements: fyne.Focusable
func (*Select) FocusLost ¶ added in v1.4.0
func (s *Select) FocusLost()
FocusLost is called after this Select has lost focus.
Implements: fyne.Focusable
func (*Select) Hide ¶ added in v1.1.0
func (s *Select) Hide()
Hide hides the select.
Implements: fyne.Widget
func (*Select) MinSize ¶ added in v1.1.0
MinSize returns the size that this widget should not shrink below
func (*Select) MouseIn ¶ added in v1.1.0
func (s *Select) MouseIn(*desktop.MouseEvent)
MouseIn is called when a desktop pointer enters the widget
func (*Select) MouseMoved ¶ added in v1.1.0
func (s *Select) MouseMoved(*desktop.MouseEvent)
MouseMoved is called when a desktop pointer hovers over the widget
func (*Select) MouseOut ¶ added in v1.1.0
func (s *Select) MouseOut()
MouseOut is called when a desktop pointer exits the widget
func (*Select) Move ¶ added in v1.1.0
Move changes the relative position of the select.
Implements: fyne.Widget
func (*Select) Resize ¶ added in v1.1.0
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) SelectedIndex ¶ added in v1.4.0
SelectedIndex returns the index value of the currently selected item in Options list. It will return -1 if there is no selection.
func (*Select) SetSelected ¶ added in v1.1.0
SetSelected sets the current option of the select widget
func (*Select) SetSelectedIndex ¶ added in v1.4.0
SetSelectedIndex will set the Selected option from the value in Options list at index position.
func (*Select) Tapped ¶ added in v1.1.0
func (s *Select) Tapped(*fyne.PointEvent)
Tapped is called when a pointer tapped event is captured and triggers any tap handler
type SelectEntry ¶ added in v1.3.0
type SelectEntry struct { Entry // contains filtered or unexported fields }
SelectEntry is an input field which supports selecting from a fixed set of options.
func NewSelectEntry ¶ added in v1.3.0
func NewSelectEntry(options []string) *SelectEntry
NewSelectEntry creates a SelectEntry.
func (*SelectEntry) CreateRenderer ¶ added in v1.4.0
func (e *SelectEntry) CreateRenderer() fyne.WidgetRenderer
CreateRenderer returns a new renderer for this select entry.
Implements: fyne.Widget
func (*SelectEntry) Disable ¶ added in v1.4.0
func (e *SelectEntry) Disable()
Disable this widget so that it cannot be interacted with, updating any style appropriately.
Implements: fyne.DisableableWidget
func (*SelectEntry) Enable ¶ added in v1.4.0
func (e *SelectEntry) Enable()
Enable this widget, updating any style or features appropriately.
Implements: fyne.DisableableWidget
func (*SelectEntry) MinSize ¶ added in v1.3.0
func (e *SelectEntry) MinSize() fyne.Size
MinSize returns the minimal size of the select entry.
Implements: fyne.Widget
func (*SelectEntry) Resize ¶ added in v1.3.0
func (e *SelectEntry) Resize(size fyne.Size)
Resize changes the size of the select entry.
Implements: fyne.Widget
func (*SelectEntry) SetOptions ¶ added in v1.3.0
func (e *SelectEntry) SetOptions(options []string)
SetOptions sets the options the user might select from.
type Separator ¶ added in v1.4.0
Separator is a widget for displaying a separator with themeable color.
Since: 1.4
func NewSeparator ¶ added in v1.4.0
func NewSeparator() *Separator
NewSeparator creates a new separator.
Since: 1.4
func (*Separator) CreateRenderer ¶ added in v1.4.0
func (s *Separator) CreateRenderer() fyne.WidgetRenderer
CreateRenderer returns a new renderer for the separator.
Implements: fyne.Widget
func (*Separator) Hide ¶ added in v1.4.0
func (s *Separator) Hide()
Hide hides the separator.
Implements: fyne.Widget
func (*Separator) MinSize ¶ added in v1.4.0
MinSize returns the minimal size of the separator.
Implements: fyne.Widget
func (*Separator) Move ¶ added in v1.4.0
Move sets the position of the separator relative to its parent.
Implements: fyne.Widget
func (*Separator) Refresh ¶ added in v1.4.0
func (s *Separator) Refresh()
Refresh triggers a redraw of the separator.
Implements: fyne.Widget
type Slider ¶ added in v1.2.0
type Slider struct { BaseWidget Value float64 Min float64 Max float64 Step float64 Orientation Orientation OnChanged func(float64) }
Slider is a widget that can slide between two fixed values.
func (*Slider) CreateRenderer ¶ added in v1.2.0
func (s *Slider) CreateRenderer() fyne.WidgetRenderer
CreateRenderer links this widget to its renderer.
type SplitContainer
deprecated
added in
v1.3.0
type SplitContainer struct { BaseWidget Offset float64 Horizontal bool Leading fyne.CanvasObject Trailing fyne.CanvasObject }
SplitContainer defines a container whose size is split between two children.
Deprecated: use container.Split instead.
func NewHSplitContainer
deprecated
added in
v1.3.0
func NewHSplitContainer(leading, trailing fyne.CanvasObject) *SplitContainer
NewHSplitContainer creates a horizontally arranged container with the specified leading and trailing elements. A vertical split bar that can be dragged will be added between the elements.
Deprecated: use container.NewHSplit instead.
func NewVSplitContainer
deprecated
added in
v1.3.0
func NewVSplitContainer(top, bottom fyne.CanvasObject) *SplitContainer
NewVSplitContainer creates a vertically arranged container with the specified top and bottom elements. A horizontal split bar that can be dragged will be added between the elements.
Deprecated: use container.NewVSplit instead.
func (*SplitContainer) CreateRenderer ¶ added in v1.3.0
func (s *SplitContainer) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*SplitContainer) SetOffset ¶ added in v1.3.0
func (s *SplitContainer) SetOffset(offset float64)
SetOffset sets the offset (0.0 to 1.0) of the SplitContainer divider. 0.0 - Leading is min size, Trailing uses all remaining space. 0.5 - Leading & Trailing equally share the available space. 1.0 - Trailing is min size, Leading uses all remaining space.
type TabContainer
deprecated
type TabContainer struct { BaseWidget Items []*TabItem OnChanged func(tab *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.
Deprecated: use container.Tabs instead.
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) Append ¶ added in v1.2.1
func (c *TabContainer) Append(item *TabItem)
Append adds a new TabItem to the rightmost side of the tab panel
func (*TabContainer) CreateRenderer ¶
func (c *TabContainer) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*TabContainer) CurrentTab ¶
func (c *TabContainer) CurrentTab() *TabItem
CurrentTab returns the currently selected TabItem.
func (*TabContainer) CurrentTabIndex ¶
func (c *TabContainer) CurrentTabIndex() int
CurrentTabIndex returns the index of the currently selected TabItem.
func (*TabContainer) MinSize ¶
func (c *TabContainer) MinSize() fyne.Size
MinSize returns the size that this widget should not shrink below
func (*TabContainer) Remove ¶ added in v1.2.1
func (c *TabContainer) Remove(item *TabItem)
Remove tab by value
func (*TabContainer) RemoveIndex ¶ added in v1.2.1
func (c *TabContainer) RemoveIndex(index int)
RemoveIndex removes tab by index
func (*TabContainer) SelectTab ¶
func (c *TabContainer) SelectTab(item *TabItem)
SelectTab sets the specified TabItem to be selected and its content visible.
func (*TabContainer) SelectTabIndex ¶
func (c *TabContainer) SelectTabIndex(index int)
SelectTabIndex sets the TabItem at the specific index to be selected and its content visible.
func (*TabContainer) SetItems ¶ added in v1.3.0
func (c *TabContainer) SetItems(items []*TabItem)
SetItems sets the container’s items and refreshes.
func (*TabContainer) SetTabLocation ¶ added in v1.1.0
func (c *TabContainer) SetTabLocation(l TabLocation)
SetTabLocation sets the location of the tab bar
func (*TabContainer) Show ¶
func (c *TabContainer) Show()
Show this widget, if it was previously hidden
type TabItem
deprecated
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.
Deprecated: use container.TabItem instead.
func NewTabItem ¶
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 ¶ added in v1.1.0
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
deprecated
added in
v1.1.0
type TabLocation int
TabLocation is the location where the tabs of a tab container should be rendered.
Deprecated: use container.TabLocation instead.
const ( // Deprecated: use container.TabLocationTop TabLocationTop TabLocation = iota // Deprecated: use container.TabLocationLeading TabLocationLeading // Deprecated: use container.TabLocationBottom TabLocationBottom // Deprecated: use container.TabLocationTrailing TabLocationTrailing )
TabLocation values
type Table ¶ added in v1.4.0
type Table struct { BaseWidget Length func() (int, int) CreateCell func() fyne.CanvasObject UpdateCell func(id TableCellID, template fyne.CanvasObject) OnSelected func(id TableCellID) OnUnselected func(id TableCellID) // contains filtered or unexported fields }
Table widget is a grid of items that can be scrolled and a cell selected. It's performance is provided by caching cell templates created with CreateCell and re-using them with UpdateCell. The size of the content rows/columns is returned by the Length callback.
Since: 1.4
func NewTable ¶ added in v1.4.0
func NewTable(length func() (int, int), create func() fyne.CanvasObject, update func(TableCellID, fyne.CanvasObject)) *Table
NewTable returns a new performant table widget defined by the passed functions. The first returns the data size in rows and columns, second parameter is a function that returns cell template objects that can be cached and the third is used to apply data at specified data location to the passed template CanvasObject.
Since: 1.4
func (*Table) CreateRenderer ¶ added in v1.4.0
func (t *Table) CreateRenderer() fyne.WidgetRenderer
CreateRenderer returns a new renderer for the table.
Implements: fyne.Widget
func (*Table) Select ¶ added in v1.4.0
func (t *Table) Select(id TableCellID)
Select will mark the specified cell as selected.
func (*Table) SetColumnWidth ¶ added in v1.4.1
SetColumnWidth supports changing the width of the specified column. Columns normally take the width of the template cell returned from the CreateCell callback. The width parameter uses the same units as a fyne.Size type and refers to the internal content width not including any standard padding or divider size.
Since: 1.4.1
func (*Table) Unselect ¶ added in v1.4.0
func (t *Table) Unselect(id TableCellID)
Unselect will mark the cell provided by id as unselected.
type TableCellID ¶ added in v1.4.0
TableCellID is a type that represents a cell's position in a table based on it's row and column location.
type TextGrid ¶ added in v1.3.0
type TextGrid struct { BaseWidget Rows []TextGridRow ShowLineNumbers bool ShowWhitespace bool }
TextGrid is a monospaced grid of characters. This is designed to be used by a text editor, code preview or terminal emulator.
func NewTextGrid ¶ added in v1.3.0
func NewTextGrid() *TextGrid
NewTextGrid creates a new empty TextGrid widget.
func NewTextGridFromString ¶ added in v1.3.0
NewTextGridFromString creates a new TextGrid widget with the specified string content.
func (*TextGrid) CreateRenderer ¶ added in v1.3.0
func (t *TextGrid) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to it's renderer
func (*TextGrid) MinSize ¶ added in v1.3.0
MinSize returns the smallest size this widget can shrink to
func (*TextGrid) Resize ¶ added in v1.3.0
Resize is called when this widget changes size. We should make sure that we refresh cells.
func (*TextGrid) Row ¶ added in v1.3.0
func (t *TextGrid) Row(row int) TextGridRow
Row returns a copy of the content in a specified row as a TextGridRow. If the index is out of bounds it returns an empty row object.
func (*TextGrid) RowText ¶ added in v1.4.0
RowText returns a string representation of the content at the row specified. If the index is out of bounds it returns an empty string.
func (*TextGrid) SetCell ¶ added in v1.4.0
func (t *TextGrid) SetCell(row, col int, cell TextGridCell)
SetCell sets a grid data to the cell at named row and column.
func (*TextGrid) SetRow ¶ added in v1.3.0
func (t *TextGrid) SetRow(row int, content TextGridRow)
SetRow updates the specified row of the grid's contents using the specified content and style and then refreshes. If the row is beyond the end of the current buffer it will be expanded.
func (*TextGrid) SetRowStyle ¶ added in v1.4.0
func (t *TextGrid) SetRowStyle(row int, style TextGridStyle)
SetRowStyle sets a grid style to all the cells cell at the specified row. Any cells in this row with their own style will override this value when displayed.
func (*TextGrid) SetRune ¶ added in v1.4.0
SetRune sets a character to the cell at named row and column.
func (*TextGrid) SetStyle ¶ added in v1.3.0
func (t *TextGrid) SetStyle(row, col int, style TextGridStyle)
SetStyle sets a grid style to the cell at named row and column.
func (*TextGrid) SetStyleRange ¶ added in v1.3.0
func (t *TextGrid) SetStyleRange(startRow, startCol, endRow, endCol int, style TextGridStyle)
SetStyleRange sets a grid style to all the cells between the start row and column through to the end row and column.
type TextGridCell ¶ added in v1.3.0
type TextGridCell struct { Rune rune Style TextGridStyle }
TextGridCell represents a single cell in a text grid. It has a rune for the text content and a style associated with it.
type TextGridRow ¶ added in v1.3.0
type TextGridRow struct { Cells []TextGridCell Style TextGridStyle }
TextGridRow represents a row of cells cell in a text grid. It contains the cells for the row and an optional style.
type TextGridStyle ¶ added in v1.3.0
TextGridStyle defines a style that can be applied to a TextGrid cell.
var ( // TextGridStyleDefault is a default style for test grid cells TextGridStyleDefault TextGridStyle // TextGridStyleWhitespace is the style used for whitespace characters, if enabled TextGridStyleWhitespace TextGridStyle )
type Toolbar ¶
type Toolbar struct { BaseWidget Items []ToolbarItem }
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) CreateRenderer ¶
func (t *Toolbar) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
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
type Tree ¶ added in v1.4.0
type Tree struct { BaseWidget Root TreeNodeID ChildUIDs func(uid TreeNodeID) (c []TreeNodeID) // Return a sorted slice of Children TreeNodeIDs for the given Node TreeNodeID CreateNode func(branch bool) (o fyne.CanvasObject) // Return a CanvasObject that can represent a Branch (if branch is true), or a Leaf (if branch is false) IsBranch func(uid TreeNodeID) (ok bool) // Return true if the given TreeNodeID represents a Branch OnBranchClosed func(uid TreeNodeID) // Called when a Branch is closed OnBranchOpened func(uid TreeNodeID) // Called when a Branch is opened OnSelected func(uid TreeNodeID) // Called when the Node with the given TreeNodeID is selected. OnUnselected func(uid TreeNodeID) // Called when the Node with the given TreeNodeID is unselected. UpdateNode func(uid TreeNodeID, branch bool, node fyne.CanvasObject) // Called to update the given CanvasObject to represent the data at the given TreeNodeID // contains filtered or unexported fields }
Tree widget displays hierarchical data. Each node of the tree must be identified by a Unique TreeNodeID.
Since: 1.4
func NewTree ¶ added in v1.4.0
func NewTree(childUIDs func(TreeNodeID) []TreeNodeID, isBranch func(TreeNodeID) bool, create func(bool) fyne.CanvasObject, update func(TreeNodeID, bool, fyne.CanvasObject)) *Tree
NewTree returns a new performant tree widget defined by the passed functions. childUIDs returns the child TreeNodeIDs of the given node. isBranch returns true if the given node is a branch, false if it is a leaf. create returns a new template object that can be cached. update is used to apply data at specified data location to the passed template CanvasObject.
Since: 1.4
func NewTreeWithStrings ¶ added in v1.4.0
NewTreeWithStrings creates a new tree with the given string map. Data must contain a mapping for the root, which defaults to empty string ("").
Since: 1.4
func (*Tree) CloseAllBranches ¶ added in v1.4.0
func (t *Tree) CloseAllBranches()
CloseAllBranches closes all branches in the tree.
func (*Tree) CloseBranch ¶ added in v1.4.0
func (t *Tree) CloseBranch(uid TreeNodeID)
CloseBranch closes the branch with the given TreeNodeID.
func (*Tree) CreateRenderer ¶ added in v1.4.0
func (t *Tree) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer.
func (*Tree) IsBranchOpen ¶ added in v1.4.0
func (t *Tree) IsBranchOpen(uid TreeNodeID) bool
IsBranchOpen returns true if the branch with the given TreeNodeID is expanded.
func (*Tree) MinSize ¶ added in v1.4.0
MinSize returns the size that this widget should not shrink below.
func (*Tree) OpenAllBranches ¶ added in v1.4.0
func (t *Tree) OpenAllBranches()
OpenAllBranches opens all branches in the tree.
func (*Tree) OpenBranch ¶ added in v1.4.0
func (t *Tree) OpenBranch(uid TreeNodeID)
OpenBranch opens the branch with the given TreeNodeID.
func (*Tree) Select ¶ added in v1.4.0
func (t *Tree) Select(uid TreeNodeID)
Select marks the specified node to be selected
func (*Tree) ToggleBranch ¶ added in v1.4.0
ToggleBranch flips the state of the branch with the given TreeNodeID.
func (*Tree) Unselect ¶ added in v1.4.0
func (t *Tree) Unselect(uid TreeNodeID)
Unselect marks the specified node to be not selected
type TreeNodeID ¶ added in v1.4.0
type TreeNodeID = string
TreeNodeID represents the unique id of a tree node.
Source Files ¶
- accordion.go
- box.go
- button.go
- card.go
- check.go
- entry.go
- entry_password.go
- entry_validation.go
- fileicon.go
- form.go
- group.go
- hyperlink.go
- icon.go
- label.go
- list.go
- menu.go
- menu_item.go
- pool.go
- popup.go
- popup_menu.go
- progressbar.go
- progressbarinfinite.go
- radio.go
- radio_group.go
- radio_item.go
- scroller.go
- select.go
- select_entry.go
- separator.go
- slider.go
- splitcontainer.go
- tabcontainer.go
- table.go
- text.go
- textgrid.go
- toolbar.go
- tree.go
- widget.go