WT Toolkit 0.3.3

Class wtWidget

Object
   |
   +--wtObject
         |
         +--wtWidget
Direct Known Subclasses:
wtView, wtDisplayRow, wtRowLayout, wtImage, wtNotebook, wtRadioButton, wtCheckBox, wtButton, wtToolbar, wtColumnLayout, wtShadowWidget, wtDisplay, wtFormWidget, wtSpacer, wtAnchor, wtDisplayCell, wtToolbarItem

class wtWidget
extends wtObject


The base class of all visible widgets.

Available signals:


Defined in wt_widget.js


Constructor Summary
wtWidget(<wtWidget> _parent, <String> _tagName)
            Constructs a widget based on a DOM node
 
Method Summary
 wtWidget addWidget(<wtWidget|String> obj)
           Adds a wtWidget inside this widget
 void clearAll()
           Clears the contents of the widget.
 Object getAbsolutePosition()
           Gets the widget's current position relative to the upper left hand corner of its parent container
 Object getScreenPosition()
           Gets the widget's current position relative to the upper left hand corner of the screen
 Object getStyle(<String> name)
           Gets a CSS style attribute value
 Boolean isAncestorOf(<wtWidget> widget)
           Tells if this widget is an ancenstor of another widget in the DOM tree
 Boolean isEnabled()
           Tells whether the widget is currently enabled or not

You may want to override this operation as well if you have overriden setEnabled() in your custom widget
 Boolean isInside(<Number> x, <Number> y)
           Tells whether a coordiate is inside the rectangular bounding box of the widget
 void linkSignal(<String> signalName, <String> eventName)
           Links a DOM object's event hook (e.g.
 void removeSelf()
           Destroys the widget
 void setAbsolutePosition(<Number> x, <Number> y)
           Sets the widget's position to (+x, +y) relative to the upper left hand corner of its parent container
 void setAlpha(<Number> opacity)
           Sets the alpha transparency of the widget
 void setDisplay(<Boolean> yes)
           Sets whether to display the widget or not

This function differs from wtWidget.setVisible() in which an non-displayed widget would not occupy space
 void setDragArea(<Number> leftLimit, <Number> topLimit, <Number> rightLimit, <Number> bottomLimit)
           Sets the bounding area at which the widget can be dragged by the mouse cursor
 void setDraggable(<Boolean> yes)
           Sets whether the widget should be draggable
 void setEnabled(<Boolean> yes)
           Sets the widget to be enabled or not.

This general setEnabled() function only works reliably in Internet Explorer due to a layout bug in the GEcko engine If you need to use setEnabled() in your own widget classes, it is advisable to override this function unless you're sure the default implementation works
 void setLevel(<Number> level)
           Sets the z-axis position of the widget.
 void setPosition(<Number> x, <Number> y)
           Sets the widget's position to (+x, +y) relative to it's current position
 void setRelativePosition(<Number> x, <Number> y)
           Sets the widget's position to (+x, +y) relative to its natural position
 void setSelectable(<Boolean> yes)
           Sets the widget to selectable or not

Note that this function is bugged in Internet Explorer, in which an "unselectable" widget can still be selected by dragging over a larger area or by draggable over irrelevant widgets This issue is not likely to be solved since it is a bug in Internet Explorer
 void setSize(<String> _width, <String> _height)
           Set the widget's size
 void setStaticPosition()
           Sets the widget's position to static.
 void setStyle(<String> name, <String> value)
           Sets a CSS style attribute value
 void setVisible(<Boolean> yes)
           Sets the widget's visibility

This function differs from wtWidget.setDisplay() in which an invisible widget would still occupy space
 void unsetDragArea()
           Unsets the bounding area for dragging to the default behavior at which the widget can be dragged as long as the mouse cursor is positioned over the widget
 
Methods inherited from class wtObject
startProxy, endProxy, toString, connect, disconnect, emit, setSlot, removeSlot, setSignal, removeSignal, get, set, addDependency, clearLapsedListeners
 

Constructor Detail

wtWidget

wtWidget(<wtWidget> _parent, <String> _tagName)

Method Detail

addWidget

wtWidget addWidget(<wtWidget|String> obj)

clearAll

void clearAll()

getAbsolutePosition

Object getAbsolutePosition()

getScreenPosition

Object getScreenPosition()

getStyle

Object getStyle(<String> name)

isAncestorOf

Boolean isAncestorOf(<wtWidget> widget)

isEnabled

Boolean isEnabled()

isInside

Boolean isInside(<Number> x, <Number> y)

linkSignal

void linkSignal(<String> signalName, <String> eventName)

removeSelf

void removeSelf()

setAbsolutePosition

void setAbsolutePosition(<Number> x, <Number> y)

setAlpha

void setAlpha(<Number> opacity)

setDisplay

void setDisplay(<Boolean> yes)

setDragArea

void setDragArea(<Number> leftLimit, <Number> topLimit, <Number> rightLimit, <Number> bottomLimit)

setDraggable

void setDraggable(<Boolean> yes)

setEnabled

void setEnabled(<Boolean> yes)

setLevel

void setLevel(<Number> level)

setPosition

void setPosition(<Number> x, <Number> y)

setRelativePosition

void setRelativePosition(<Number> x, <Number> y)

setSelectable

void setSelectable(<Boolean> yes)

setSize

void setSize(<String> _width, <String> _height)

setStaticPosition

void setStaticPosition()

setStyle

void setStyle(<String> name, <String> value)

setVisible

void setVisible(<Boolean> yes)

unsetDragArea

void unsetDragArea()

WT Toolkit 0.3.3

Documentation generated by JSDoc on Sun May 13 11:26:24 2007