Documentation ¶
Index ¶
- Variables
- func Register(name string, handler widgetHandler)
- func WidgetExport(widget interface{}, widgetType string) error
- type Padding
- func (p *Padding) Horizontal() float32
- func (p *Padding) Origin(args ...float32) fyne.Position
- func (p *Padding) SetAll(top, bottom, left, right float32, parent fyne.CanvasObject)
- func (p *Padding) SetBottom(bottom float32, parent fyne.CanvasObject)
- func (p *Padding) SetHorizontal(horizontal float32, parent fyne.CanvasObject)
- func (p *Padding) SetLeft(left float32, parent fyne.CanvasObject)
- func (p *Padding) SetOrigin(x, y float32, parent fyne.CanvasObject)
- func (p *Padding) SetRight(right float32, parent fyne.CanvasObject)
- func (p *Padding) SetTop(top float32, parent fyne.CanvasObject)
- func (p *Padding) SetVertical(vertical float32, parent fyne.CanvasObject)
- func (p *Padding) Vertical() float32
- type Sizing
- func (s *Sizing) SetFitHeight(fitHeight bool, parent fyne.CanvasObject)
- func (s *Sizing) SetFitWidth(fitWidth bool, parent fyne.CanvasObject)
- func (s *Sizing) SetMaxHeight(maxHeight float32, parent fyne.CanvasObject)
- func (s *Sizing) SetMaxWidth(maxWidth float32, parent fyne.CanvasObject)
- func (s *Sizing) SetMinHeight(minHeight float32, parent fyne.CanvasObject)
- func (s *Sizing) SetMinWidth(minWidth float32, parent fyne.CanvasObject)
- type TextStyling
- func (t *TextStyling) SetBold(bold bool, parent fyne.CanvasObject)
- func (t *TextStyling) SetItalic(italic bool, parent fyne.CanvasObject)
- func (t *TextStyling) SetMonospace(monospace bool, parent fyne.CanvasObject)
- func (t *TextStyling) SetSymbol(symbol bool, parent fyne.CanvasObject)
- func (t *TextStyling) SetTabWidth(tabWidth int, parent fyne.CanvasObject)
- type Widget
Constants ¶
This section is empty.
Variables ¶
var Widgets = map[string]widgetHandler{}
Widgets is a map of all the widgets that are registered and can be used by the engine
Functions ¶
func Register ¶
func Register(name string, handler widgetHandler)
Register adds a custom widget to the customWidgets map
func WidgetExport ¶
WidgetExport exports a widget to a json file to allow for use in the editor
Types ¶
type Padding ¶
func (*Padding) Horizontal ¶
func (*Padding) Origin ¶
Origin returns the top left combination of the padding, but it can accept float args to offset the origin
One arg will offset the origin by the arg in the x direction,
Two args will offset the origin by the first arg in the x direction and the second arg in the y direction ¶
Three args will offset the origin by the first arg in the x direction, the second arg in the y direction, and the third added to both ¶
Example: padding.Origin() will return a fyne.Position with the x value of padding.Left and the y value of padding.Top
Example: padding.Origin(10) will return a fyne.Position with the x value of padding.Left+10 and the y value of padding.Top
Example: padding.Origin(10, 20) will return a fyne.Position with the x value of padding.Left+10 and the y value of padding.Top+20
Example: padding.Origin(10, 20, 30) will return a fyne.Position with the x value of padding.Left+10+30 and the y value of padding.Top+20+30
func (*Padding) SetHorizontal ¶
func (*Padding) SetVertical ¶
type Sizing ¶
type Sizing struct { MinWidth float32 MinHeight float32 MaxWidth float32 MaxHeight float32 FitWidth bool FitHeight bool }
func (*Sizing) SetFitHeight ¶
func (*Sizing) SetFitWidth ¶
func (*Sizing) SetMaxHeight ¶
func (*Sizing) SetMaxWidth ¶
func (*Sizing) SetMinHeight ¶
func (*Sizing) SetMinWidth ¶
type TextStyling ¶
type TextStyling struct { fyne.TextStyle Wrapping fyne.TextWrap }
func NewTextStyling ¶
func NewTextStyling() TextStyling
func (*TextStyling) SetBold ¶
func (t *TextStyling) SetBold(bold bool, parent fyne.CanvasObject)
func (*TextStyling) SetItalic ¶
func (t *TextStyling) SetItalic(italic bool, parent fyne.CanvasObject)
func (*TextStyling) SetMonospace ¶
func (t *TextStyling) SetMonospace(monospace bool, parent fyne.CanvasObject)
func (*TextStyling) SetSymbol ¶
func (t *TextStyling) SetSymbol(symbol bool, parent fyne.CanvasObject)
func (*TextStyling) SetTabWidth ¶
func (t *TextStyling) SetTabWidth(tabWidth int, parent fyne.CanvasObject)
type Widget ¶
type Widget struct { //ID is the unique ID of the widget for later reference in editing ID string `json:"ID"` //Type is the type of widget that is used to parse the widget this should be Globally Unique, so when making //custom ones prefix it with your package name like "MyPackage.MyWidget" Type string `json:"Type"` //Children is a list of widgets that are children of this widget Children []Widget `json:"Children"` //Properties is a map of properties that are used to parse the widget Properties map[string]interface{} `json:"Properties"` //JsonSafe is a json safe version of the widget being parsed to allow quick setting of properties; this is not required JsonSafe interface{} `json:"JsonSafe"` }
Widget is the struct that holds all the information about a widget