|
WT Toolkit 0.3.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--wtObject | +--wtWidget
The base class of all visible widgets.
Available signals:
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> _parent, <String> _tagName)
_parent
- The container widget to add this widget to. Can also be a DOM node like document.body. Fill in null if you don't want to immediately add this widget to a container.
_tagName
- The new DOM node's HTML tag
Method Detail |
wtWidget addWidget(<wtWidget|String> obj)
obj
- The wtWidget to be added. Alternatively, you may add a string to be displayed inside the widget.
void clearAll()
Object getAbsolutePosition()
Object getScreenPosition()
Object getStyle(<String> name)
name
- CSS style name
Boolean isAncestorOf(<wtWidget> widget)
widget
- The other widget
Boolean isEnabled()
Boolean isInside(<Number> x, <Number> y)
x
- The position on x-axis
y
- The position on y-axis
void linkSignal(<String> signalName, <String> eventName)
signalName
- wtObject signal name
eventName
- DOM object event hook name
void removeSelf()
void setAbsolutePosition(<Number> x, <Number> y)
x
- The widget's offset on x-axis
y
- The widget's offset on y-axis
void setAlpha(<Number> opacity)
opacity
- The opacity of the widget in the range [0.0, 1.0], with 0.0 meaning completely transparent and 1.0 meaning completely opaque
void setDisplay(<Boolean> yes)
yes
- Whether the widget should be displayed or not
void setDragArea(<Number> leftLimit, <Number> topLimit, <Number> rightLimit, <Number> bottomLimit)
leftLimit
- The left side of the bounding box
topLimit
- The top side of the bounding box
rightLimit
- The right side of the bounding box
bottomLimit
- The bottom side of the bounding box
void setDraggable(<Boolean> yes)
yes
- The widget should be draggable or not
void setEnabled(<Boolean> yes)
yes
- Whether the widget is enabled or not
void setLevel(<Number> level)
level
- The widget's z-axis position
void setPosition(<Number> x, <Number> y)
x
- The widget's offset on x-axis
y
- The widget's offset on y-axis
void setRelativePosition(<Number> x, <Number> y)
x
- The widget's offset on x-axis
y
- The widget's offset on y-axis
void setSelectable(<Boolean> yes)
yes
- Whether the widget is selectable or not
void setSize(<String> _width, <String> _height)
_width
- The widget's width as a CSS length quantity
_height
- The widget's height as a CSS height quantity
void setStaticPosition()
void setStyle(<String> name, <String> value)
name
- CSS style name
value
- CSS style value
void setVisible(<Boolean> yes)
yes
- Whether the widget should be visible or not
void unsetDragArea()
|
WT Toolkit 0.3.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |