In Write string mode, preference settings of CADSetAreaPrefs determine whether
string editing is handled by the application or by the built-in string editor.
If string editing is to be handled
by the application, then a mouse click triggers a kCADEventPhaseDuring phase of
kCADEventIDWriteString.
If string editing is handled by the built-in string editor, then
the following events are triggered instead:
kCADEventPhaseBefore phase when the string edit-box is about to be displayed
kCADEventPhaseAfter phase when the string edit-box is canceled or accepted.
kCADEventPhaseBefore
| IO | Parameter | Type | Description
|
| in | theCADArea | longint | Area ID
|
| in | theEventID | longint | kCADEventIDWriteString
|
| in | theEventPhase | longint | kCADEventPhaseBefore
|
| in | theEventData1 | longint | the Object ID of the string object
|
| in | theEventData2 | longint | kCADTrue is the string object is a new object,
kCADFalse if not
|
| in | theEventData3 | longint | 0
|
| 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 (also see CADGetAreaPrefs and CADSetAreaPrefs)
|
| 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.
|
kCADEventPhaseDuring
| IO | Parameter | Type | Description
|
| in | theCADArea | longint | Area ID
|
| in | theEventID | longint | kCADEventIDWriteString
|
| in | theEventPhase | longint | kCADEventPhaseDuring
|
| in | theEventData1 | longint | Current Layer or Sublayer ID
|
| in | theEventData2 | longint | 0
|
| in | theEventData3 | longint | kCADTrue if the mouse cursor is snapped, kCADFalse if not
|
| in | theEventData4 | longint | Target object scope, initially empty.
If you add objects to this scope,
they will be removed by a successive undo action
|
| 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 (also see CADGetAreaPrefs and CADSetAreaPrefs)
|
| 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.
The default undo action removes those objects that were added to the target object scope.
|
kCADEventPhaseAfter
| IO | Parameter | Type | Description
|
| in | theCADArea | longint | Area ID
|
| in | theEventID | longint | kCADEventIDWriteString
|
| in | theEventPhase | longint | kCADEventPhaseAfter
|
| in | theEventData1 | longint | the Object ID of the string object
|
| in | theEventData2 | longint | kCADTrue is the string object is a new object, kCADFalse if not
|
| in | theEventData3 | longint | kCADTrue if the edit-box was accepted, kCADFalse if it was canceled
|
| 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 | 0
|
| out | theEventResult | longint | Don’t change.
|