Documentation ¶
Index ¶
- Variables
- func NewLayout(fs http.FileSystem, name xml.Name, parent element.Layout) element.Element
- type Layout
- func (e *Layout) Draw()
- func (e *Layout) GetChild(n int) element.Element
- func (e *Layout) GetChildByID(id string) element.Element
- func (e *Layout) Init(window *pixelgl.Window, bounds *pixel.Rect) error
- func (e *Layout) IsInitialised() bool
- func (e *Layout) NewEvent(window *pixelgl.Window)
- func (e *Layout) NumChildren() int
- func (e *Layout) Reset()
- func (e *Layout) ResetPosition()
- func (e *Layout) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var LayoutTypeName = xml.Name{Space: "http://github.com/bhollier/ui/api/schema", Local: "RelativeLayout"}
The XML name of the element
Functions ¶
Types ¶
type Layout ¶
type Layout struct { // A relative layout is an // element element.Impl // contains filtered or unexported fields }
Layout type for displaying elements relative to each other
func (*Layout) GetChildByID ¶
Function to get one of a layout's child elements by its ID. Returns nil if no child could be found
func (*Layout) IsInitialised ¶
Function to determine whether the element is initialised
func (*Layout) NewEvent ¶
Function that is called when there is a new event. This function only calls NewEvent on the child elements
func (*Layout) NumChildren ¶
Function to get the number element elements a layout has
func (*Layout) ResetPosition ¶
func (e *Layout) ResetPosition()
Function to reset the child element's positions
func (*Layout) UnmarshalXML ¶
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.