kCADEventPhaseBefore
Clicking to start drawing a new object,
triggers a kCADEventPhaseBefore phase of the kCADEventIDObjCreate event.
The action can be intercepted.
| IO | Parameter | Type | Description
|
| in | theCADArea | longint | Area ID
|
| in | theEventID | longint | kCADEventIDObjCreate
|
| in | theEventPhase | longint | kCADEventPhaseBefore
|
| in | theEventData1 | longint | Current Layer or Sublayer ID
|
| in | theEventData2 | longint | Mode on the Mode palette (without the effect of modifiers keys), a mode constant
|
| in | theEventData3 | longint | kCADTrue if the mouse cursor is snapped, kCADFalse if not
|
| in | theEventData4 | longint | 0
|
| in | theMouseX | real | Mouse X-coordinate, optionally snapped
|
| in | theMouseY | real | Mouse Y-coordinate, optionally snapped
|
| in | theEventValue1 | real | Unsnapped mouse X-coordinate
|
| in | theEventValue2 | real | Unsnapped mouse Y-coordinate
|
| 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 the new object has been drawn.
You can do any needed post-processing or you can replace the new object with something else.
| IO | Parameter | Type | Description
|
| in | theCADArea | longint | Area ID
|
| in | theEventID | longint | kCADEventIDObjCreate
|
| in | theEventPhase | longint | kCADEventPhaseAfter
|
| in | theEventData1 | longint | Object ID of the new object
|
| in | theEventData2 | longint | Type of the new object, a object type constant
|
| in | theEventData3 | longint | Target object scope of newly created objects.
You can add objects to or remove objects from this scope.
This will change the selection of objects on which a successive undo action will operate.
This is useful if you are removing the new object, replacing it with something else
|
| in | theEventData4 | longint | 0
|
| in | theMouseX | real | 0.0
|
| in | theMouseY | real | 0.0
|
| in | theEventValue1 | real | 0.0
|
| in | theEventValue2 | real | 0.0
|
| in | theKeyAsciiValue | integer | 0
|
| in | theModifiers | longint | 0
|
| in | theTickCount | longint | Tick count of the system software (a tick is a 1/60th of a second)
|
| out | theEventResult | longint | Set to kCADEventResultTriggerUndoRedo to trigger an undo and redo.
Set to kCADEventResultTriggerUndoOnly to trigger an undo only.
Set to kCADEventResultTriggerNone to trigger nothing.
|