Platforms to show: All Mac Windows Linux Cross-Platform

WinGestureConfigMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Windows MBS Win Plugin 16.2 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
ets and sets the configuration for enabling gesture messages and the type of this configuration.
Example
// make a config for accepting pan/rotate gestures
dim c1 as new WinGestureConfigMBS

c1.ID = c1.kGestureIDPan
c1.Want = c1.kPan
c1.Block = 0

dim c2 as new WinGestureConfigMBS
c2.ID = c2.kGestureIDRotate
c2.Want = c2.kRotate
c2.Block = 0


dim configs() as WinGestureConfigMBS
configs.Append c1
configs.Append c2

// and add to window
if WinPointerEventsMBS.SetGestureConfig(window1, configs) then
MsgBox "OK"
end if

It is impossible to disable two-finger panning and keep single finger panning. You must set the want bits for GC_PAN before you can set them for GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY or GC_PAN_WITH_SINGLE_FINGER_VERTICALLY.
An inertia vector is included in the GID_PAN message with the GF_END flag if inertia was disabled by a call to SetGestureConfig.
When you pass this structure, the dwID member contains information for a set of gestures. This determines what the other flags will mean. If you set flags for pan messages, they will be different from those flags that are set for rotation messages.
The following table indicates the various identifiers for gestures that are supported by the dwID member of the GESTURECONFIG structure. Note that setting dwID to 0 indicates that global gesture configuration flags are set.
NameValueDescription
GID_ZOOM3Indicates configuration settings for the zoom gesture.
GID_PAN4Indicates the pan gesture.
GID_ROTATE5Indicates the rotation gesture.
GID_TWOFINGERTAP6Indicates the two-finger tap gesture.
GID_PRESSANDTAP7Indicates the press and tap gesture.

The following flags are used when dwID is set to 0.
NameValueDescription
GC_ALLGESTURES0x00000001Indicates all of the gestures.

The following flags are used when dwID is set to GID_ZOOM.
NameValueDescription
GC_ZOOM0x00000001Indicates the zoom gesture.

The following flags are used when dwID is set to GID_PAN.
NameValueDescription
GC_PAN0x00000001Indicates all pan gestures.
GC_PAN_WITH_SINGLE_FINGER_VERTICALLY0x00000002Indicates vertical pans with one finger.
GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY0x00000004Indicates horizontal pans with one finger.
GC_PAN_WITH_GUTTER0x00000008Limits perpendicular movement to primary direction until a threshold is reached to break out of the gutter.
GC_PAN_WITH_INERTIA0x00000010Indicates panning with inertia to smoothly slow when pan gestures stop.

Note Setting the GID_PAN flags in SetGestureConfig will affect the default gesture handler for panning. You should not have both dwWant and dwBlock set for the same flags; this will result in unexpected behavior. See Windows Touch Gestures for more information on panning and legacy panning support; see SetGestureConfig for examples of enabling and blocking gestures.

The following flags are used when dwID is set to GID_ROTATE.
NameValueDescription
GC_ROTATE0x00000001Indicates the rotation gesture.

The following flags are used when dwID is set to GID_TWOFINGERTAP.
NameValueDescription
GC_TWOFINGERTAP0x00000001Indicates the two-finger tap gesture.

The following flags are used when dwID is set to GID_PRESSANDTAP.
NameValueDescription
GC_PRESSANDTAP0x00000001Indicates the press and tap gesture.

  • 3 properties
    • property Block as Integer
    • property ID as Integer
    • property Want as Integer
  • 17 constants

Gesture Options

Constant Value Description
kAllGestures 1 Indicates all of the gestures. (for ID = 0)
kPan 1 Indicates all pan gestures.
kPanWithGutter 8 Limits perpendicular movement to primary direction until a threshold is reached to break out of the gutter.
kPanWithInteria 16 Indicates panning with inertia to smoothly slow when pan gestures stop.
kPanWithSingleFingerHorizontally 4 Indicates horizontal pans with one finger.
kPanWithSingleFingerVertically 2 Indicates vertical pans with one finger.
kPressAndTap 1 Indicates the press and tap gesture.
kRotate 1 Indicates the rotation gesture.
kTwoFingerTap 1 Indicates the two-finger tap gesture.
kZoom 1 Indicates the zoom gesture. (for ID = kGestureIDZoom)

Gesture IDs

Constant Value Description
kGestureIDBegin 1 Begin of gesture.
kGestureIDEnd 2 End of a gesture
kGestureIDPan 4 Pan gesture
kGestureIDPressAndTap 7 Press and Tap gesture
kGestureIDRotate 5 Rotate gesture
kGestureIDTwoFingerTap 6 Two-Finger Tap
kGestureIDZoom 3 Zoom gesture

This class has no sub classes.

Some methods using this class:

Some examples using this class:

Blog Entries

Videos


The items on this page are in the following plugins: MBS Win Plugin.


WinFileTypeMBS   -   WinGestureInfoMBS


The biggest plugin in space...