Documentation ¶
Index ¶
- type Compatible
- type Stage
- func (e *Stage) Add(value interface{}) (ref *Stage)
- func (e *Stage) AddListener(eventType interface{}, manager mouse.SimpleManager) (ref *Stage)
- func (e *Stage) Append(value interface{}) (ref *Stage)
- func (e *Stage) Get() js.Value
- func (e Stage) GetById(id string) (element interface{})
- func (e Stage) GetHeight() (height int)
- func (e Stage) GetWidth() (width int)
- func (e *Stage) Init()
- func (e *Stage) MouseAuto() (ref *Stage)
- func (e *Stage) MouseHide() (ref *Stage)
- func (e *Stage) Remove(value interface{}) (ref *Stage)
- func (e *Stage) RemoveListener(eventType interface{}) (ref *Stage)
- func (e *Stage) ResizeToScreen() (ref *Stage)
- func (e *Stage) SetMouse(value mouse.CursorType) (ref *Stage)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compatible ¶
type Stage ¶
type Stage struct {
// contains filtered or unexported fields
}
func (*Stage) Add ¶
Add
English:
Adds an element to the document. Input: value: js.Value element containing an html document.
Português:
Adiciona um elemento ao documento. Entrada: value: elemento js.Value contendo um documento html.
func (*Stage) AddListener ¶
func (e *Stage) AddListener(eventType interface{}, manager mouse.SimpleManager) (ref *Stage)
AddListener
English:
Associates a function with a mouse event. Example: stage.AddListener(browserMouse.KEventMouseOver, onMouseEvent) timer := time.NewTimer(10 * time.Second) go func() { select { case <-timer.C: stage.RemoveListener(mouse.KEventMouseOver) } }()
Português:
Associa uma função a um evento do mouse. Exemplo: stage.AddListener(browserMouse.KEventMouseOver, onMouseEvent) timer := time.NewTimer(10 * time.Second) go func() { select { case <-timer.C: stage.RemoveListener(mouse.KEventMouseOver) } }() func onMouseEvent(event browserMouse.MouseEvent) { isNull, target := event.GetRelatedTarget() if isNull == false { log.Print("id: ", target.Get("id")) log.Print("tagName: ", target.Get("tagName")) } log.Print(event.GetScreenX()) log.Print(event.GetScreenY()) }
func (Stage) GetById ¶
GetById
Português:
Retorna a referência do elemento através do seu ID. Entrada: id: string que diferência maiúsculas e minúsculas representando o ID único do elemento sendo procurado. Nota: * Elemento é uma referência a um objeto Element, ou null se um elemento com o ID especificado não estiver contido neste documento. * Se não existe um elemento com o id fornecido, esta função retorna null. Note, o parâmetro ID diferência maiúsculas e minúsculas. Assim document.getElementById("Main") retornará null ao invés do elemento <div id="main">, devido a "M" e "m" diferirem para o objetivo deste método; * Elementos que não estão no documento não são procurados por getElementById. Quando criar um elemento e atribuir um ID ao mesmo, você deve inserir o elemento na árvore do documento com insertBefore ou método similar antes que você possa acessá-lo com getElementById: var elemento = document.createElement("div"); elemento.id = 'testqq'; var el = document.getElementById('testqq'); // el será null! * Documentos não-HTML, a implementação do DOM deve ter informações que diz quais atributos são do tipo ID. Atributos com o nome "id" não são do tipo ID a menos que assim sejam definidos nos documentos DTD. O atributo id é definido para ser um tipo ID em casos comuns de XHTML, XUL, e outros. Implementações que não reconhecem se os atributos são do tipo ID, ou não são esperados retornam null.
func (Stage) GetHeight ¶
GetHeight
English:
Returns the length of the document in pixels. Output: width: document size in pixels.
Português:
Retorna a altura do documento em pixels. Saída: width: tamanho do documento em pixels.
func (Stage) GetWidth ¶
GetWidth
English:
Returns the width of the document in pixels. Output: width: document size in pixels.
Português:
Retorna o comprimento do documento em pixels. Saída: width: tamanho do documento em pixels.
func (*Stage) Init ¶
func (e *Stage) Init()
Init
English:
Initializes the document with the browser's main document.
Português:
Inicializa o documento com o documento principal do navegador.
func (*Stage) MouseAuto ¶
MouseAuto
English:
Sets the mouse pointer to auto.
Português:
Define o ponteiro do mouse como automático.
func (*Stage) MouseHide ¶
MouseHide
English:
Sets the mouse pointer to hide.
Português:
Define o ponteiro do mouse como oculto.
func (*Stage) Remove ¶
Remove
English:
Removes an html element from the document. Input: value: js.Value element containing an html document.
Português:
Remove um elemento html do documento. Entrada: value: elemento js.Value contendo um documento html.
func (*Stage) RemoveListener ¶
func (*Stage) ResizeToScreen ¶
ResizeToScreen
English:
Resizes the document to the size of the main document.
Português:
Redimensiona o documento para o tamanho do documento principal.
func (*Stage) SetMouse ¶
func (e *Stage) SetMouse(value mouse.CursorType) (ref *Stage)
SetMouse
English:
Defines the shape of the mouse pointer. Input: value: mouse pointer shape. Example: SetMouse(mouse.KCursorCell) // Use mouse.K... and let autocomplete do the rest
Português:
Define o formato do ponteiro do mouse. Entrada: value: formato do ponteiro do mouse. Exemplo: SetMouse(mouse.KCursorCell) // Use mouse.K... e deixe o autocompletar fazer o resto
Click to show internal directories.
Click to hide internal directories.