Member variable XbpCrt():inputMode Foundation

Specifies the input mode.

Attribute: EXPORTED

The instance variable :inputMode configures the methods of input which can be used in an XbpCrt window. For example, on systems with a touch digitizer, support for touch gestures can be enabled or disabled by assigning the corresponding constant to :inputMode.

By default, support for touch gestures and pen flicks is enabled for all Xbase Parts. This allows the user to manipulate user interface elements with a finger or a pen (stylus) in addition to the mouse and keyboard. For example, a push button can be activated by tapping it with the pen, and list box elements can be scrolled with a flick of the finger.

In some cases, however, this default behaviour must be fine-tuned or disabled to optimize the user experience. For example, the visual feedback provided by the operating system after a tap gesture may be confusing if the corresponding element does not react to touch input. Also, the default processing may cause problems in Xbase Part classes which define custom touch or pen input behaviour.

The following defines from the file can be assigned to the :inputMode instance variable for specifying the input mode:

Input modes supported
Constant Description
XBP_INPUTMODE_SYSTEMDEFAULT *) Enables standard operating system-support for touch gestures, pen flicks, mouse and keyboard input.
XBP_INPUTMODE_NOTOUCHGESTURES Disables support for touch gestures.
XBP_INPUTMODE_TOUCHGESTURES Enables support for touch gestures on the application-level. The system generates xbeP_Gesture events whenever the user performs a touch gesture. One or more of the XBP_INPUTMODEGF_xxx constants from the table below can be added to selectively disable individual touch gestures.
XBP_INPUTMODE_NOPRESSANDHOLD Disable the press-and-hold gesture used to simulate a right mouse button click.
XBP_INPUTMODE_NOPENFLICKS Disable support for pen flicks. Pen flicks are standard actions which the user can activate using a set of predefined pen movements.
XBP_INPUTMODE_NOPENTAPFEEDBACK Disable the visual feedback provided by the operating system when the tip of the pen is put on the display surface.
XBP_INPUTMODE_NOPENBUTTONFEEDBACK Disable the visual feedback provided by the operating system when the pen button is activated.
  1. Default value

Mouse and keyboard input is always active and cannot be disabled.

In addition to the above constants for enabling or disabling an input method or feature, the following constants control individual aspects on a per-feature basis. The constants must be added to the value in :inputMode.

Additional constants for touch gestures (use with XBP_INPUTMODE_TOUCHGESTURES)
Constant Description
XBP_INPUTMODEGF_NOTWOFINGERTAPGESTURE Disables the two-finger tap gesture
XBP_INPUTMODEGF_NOPRESSANDTAPGESTURE Disables the press-and-tap gesture
XBP_INPUTMODEGF_NOONEFINGERPAN_HORZ Prevents the user from panning horizontally. The system only generates events for vertical pans.
XBP_INPUTMODEGF_NOONEFINGERPAN_VERT Prevents the user from panning vertically. The system only generates events for horizontal pans.
XBP_INPUTMODEGF_PANWITHGUTTER Restricts a pan gesture to a single axis. If a horizontal pan gesture is detected, for example, movement along the vertical axis is ignored until a certain threshold is reached. Enabling this feature can help reduce inadvertent scroll operations. For instance, scrolling through the the lines in a browse might move the active column off the screen unless the finger is moved in a straight vertical line. With the gutter enabled, no horizontal scrolling occurs in this situation.
XBP_INPUTMODEGF_NOPANINERTIA Disables inertia when panning. With inertia enabled, the system may generate additional pan events to prevent the gesture from stopping abruptly. This creates the effect as if an object being moved slides gracefully to a stop.
XBP_INPUTMODEGF_NOLEGACYSUPPORT Disables the legacy support for touch gestures provided by the operating system. For example, the system attempts to automatically operate scroll bars defined in user interface elements when a pan gesture is executed. To do this, the corresponding xbeP_Gesture event is automatically routed up the parent chain (bubbled up) until a a suitable control is found. This may cause problems in Xbase Parts which define custom behaviour. In this case, legacy support must be disabled.

To enable an XbpCrt object for receiving touch gesture events, mouse events must be enabled with a call to SetMouse(.T.)!

Touch gestures are supported on Windows 7 and newer operating systems.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.