The AcEdInputContextReactor class defines callbacks that are sent to indicate the beginning and ending of various prompting operations. Input context events can be used to determine when to add and remove input point filters and monitors. They can be used independently, or with other callbacks such as AcEditorReactor::commandWillStart() and AcEditorReactor::commandEnded(), to determine which commands are in progress, which prompt of the command is currently active, and how the user responded.
The following table describes the transitions between the different input states that can be detected using input context events:
Input context events |
|
---|---|
Type |
Description |
Quiescent |
Entered when the beginQuiescentState() callback is made, and exited when the endQuiescentState() callback is made as a result of an AutoCAD command, AutoLISP ® function, or ActiveX input function being initiated. This should be the only state in the stack for a document when it is entered; it cannot be stacked on top of another state. The CMDACTIVE system variable is zero when in this state. |
Geometric, Point |
Entered if the beginGetPoint() callback is made without already being in a Geometric, Nonpoint Transient, Selecting Transient, or Drag Sequence state. Whenever this state is entered, the returned point is the ultimate goal, not an intermediate value. Input point filters and monitors are called for all events in this state. |
Geometric, Nonpoint |
Entered from Geometric, Nonpoint Transient when the beginGetPoint() callback is made. From this state, another call to point input means stacking a new state. Any point is an intermediate value and can be overridden by a directly typed value. This state is exited when any of the endGetAngle(), endGetDistance(), endGetOrientation(), endGetCorner(), or endGetScaleFactor() callbacks are made. Input point filters and monitors are called for all events in this state. |
Selecting |
Entered from Selecting, Transient when the beginGetPoint() callback is made. Input point filters and monitors are called for all events in this state. |
Nongeometric, Nonselecting |
Entered when any of the beginGetString(), beginGetKeyword(), beginGetInteger(), beginGetColor(), or beginGetReal() callbacks are made. These contexts directly poll for input and do not perform object snap, AutoSnap, or input point filtering, even though the cursor is active when interactive digitizer tracking is performed. Forced entity picking must be enabled for input point monitors to get callbacks from this state. Input point filters are not called from this state. |
Drag Sequence |
Entered when the beginDragSequence() callback is made, and exited when the endDragsequence() callback is made. Nested calls to beginGetPoint(), beginGetAngle(), and beginGetDistance() are made in intermediate mode, so no state transition is made. Input point filters and monitors are called for all events in this state. |
Empty Transient |
The outermost input state is exited, and a new one is about to be entered. |
Geometric, Nonpoint Transient |
Entered when the beginGetAngle(), beginGetDistance(), beginGetOrientation(), beginGetCorner(), or beginGetScaleFactor() callbacks are made, except when already in Drag Sequence state. This means that nested prompts will return immediately and a state change is made. Entering this state implies adding an input context to the input state stack for a document. This state always transitions to Geometric, Nonpoint with the beginGetPoint() callback. |
Selecting Transient |
Entered when any of the beginEntsel(), beginNentsel(), or beginSSGet() callbacks are made. Will either be in the immediate mode selection state or will transition into the Selecting state with the beginGetPoint() callback. |
Drag Sequence, Nested Action, Transient |
Entered from Drag Sequence when the AcEditorReactor::commandWillStart() or AcEditorReactor::LispWillStart() callbacks are made. These suspend the Drag Sequence and stack a new input state on top of it. From this state, it is possible to transition to any other input state. This stacked state will end when the balancing AcEditorReactor callback is made, and the state under the top state is Drag Sequence. |
When your application is loaded, you can query the value of the system variable CMDACTIVE to find out which commands are active. Input context events can be used to note transitions between input states.