13 lines
6.2 KiB
Plaintext
13 lines
6.2 KiB
Plaintext
en·vÅos REGION
|
||
2
|
||
|
||
4
|
||
|
||
1
|
||
|
||
REGION
|
||
1
|
||
|
||
4
|
||
|
||
By: Christopher Lane (Lane@Sumex-Aim.Stanford.Edu)
|
||
REGION facilitates having multiple complex cursor behaviors in a single window without having the CURSORMOVEDFNs, CURSORINFNs, CURSOROUTFNs, and BUTTONEVENTFNs of the behaviors know about each other. In its simplest form it can be used to implement active regions.
|
||
To use, set the various window functions of the window to the REGION window functions and put a list of REGIONEVENT records on the REGIONEVENTLST property of the window. When the cursor moves over the window, REGION checks which region it is in, calls the CURSOROUTFN of the previous region and the CURSORINFN of the new region. If regions overlap, then the appropriate functions will be called on all regions affected by the mouse event.
|
||
The REGIONEVENTLST property of the window should contain a list of REGIONEVENT records which have the fields:
|
||
EVENTREGION A REGION record which is the region of the window over which the region specific functions will be invoked.
|
||
REGIONBUTTONFN (WINDOW POSITION REGION REGIONEVENT)
|
||
REGIONMOVEDFN (WINDOW POSITION REGION REGIONEVENT)
|
||
REGIONINFN (WINDOW REGION REGIONEVENT)
|
||
REGIONOUTFN (WINDOW REGION REGIONEVENT)
|
||
REGIONREPAINTFN (WINDOW REGION REGIONEVENT)
|
||
ACTIVEREGION Boolean indicating if the region is active or not.
|
||
REGIONFLAGS User defined identification flags.
|
||
REGIONUSERDATA User defined field.
|
||
All of the fields in the REGIONEVENT record are optional. If a REGIONEVENT record has a NIL EVENTREGION, then it is considered the default REGIONEVENT and will be invoked whenever a mouse event occurs outside of any other region.
|
||
The REGION window functions are:
|
||
(WINDOWPROP WINDOW 'CURSORINFN (FUNCTION REGIONINFN))
|
||
(WINDOWPROP WINDOW 'CURSOROUTFN (FUNCTION REGIONOUTFN))
|
||
(WINDOWPROP WINDOW 'REPAINTFN (FUNCTION REGIONREPAINTFN))ÿÿ |