Documentation ¶
Index ¶
- func AddElementConstructor(name string, constructor IElementConstructor)
- func Draw(view IView, canvas canvas.Canvas, element IElement)
- func Edge(e IElement, view IView, key string) (float64, float64, float64, float64)
- func Layout(view IView, element IElement)
- type Drawable
- type Element
- func (E *Element) After(e IElement)
- func (E *Element) Append(e IElement)
- func (E *Element) Attributes() map[string]interface{}
- func (E *Element) Before(e IElement)
- func (E *Element) FirstChild() IElement
- func (E *Element) Get(key string) interface{}
- func (E *Element) Id() int64
- func (E *Element) LastChild() IElement
- func (E *Element) Name() string
- func (E *Element) NextSibling() IElement
- func (E *Element) Parent() IElement
- func (E *Element) PrevSibling() IElement
- func (E *Element) Remove()
- func (E *Element) Set(key string, v interface{})
- func (E *Element) SetId(v int64)
- func (E *Element) SetName(v string)
- type IElement
- type IElementConstructor
- type ILayout
- type IView
- type IViewElement
- type IViewProvider
- type TextElement
- type View
- func (V *View) Calculate(v string, base float64, defaultValue float64) float64
- func (V *View) CreateElement(name string) IElement
- func (V *View) DeleteElement(id int64)
- func (V *View) Draw(id int64, canvas canvas.Canvas)
- func (V *View) GetElement(id int64) IElement
- func (V *View) Height() float64
- func (V *View) Layout(id int64)
- func (V *View) Provider() IViewProvider
- func (V *View) Set(id int64, key string, value interface{})
- func (V *View) SetProvider(v IViewProvider)
- func (V *View) SetSize(width float64, height float64)
- func (V *View) SetUnit(name string, scale float64, base float64)
- func (V *View) Width() float64
- type ViewElement
- func (E *ViewElement) ContentHeight() float64
- func (E *ViewElement) ContentWidth() float64
- func (E *ViewElement) Draw(view IView, canvas canvas.Canvas)
- func (E *ViewElement) Height() float64
- func (E *ViewElement) Layout(view IView)
- func (E *ViewElement) SetContentHeight(v float64)
- func (E *ViewElement) SetContentWidth(v float64)
- func (E *ViewElement) SetHeight(v float64)
- func (E *ViewElement) SetWidth(v float64)
- func (E *ViewElement) SetX(v float64)
- func (E *ViewElement) SetY(v float64)
- func (E *ViewElement) Width() float64
- func (E *ViewElement) X() float64
- func (E *ViewElement) Y() float64
- type ViewUnit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddElementConstructor ¶
func AddElementConstructor(name string, constructor IElementConstructor)
Types ¶
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
func (*Element) Attributes ¶
func (*Element) FirstChild ¶
func (*Element) NextSibling ¶
func (*Element) PrevSibling ¶
type IElement ¶
type IElement interface { Id() int64 Name() string Get(key string) interface{} Set(key string, value interface{}) Attributes() map[string]interface{} FirstChild() IElement LastChild() IElement NextSibling() IElement PrevSibling() IElement Append(e IElement) Before(e IElement) After(e IElement) Parent() IElement Remove() // contains filtered or unexported methods }
func NewElement ¶
type IElementConstructor ¶
type IView ¶
type IView interface { CreateElement(name string) IElement DeleteElement(id int64) GetElement(id int64) IElement Set(id int64, key string, value interface{}) SetSize(width float64, height float64) SetUnit(name string, scale float64, base float64) Width() float64 Height() float64 Calculate(v string, base float64, defaultValue float64) float64 Layout(id int64) Draw(id int64, canvas canvas.Canvas) Provider() IViewProvider }
type IViewElement ¶
type IViewProvider ¶
type TextElement ¶
type TextElement struct { ViewElement // contains filtered or unexported fields }
func (*TextElement) Layout ¶
func (E *TextElement) Layout(view IView)
type View ¶
type View struct {
// contains filtered or unexported fields
}
func (*View) CreateElement ¶
func (*View) DeleteElement ¶
func (*View) GetElement ¶
func (*View) Provider ¶
func (V *View) Provider() IViewProvider
func (*View) SetProvider ¶
func (V *View) SetProvider(v IViewProvider)
type ViewElement ¶
type ViewElement struct { Element // contains filtered or unexported fields }
func (*ViewElement) ContentHeight ¶
func (E *ViewElement) ContentHeight() float64
func (*ViewElement) ContentWidth ¶
func (E *ViewElement) ContentWidth() float64
func (*ViewElement) Height ¶
func (E *ViewElement) Height() float64
func (*ViewElement) Layout ¶
func (E *ViewElement) Layout(view IView)
func (*ViewElement) SetContentHeight ¶
func (E *ViewElement) SetContentHeight(v float64)
func (*ViewElement) SetContentWidth ¶
func (E *ViewElement) SetContentWidth(v float64)
func (*ViewElement) SetHeight ¶
func (E *ViewElement) SetHeight(v float64)
func (*ViewElement) SetWidth ¶
func (E *ViewElement) SetWidth(v float64)
func (*ViewElement) SetX ¶
func (E *ViewElement) SetX(v float64)
func (*ViewElement) SetY ¶
func (E *ViewElement) SetY(v float64)
func (*ViewElement) Width ¶
func (E *ViewElement) Width() float64
func (*ViewElement) X ¶
func (E *ViewElement) X() float64
func (*ViewElement) Y ¶
func (E *ViewElement) Y() float64
Click to show internal directories.
Click to hide internal directories.