Home :: GUI :: Widgets

  1. Introduction
  2. Reference
    1. Object Variables
      1. VERSION
    2. Methods
      1. constructor
      2. init
      3. realize
      4. buildSVG
      5. addEventListeners
      6. textToSVG
      7. getUserCoordinate
      8. getTransformToElement
      9. handleEvent
    3. Properties
      1. x
      2. y
      3. nodes
  3. Download

Introduction

Widget is an object from which other GUI objects on this site inherit. This object encapsulates a common set of functionality to be used by other GUI objects.

This is an abstract object that will not be used directly. This page exists to describe the functionality contained within this object.


Reference

Object Variables

Widget.VERSION

This number represents the current version for this implementation of the Widget object. This property can be used by scripts to check that the correct version of the object is being used.

Methods

constructor - new Widget(x, y);

This method creates a new Widget object.

init();

realize(svgParentNode);

buildSVG();

addEventListeners();

textToSVG(text); // returns SVG Document Fragment

getUserCoordinate(node, x, y); // returns an SVGPoint

getTransformToElement(node); // returns an SVGMatrix

handleEvent(e);

Properties

nodes.parent is the SVG parent node of the widget.


Download

Widget.js