As mentioned above, instances of windowItem are the elements displayed in a window. The windowItem pattern defines attributes common to all the different types of window items, defined in the different Lidskjalv libraries.
Window items are organized in a father-child hierarchy with respect to some canvas (or the contents canvas of a window) and all items have a father. The father defines the coordinate system for the children (e.g. the position of each child is relative to the position of the father, such that moving the father also moves the children). The father attribute of a window item refers to the canvas that this window item is a child of. WindowItem defines attributes for accessing and changing the position and size of the item and for controlling the visibility of the window item.
All window items are able to receive events from the user, and defines an event handler (similar to windows) to take care of these events. The enable and disable attributes are used to control whether the item will react to these events or not (i.e. a disabled window item will ignore e.g. onMouseDown events eventhough an event pattern is defined for onMouseDown event in that window item). The event patterns defined in the event handler of window items are: OnFatherChanged, ChangedFrame, OnFatherChanged, onMouseDown, onMouseUp, onKeyDown, onEnableTarget, onDisableTarget, onRefresh, onActivate and onDeactivate. Specific behavior for these events can be specified by further binding the appropriate event pattern.
Lidskjalv: User Interface Framework - Tutorial | © 1995-2004 Mjølner Informatics |
[Modified: Friday October 20th 2000 at 14:59]
|