kCADEventPhaseBefore
Pressing a button in the Tool palette, triggers a kCADEventPhaseBefore phase of the
kCADEventIDCommand event.
The action can be intercepted or applied to a modified scope of objects.
| IO | Parameter | Type | Description
|
| in | theCADArea | longint | Area ID
|
| in | theEventID | longint | kCADEventIDCommand
|
| in | theEventPhase | longint | kCADEventPhaseBefore
|
| in | theEventData1 | longint | Command ID, a command constant
|
| in | theEventData2 | longint | Target object scope of selected objects, not included objects with a relevant lock.
You can add objects to or remove objects from this scope
This will change the selection of objects on which the action will take place
|
| in | theEventData3 | longint | Object count in above scope
|
| in | theEventData4 | longint | 0
|
| in | theMouseX | real | Horizontal mouse coordinate in pixels
|
| in | theMouseY | real | Vertical mouse coordinate in pixels
|
| in | theEventValue1 | real | 0.0
|
| in | theEventValue2 | real | 0.0
|
| 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 action has taken place.
You can control a successive undo and its scope of objects.
| IO | Parameter | Type | Description
|
| in | theCADArea | longint | Area ID
|
| in | theEventID | longint | kCADEventIDCommand
|
| in | theEventPhase | longint | kCADEventPhaseAfter
|
| in | theEventData1 | longint | Command ID, a command constant
|
| in | theEventData2 | longint | Target object scope on which action was taken.
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 take
place
|
| in | theEventData3 | longint | Object count in above scope
|
| in | theEventData4 | longint | 0
|
| in | theMouseX | real | Horizontal mouse coordinate in pixels
|
| in | theMouseY | real | Vertical mouse coordinate in pixels
|
| in | theEventValue1 | real | 0.0
|
| in | theEventValue2 | real | 0.0
|
| in | theKeyAsciiValue | integer | 0
|
| in | theModifiers | longint | 0
|
| in | theTickCount | longint | 0
|
| 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.
|