kCADEventPhaseBefore
Selecting objects with a single mouse click, a selection rectangle or a touching line
triggers a kCADEventPhaseBefore phase of the kCADEventIDSelectDeselect event.
The action can be intercepted.
Selecting objects is described in detail in the sections Intersect mode, Enclose mode, Touch mode, Translate mode and Reshape mode.
| IO | Parameter | Type | Description
|
| in | theCADArea | longint | Area ID
|
| in | theEventID | longint | kCADEventIDSelectDeselect
|
| in | theEventPhase | longint | kCADEventPhaseBefore
|
| in | theEventData1 | longint | kCADTrue for a single click, kCADFalse for a selecting rectangle or line
|
| in | theEventData2 | longint | Mode on the Mode palette (without the effect of modifiers keys), a mode constant
|
| in | theEventData3 | longint | Selection action or 0, a selection action constant
|
| in | theEventData4 | longint | 0 (or string ObjID for kCADModeWriteString)
|
| in | theMouseX | real | Selection box low X-coordinate (or selection line start X-coordinate
for mode kCADModeTouch, or snap X-coordinate for mode kCADModeWriteString)
|
| in | theMouseY | real | Selection box low Y-coordinate (or selection line start Y-coordinate
for mode kCADModeTouch, or snap Y-coordinate for mode kCADModeWriteString)
|
| in | theEventValue1 | real | Selection box high X-coordinate (or selection line end X-coordinate
for mode kCADModeTouch, or snap X-coordinate for mode kCADModeWriteString)
|
| in | theEventValue2 | real | Selection box high Y-coordinate (or selection line end
Y-coordinate for mode kCADModeTouch, or snap Y-coordinate for mode kCADModeWriteString)
|
| in | theKeyAsciiValue | integer | 0
|
| in | theModifiers | longint | Sum of pressed modifier keys, a mask of modifier key constants
|
| in | theTickCount | longint | Tick count of the system software (a tick is a 1/60th of a second)
|
| out | theEventResult | longint | Set to kCADEventResultDoFilter to filter out the event or to
kCADEventResultDontFilter to let it pass.
|
kCADEventPhaseAfter
An kCADEventPhaseAfter phase is generated when the kCADEventPhaseBefore phase
passed and objects have been selected or deselected.
| IO | Parameter | Type | Description
|
| in | theCADArea | longint | Area ID
|
| in | theEventID | longint | kCADEventIDSelectDeselect
|
| in | theEventPhase | longint | kCADEventPhaseAfter
|
| in | theEventData1 | longint | Object ID or 0
|
| in | theEventData2 | longint | Mode on the Mode palette (without the effect of modifiers keys), a mode constant
|
| in | theEventData3 | longint | Count of selected objects
|
| in | theEventData4 | longint | 0 (or string ObjID for kCADModeWriteString)
|
| in | theMouseX | real | Selection box low X-coordinate (or selection line start X-coordinate
for mode kCADModeTouch, or snap X-coordinate for mode kCADModeWriteString)
|
| in | theMouseY | real | Selection box low Y-coordinate (or selection line start Y-coordinate
for mode kCADModeTouch, or snap Y-coordinate for mode kCADModeWriteString)
|
| in | theEventValue1 | real | Selection box high X-coordinate (or selection line end X-coordinate
for mode kCADModeTouch, or snap X-coordinate for mode kCADModeWriteString)
|
| in | theEventValue2 | real | Selection box high Y-coordinate (or selection line end Y-coordinate
for mode kCADModeTouch, or snap Y-coordinate for mode kCADModeWriteString)
|
| in | theKeyAsciiValue | integer | 0
|
| in | theModifiers | longint | Sum of pressed modifier keys, a mask of modifier key constants
|
| in | theTickCount | longint | Tick count of the system software (a tick is a 1/60th of a second)
|
| in/out | theEventResult | longint | Don’t change.
|
This event can be followed by a kCADEventIDObjReshape,
kCADEventIDObjTranslate, kCADEventIDObjDoubleClick or
kCADEventIDWriteString event.