Documentation ¶
Index ¶
- Constants
- type Attrs
- type Canvas
- func (c *Canvas) BeginPath()
- func (c *Canvas) Clear()
- func (c *Canvas) Dim() (int, int)
- func (c *Canvas) Ellipse(center draw.Pt, rX, rY int, rot float64, startAngle, endAngle float64, ...)
- func (c *Canvas) Elt() *Elt
- func (c *Canvas) Fill()
- func (c *Canvas) FillStyle(fs string)
- func (c *Canvas) FillText(s string, p draw.Pt)
- func (c *Canvas) Font(fs string)
- func (c *Canvas) InitCtx()
- func (c *Canvas) LineTo(p draw.Pt)
- func (c *Canvas) MoveTo(p draw.Pt)
- func (c *Canvas) Rect(x, y, width, height int)
- func (c *Canvas) Stroke()
- func (c *Canvas) StrokeStyle(fs string)
- func (c *Canvas) StrokeText(s string, p draw.Pt)
- type Document
- func (d *Document) Callback(eventType string, elt *Elt, cb ElementCallback)
- func (d *Document) CreateElementNode(tag string) (js.Value, error)
- func (d *Document) GetGlobal(names ...string) js.Value
- func (d *Document) Location() *url.URL
- func (d *Document) Run(root *Elt)
- func (d *Document) SignalRender()
- type ElementCallback
- type Elt
- func (e *Elt) AddAttr(k, v string)
- func (e *Elt) Append(elts ...*Elt)
- func (e *Elt) GetPath(names ...string) js.Value
- func (e *Elt) GetValue() string
- func (e *Elt) Hide()
- func (e *Elt) Invalidate()
- func (e *Elt) Is(target js.Value) bool
- func (e *Elt) IsHidden() bool
- func (e *Elt) IsVisible() bool
- func (e *Elt) Key() string
- func (e *Elt) Remove(re *Elt)
- func (e *Elt) RemoveAll()
- func (e *Elt) Replace(re *Elt, ne *Elt)
- func (e *Elt) ReplaceCollection(new *Elt)
- func (e *Elt) Show()
- type EltMod
- type Elts
- type Event
- type LCC
- type LCEvent
Constants ¶
View Source
const ( ClickEvent = "click" DblclickEvent = "dblclick" MousedownEvent = "mousedown" MouseupEvent = "mouseup" MouseoverEvent = "mouseover" MousemoveEvent = "mousemove" MouseoutEvent = "mouseout" KeydownEvent = "keydown" KeypressEvent = "keypress" KeyupEvent = "keyup" LoadEvent = "load" UnloadEvent = "unload" AbortEvent = "abort" ResizeEvent = "resize" ScrollEvent = "scroll" ChangeEvent = "change" SubmitEvent = "submit" ResetEvent = "reset" FocusEvent = "focus" BlurEvent = "blur" )
View Source
const ( DivTag = "div" SpanTag = "span" InputTag = "input" ButtonTag = "button" StyleTag = "style" H1Tag = "h1" H2Tag = "h2" H3Tag = "h3" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
func (*Canvas) StrokeStyle ¶
type Document ¶
func NewDocument ¶
func (*Document) Callback ¶
func (d *Document) Callback(eventType string, elt *Elt, cb ElementCallback)
Callbacks
func (*Document) CreateElementNode ¶
func (*Document) SignalRender ¶
func (d *Document) SignalRender()
type ElementCallback ¶
type ElementCallback func(e *Event)
type Elt ¶
type Elt struct { js.Value Tag string Attrs Attrs Childs Elts Data string Callbacks map[string]ElementCallback LCC LCC // contains filtered or unexported fields }
func (*Elt) Invalidate ¶
func (e *Elt) Invalidate()
func (*Elt) ReplaceCollection ¶
Click to show internal directories.
Click to hide internal directories.