InkCollectionMode enumeration (msinkaut.h)
Defines values that determine whether ink, gestures, or ink and gestures are recognized as the user writes.
Syntax
typedef enum InkCollectionMode {
ICM_InkOnly = 0,
ICM_GestureOnly,
ICM_InkAndGesture
} ;
Constants
ICM_InkOnly Value: 0 Collects only ink, creating a stroke. The Gesture event interest is set to FALSE, meaning that gestures are not collected (all other event interests remain as they were). |
ICM_GestureOnly Collects only gestures and does not create a stroke. Gestures can be either single or multi-stroke. Multi-stroke gestures are accepted if the strokes are made within the time set by the built-in timer of the recognizer. All stroke-related and packet-related events do not fire from the InkCollector. Cursor events do fire, and ink is always deleted. The Gesture event interest is set to TRUE, meaning that gestures are collected (all other event interests remain as they were). |
ICM_InkAndGesture Accepts only single-stroke gestures. The Gesture event fires first, giving the user the ability to say Cancel = TRUE or FALSE. The default is TRUE, except when NoGesture is the primary gesture, Cancel defaults to FALSE. If TRUE, the ink is a gesture and is deleted. If FALSE, the gesture is ink and a Stroke event fires. The Gesture event interest is set to TRUE (all other event interests are kept as they were). |
Remarks
If a user attempts a right-click and moves the pen when in InkOnly or InkAndGesture mode, ink flows from the pen tip. When handling the Stroke event, you should erase the ink that flowed as a result of the pen movement.
When the InkCollectionMode is set to GestureOnly (set through the CollectionMode property), the timeout between when a user adds a gesture and when the Gesture event occurs is a fixed value that cannot be altered programmatically. Gesture recognition is faster in InkAndGesture mode. To prevent the collection of ink while in InkAndGesture mode, you can:
- Set CollectionMode to InkAndGesture.
- In the Stroke event, delete the stroke.
- In the Gesture event, process the gesture.
- Set DynamicRendering to FALSE.
The ink collector always creates either a stroke (InkOnly mode) or a gesture (GestureOnly mode) and sometimes created both (InkAndGesture mode).
Typical scenarios for each mode follow.
- InkOnly:
- CursorInRange event fires.
- NewInAirPackets event fires.
- CursorDown event fires.
- NewPackets event fires.
- IInkStrokeDisp object is created.
- CursorOutOfRange event fires.
Note You may not always want to fire the CursorOutOfRange event. If you want to continue drawing ink, you may return to the NewInAirPackets or CursorDown events after a stroke is completed. - GestureOnly:
- CursorInRange event fires.
- NewInAirPackets event fires.
- CursorDown event fires.
- NewPackets event fires.
- Either an IInkGesture object is created or, if the cursor movement does not represent a gesture, nothing happens.
- CursorOutOfRange event fires.
Note Either single or multi-stroke gestures are accepted in this mode. - InkAndGesture:
- CursorInRange event fires.
- NewInAirPackets event fires.
- CursorDown event fires.
- NewPackets event fires.
- Either an IInkGesture object or an IInkStrokeDisp object is created.
- CursorOutOfRange event fires.
Note Only single-stroke gestures are accepted in this mode.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP Tablet PC Edition [desktop apps only] |
Minimum supported server | None supported |
Header | msinkaut.h |