Documentation ¶
Index ¶
- Variables
- func NewImageButton(fs http.FileSystem, name xml.Name, parent element.Layout) element.Element
- func NewTextButton(fs http.FileSystem, name xml.Name, parent element.Layout) element.Element
- type ImageButton
- func (e *ImageButton) Draw()
- func (e *ImageButton) Init(window *pixelgl.Window, bounds *pixel.Rect) error
- func (e *ImageButton) IsInitialised() bool
- func (e *ImageButton) NewEvent(window *pixelgl.Window)
- func (e *ImageButton) Reset()
- func (e *ImageButton) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)
- type TextButton
- func (e *TextButton) Draw()
- func (e *TextButton) Init(window *pixelgl.Window, bounds *pixel.Rect) error
- func (e *TextButton) IsInitialised() bool
- func (e *TextButton) NewEvent(window *pixelgl.Window)
- func (e *TextButton) Reset()
- func (e *TextButton) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ImageButtonTypeName = xml.Name{Space: "http://github.com/bhollier/ui/api/schema", Local: "ImageButton"}
The XML name of the element
View Source
var TextButtonTypeName = xml.Name{Space: "http://github.com/bhollier/ui/api/schema", Local: "TextButton"}
The XML name of the element
Functions ¶
func NewImageButton ¶
Function to create a new image button
func NewTextButton ¶
Function to create a new text button
Types ¶
type ImageButton ¶
type ImageButton struct { // An image button is a button element.ButtonImpl // It has an image element.ImageImpl }
Element type for an image button
func (*ImageButton) IsInitialised ¶
func (e *ImageButton) IsInitialised() bool
Function to determine whether the element is initialised
func (*ImageButton) NewEvent ¶
func (e *ImageButton) NewEvent(window *pixelgl.Window)
Function that is called when there is a new event
func (*ImageButton) UnmarshalXML ¶
func (e *ImageButton) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)
Function to unmarshal an XML element into an element. This function is usually only called by xml.Unmarshal
type TextButton ¶
type TextButton struct { // A text button is a button element.ButtonImpl // It has text element.TextImpl }
Element type for a text button
func (*TextButton) IsInitialised ¶
func (e *TextButton) IsInitialised() bool
Function to determine whether the element is initialised
func (*TextButton) NewEvent ¶
func (e *TextButton) NewEvent(window *pixelgl.Window)
Function that is called when there is a new event
func (*TextButton) UnmarshalXML ¶
func (e *TextButton) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)
Function to unmarshal an XML element into an element. This function is usually only called by xml.Unmarshal
Click to show internal directories.
Click to hide internal directories.