class
CArcTouchGestureFilter
M4.2 touch feel. Touch pointer events (IsTouch, translated by the SDL backend from the primary finger) run through a deferred-press state machine before they reach widget routing:
- Module
- Arc
- Header
#include "Arc/Input/CArcTouchGestureFilter.h"- Namespace
Arcf
- finger down forwards NOTHING until the gesture resolves — a finger wobbles 5-10 px even when the user means a plain tap, and forwarding raw motion turns every tap into an accidental drag against the widgets' 4-5 px mouse thresholds; - lift inside the slop radius = tap: the held-back press and the release are forwarded back-to-back at the press point; - motion beyond the slop = drag: the held-back press is forwarded at the press point, then the motions flow through live; - holding inside the slop past the delay = long-press: a right-button click (down+up) is synthesized — the touch idiom for "context menu" — and the eventual lift is swallowed.
Coordinates are Arc logical units, which are already DPI-normalized, so the slop is a plain constant. Mouse events pass through untouched.
Properties
| Type | Name | Description |
|---|---|---|
static constexpr float | SlopLogical | Default 9.0f. |
static constexpr uint64_t | LongPressMs | Default 500. |
Public functions
| Returns | Name | Description |
|---|---|---|
std::vector<CArcPlatformEvent> | Filter | Consumes one platform event and returns what to dispatch instead (possibly empty while a gesture is unresolved; the event itself when the filter has no business with it). |
std::vector<CArcPlatformEvent> | Tick | Long-press has no driving event — call once per frame. |
void | Reset | Drop any half-tracked gesture (window focus loss, input reset). |
bool | IsGestureActive |
Function details
Filter
C++
std::vector<CArcPlatformEvent> Filter(const CArcPlatformEvent& event, uint64_t nowMs)Consumes one platform event and returns what to dispatch instead (possibly empty while a gesture is unresolved; the event itself when the filter has no business with it).
Tick
C++
std::vector<CArcPlatformEvent> Tick(uint64_t nowMs)Long-press has no driving event — call once per frame.
Reset
C++
void Reset()Drop any half-tracked gesture (window focus loss, input reset).
IsGestureActive
C++
bool IsGestureActive() constGenerated from Arc/Input/CArcTouchGestureFilter.h via arc.json · Nov 5, 2026Version 1.0.0