Documentation
¶
Index ¶
- Variables
- func NewScaledText(level TextSize, text string) *canvas.Text
- func NewTextWithStyle(text string, alignment fyne.TextAlign, style Style) *canvas.Text
- type AppBar
- type NavDrawer
- type NavItem
- type NavLabel
- type NavSeparator
- type Pane
- type PaneBase
- func (p *PaneBase) GetContent() fyne.CanvasObject
- func (p *PaneBase) GetLabel() fyne.CanvasObject
- func (p *PaneBase) GetTitle() string
- func (p *PaneBase) GetWindow() gui.Window
- func (p *PaneBase) SetContent(content fyne.CanvasObject)
- func (p *PaneBase) SetIcon(icon fyne.Resource)
- func (p *PaneBase) SetTitle(title string)
- type Style
- type TextSize
Constants ¶
This section is empty.
Variables ¶
var ( // IconSize used with (in display pixels) used with Material Design elements IconSize = 24 // Padding (in display pixels) used with Material Design elements Padding = 16 )
Functions ¶
func NewScaledText ¶
NewScaledText returns a canvas.Text element with a given Material Design type scale applied to it.
Types ¶
type AppBar ¶
type AppBar struct { widget.BaseWidget Dense bool Extended bool // contains filtered or unexported fields }
AppBar ...
func (*AppBar) CreateRenderer ¶
func (bar *AppBar) CreateRenderer() fyne.WidgetRenderer
CreateRenderer returns a new WidgetRenderer for this widget. This should not be called by regular code, it is used internally to render a widget.
Implements: fyne.Widget
type NavDrawer ¶
type NavDrawer struct { // contains filtered or unexported fields }
NavDrawer ...
func NewNavDrawer ¶
NewNavDrawer ...
func (*NavDrawer) CreateRenderer ¶
func (nav *NavDrawer) CreateRenderer() fyne.WidgetRenderer
CreateRenderer returns a new WidgetRenderer for this widget. This should not be called by regular code, it is used internally to render a widget.
Implements: fyne.Widget
type NavItem ¶
type NavItem interface { string }GetTitle()
NavItem ...
func NewNavLabel ¶
func NewNavLabel(label string, content fyne.CanvasObject) NavItem
NewNavLabel ...
func NewNavLabelWithIcon ¶
NewNavLabelWithIcon ...
func NewNavSeparator ¶
func NewNavSeparator() NavItem
NewNavSeparator returns a new NavDrawer divider
type NavSeparator ¶
type NavSeparator struct {
// contains filtered or unexported fields
}
NavSeparator represents a visual dividing line to be shown between other NavItem(s) within a NavDrawer -- it should not receive focus or be a candidate for selection because it contains no content.
func (*NavSeparator) GetContent ¶
func (*NavSeparator) GetContent() fyne.CanvasObject
GetContent ...
type Pane ¶
type Pane interface { GetWindow() gui.Window GetContent() fyne.CanvasObject SetContent(fyne.CanvasObject) GetLabel() fyne.CanvasObject // GetIcon() fyne.Resource SetIcon(fyne.Resource) GetTitle() string SetTitle(string) }
Pane ...
Implements: NavigationItem
type PaneBase ¶
type PaneBase struct {
// contains filtered or unexported fields
}
PaneBase ...
Implements: Pane
func (*PaneBase) GetContent ¶
func (p *PaneBase) GetContent() fyne.CanvasObject
GetContent returns the content of this pane
func (*PaneBase) GetLabel ¶
func (p *PaneBase) GetLabel() fyne.CanvasObject
GetLabel returns the assemebled label element for this pane
func (*PaneBase) SetContent ¶
func (p *PaneBase) SetContent(content fyne.CanvasObject)
SetContent changes the element to be shown when this pane is selected
type Style ¶
Style is a wrapped fyne.TextStyle with a TextSize
func StyleHeading5 ¶
func StyleHeading5() Style
StyleHeading5 is the Material Design standard Heading5 text style
type TextSize ¶
type TextSize uint8
TextSize refers to a Typgraphical Sizing defined by Material Design
const ( // TextSizeBody1 is 16dp and represents regular body type TextSizeBody1 TextSize = iota // TextSizeBody2 is 14dp and represents condensed body type TextSizeBody2 // TextSizeSubtitle1 is 16dp and represents a medium subtitle TextSizeSubtitle1 // TextSizeSubtitle2 is 14dp and represents a light subtitle TextSizeSubtitle2 // TextSizeHeading1 is 96dp and represents hero type TextSizeHeading1 // TextSizeHeading2 is 60dp and represents a primary heading TextSizeHeading2 // TextSizeHeading3 is 48dp and represents a secondary heading TextSizeHeading3 // TextSizeHeading4 is 34dp TextSizeHeading4 // TextSizeHeading5 is 24dp TextSizeHeading5 // TextSizeHeading6 is 20dp and used by component Titles TextSizeHeading6 )