public void addRoute(int pointer, PointerRoute route) { var routes = this._routeMap.putIfAbsent(pointer, () => new HashSet <PointerRoute>()); D.assert(!routes.Contains(route)); routes.Add(route); }
public void stopTrackingPointer(PointerRoute route) { if (this._isTrackingPointer) { this._isTrackingPointer = false; GestureBinding.instance.pointerRouter.removeRoute(this.pointer, route); } }
public void startTrackingPointer(PointerRoute route) { if (!this._isTrackingPointer) { this._isTrackingPointer = true; GestureBinding.instance.pointerRouter.addRoute(this.pointer, route); } }
public virtual void stopTrackingPointer(PointerRoute route) { if (_isTrackingPointer) { _isTrackingPointer = false; GestureBinding.instance.pointerRouter.removeRoute(pointer, route); } }
public _RouteEntry( PointerRoute route, Matrix4 transform ) { this.route = route; this.transform = transform; }
public void startTrackingPointer(PointerRoute route, Matrix4 transform) { if (!_isTrackingPointer) { _isTrackingPointer = true; GestureBinding.instance.pointerRouter.addRoute(pointer, route, transform); } }
void _dispatch(PointerEvent evt, PointerRoute route) { try { route(evt); } catch (Exception ex) { D.logError("Error while routing a pointer event: ", ex); } }
void _dispatch(PointerEvent evt, PointerRoute route, Matrix4 transform) { try { evt = evt.transformed(transform); route(evt); } catch (Exception ex) { D.logError("Error while routing a pointer event: ", ex); } }
public void addRoute(int pointer, PointerRoute route, Matrix4 transform = null) { var routes = _routeMap.putIfAbsent( pointer, () => new Dictionary <PointerRoute, Matrix4>() ); D.assert(!routes.ContainsKey(route)); routes[route] = transform; }
public void removeRoute(int pointer, PointerRoute route) { D.assert(this._routeMap.ContainsKey(pointer)); var routes = this._routeMap[pointer]; routes.Remove(route); if (routes.isEmpty()) { this._routeMap.Remove(pointer); } }
public void removeGlobalRoute(PointerRoute route) { D.assert(this._globalRoutes.Contains(route)); this._globalRoutes.Remove(route); }
public void addGlobalRoute(PointerRoute route) { D.assert(!this._globalRoutes.Contains(route)); this._globalRoutes.Add(route); }
public override void stopTrackingPointer(PointerRoute route) { this._timer?.cancel(); this._timer = null; base.stopTrackingPointer(route); }
static _RouteEntryPredicate isRoutePredicate(PointerRoute route) { return((_RouteEntry entry) => entry.route == route); }
public void removeGlobalRoute(PointerRoute route) { D.assert(_globalRoutes.ContainsKey(route)); _globalRoutes.Remove(route); }
public void addGlobalRoute(PointerRoute route, Matrix4 transform = null) { D.assert(!_globalRoutes.ContainsKey(route)); _globalRoutes[route] = transform; }