dlAddEventObject
dlAddEventObject(
w_dlist
l_point1
l_point2
t_procName
t_procArgs
[ t_highlightMode ]
[ g_doesGraphics ]
[ s_tagSymbol ]
)
=> t / nil
Description
Adds an EventObject to the display list. EventObjects are SKILL procedures called whenever the user presses a mouse button or a keyboard key. If the s_doesGraphics argument is t, the EventObject is called whenever the display list is drawn.
Arguments
|
w_dlist
|
Display list to add to.
|
|
l_point1 and l_point2
|
The lower-left and upper-right coordinates of a box, within which the SkillObject will draw. The display list processing functions use this box to determine the visibility of the SkillObject. The procedure you write to define the SkillObject must be written to draw and then return as quickly as possible. If not, the performance of the system will suffer.
|
|
t_procName
|
SKILL function to call.
The t_procName procedure is called in the following manner:
t_procName( l_point1 l_point2 s_eventType t_eventDetail t_procArgs)
s_eventType is one of the following symbols:
draw (the display list is drawing)
button1 (the left mouse button was pressed)
button2 (the middle mouse button was pressed)
button3 (the right mouse button was pressed)
key (a key was pressed)
In the case of the key eventType, the t_eventDetail tells you which key was pressed. Otherwise, the eventDetail argument is nil.
|
|
t_procArgs
|
Arguments passed to the function.
|
|
t_highlightMode
|
When the user enters into an event object, you can specify the system to draw a box around the sensitive area, or invert the sensitive area, or to do nothing. These are specified by box (or b), invert (or i), or none. The default value is none.
|
|
g_doesGraphics
|
Tells the display list processing functions whether you use dlDraw functions inside your SKILL procedure or not. dlDraw functions are discussed later on. If you don’t call dlDraw functions, the rendering of your display list will be faster. This argument should be t or nil.
|
|
s_tagSymbol
|
Symbol to tag this object with.
|
Value Returned
|
t
|
Operation successful.
|
|
nil
|
Operation failed.
|
Related Topics
Add Objects to the Display List
Return to top