[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[WI8] WI8Window

WI8Window is the base class for all in-page widgets.
The concept of parent is introduced to allow the widgets to refer to upper level elements.
Also a name instance variable is used for the widgets (name is obtained via registration with the parent).
Finally an opened/closed status is maintained by the widgets.

Hierarchy

WI8Window inherits from [WI8] WI8Widget.

Instance Variables

nameUnlike desktop when you deal with multiple widgets you need to name them
parentAllows to refer to upper level elements in the composition hierarchy
openedWidget opened status

Relevant Methods

Class

@Open an WI8Window passing a name or a handler
domEventsReturns list of supported DOM events (see events below)
htmlSupportReturns HTMLDiv
text:Creates WI8Window that shows the passed text
title:Creates WI8Window that shows the passed text as a title

Instance

actionWidgetFrom: specUtility to return an action widget based on spec over self (eg. an image widget)
actionWidgetFrom: spec in: repository on: aReceiverUtility to return an action widget based on spec over a receiver (eg. an image widget)
addChild:Adds a child widget to the receiver
centerAdds a child center element to the receiver
closeReceiver is closed and removed as child of its parent
createElement: aTagCreates a GUI element with tag in the receiver's document
defaultMakeupSets the style of the receiver (left empty)
desktopReturns the top level container (from parent or from superclass)
hideWindowHide window via style setting
imageWidget:-
imageWidget:in:-
initializeNameGets name from parent or current desktop
isHiddenReturn whether receiver is currently hidden
isOpenReturn whether receiver is currently opened
open:in:Opens the receiver as a child of a container.
resetRefined by subclasses
showWindow-
tag-
touchStart:in:-
updateReset and configure the receiver


Events

WI8Widget can handle the following events (besides the ones inherited from its superclass):

DOM Events

click:Mouse clicked
dblclick:Mouse double clicked
mouseDown:Mouse down
mouseMove:Mouse moved
mouseOver:Mouse over
mouseOut:Mouse out
mouseUp:Mouse up
keyDown:Key down
keyPress:Key pressed
keyUp:Key up

Local Events

makeup-
makeup:-
startDrag:in:Start drag and drop gesture
canDragSource:Verify if drag and drop is supported
startDragSource:-
needsObjectToDrop:into:-

DOM Events

click:A mousedown and mouseup event occured on the same element. Or the user activated the element that has the keyboard focus (usually by pressing Enter or the space bar).
dblclick:Two mouse click events occured on the same element within a reasonable time
mouseDown:A user pressed a mouse button over an element
mouseMove:The pointer is moving while it is over an element
mouseOver:The mouse pointer is moved onto an element, or onto one of its children
mouseOut:The mouse pointer is moved out of an element, or out of one of its children
mouseUp:A user released a mouse button over an element
keyDown:-
keyPress:-
keyUp-

References