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:

When using this enumeration with the InkPicture control (or the InkCollector or InkOverlay objects) on a system that has the Microsoft Windows XP Tablet PC Edition Software Development Kit (SDK) installed but that doesn't have recognizers, the mode cannot be set to GestureOnly or InkAndGesture.

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.

Unwanted behavior might occur when the CollectionMode property is set to InkAndGesture and the interest of an object or control in a known gesture is set (by calling the SetGestureStatus method). If a user draws ink that resembles a gesture that is in the recognizer's list of recognition alternates, the Gesture event fires and ink disappears, even if the gesture is not the top alternate. To prevent the ink from disappearing and cancel collection of the gesture, set Cancel to TRUE if the event is one to which you do not want the recognizer to respond.

Requirements

Requirement Value
Minimum supported client Windows XP Tablet PC Edition [desktop apps only]
Minimum supported server None supported
Header msinkaut.h

See also

CollectionMode Property [InkCollector Class]

Gesture Event

InkCollector Class

InkOverlay Class

InkPicture Control Reference

Stroke Event