Next: , Previous: CADOnError, Up: CAD areas and methods


6.6 CADOnEvent

CADOnEvent is not a callable method, but a prototype of a 4D method that you install as an event callback method. 4D CAD will call the method when specific events occur.

IO Parameter Type
in theCADArea longint Area ID
in theEventID longint An event ID constant
in theEventPhase longint An event phase constant
in theEventData1 longint See CAD events
in theEventData2 longint See CAD events
in theEventData3 longint See CAD events
in theEventData4 longint See CAD events
in theMouseX real
in theMouseY real
in theEventValue1 real See CAD events
in theEventValue2 real See CAD events
in theKeyAsciiValue integer
in theModifiers longint A mask of modifier key constants
in theTickCount longint
in/out theEventResult longint

For a description of the parameters, see the chapter on CAD events. For an example, see EDtCEvent and EBlockEdEvent in DemoCAD. Also see the sections on Event handling, Undo handling and Copy and paste control.

Important
You must type the parameters of callback methods, otherwise 4D will crash in a compiled application.

Related methods
CADGetOnEvent, CADSetOnEvent, CADGetOnError, CADSetOnError, CADOnError.