public override void HandleMouseWheel(UIMouseWheelEventArgs e) { if (_textSurfaceEventListener != null && TextSurfaceEventListener.NotifyPreviewMouseWheel(_textSurfaceEventListener, e)) { //if the event is handled by the listener return; } base.HandleMouseWheel(e); }
public virtual void HandleMouseWheel(UIMouseWheelEventArgs e) { // if (e.Delta < 0) { //scroll down //this.StepSmallToMax(); //TODO: review Y diff ScrollOffset(0, 24); } else { //up //this.StepSmallToMin(); //TODO: review Y diff ScrollOffset(0, -24); } }
public TopWindowEventRoot(RootGraphic rootgfx, TopWindowRenderBox topRenderElement) { _mouseDownEventArgs = new UIMouseDownEventArgs(); _mouseMoveEventArgs = new UIMouseMoveEventArgs(); _mouseUpEventArgs = new UIMouseUpEventArgs(); _wheelEventArgs = new UIMouseWheelEventArgs(); _topWinBoxEventPortal = new RenderElementEventPortal(topRenderElement); #if DEBUG _topWinBoxEventPortal.dbugRootGraphics = (MyRootGraphic)rootgfx; #endif _iTopBoxEventPortal = _topWinBoxEventPortal; _rootgfx = rootgfx; _hoverMonitoringTask = new UIHoverMonitorTask(); _hoverMonitoringTask.Interval = 100;//ms _hoverMonitoringTask.Enabled = true; UIPlatform.RegisterTimerTask(_hoverMonitoringTask); }
public void MouseWheel(UIMouseWheelEventArgs e, CssBox startAt) { }
public void MouseWheel(UIMouseWheelEventArgs e) { this.MouseWheel(e, _htmlVisualRoot.RootCssBox); }
void IEventPortal.PortalMouseWheel(UIMouseWheelEventArgs e) { #if DEBUG if (dbugRootGraphics != null && this.dbugRootGraphics.dbugEnableGraphicInvalidateTrace) { this.dbugRootGraphics.dbugGraphicInvalidateTracer.WriteInfo("================"); this.dbugRootGraphics.dbugGraphicInvalidateTracer.WriteInfo("MOUSEWHEEL"); this.dbugRootGraphics.dbugGraphicInvalidateTracer.WriteInfo("================"); } #endif HitChain hitPointChain = GetFreeHitChain(); #if DEBUG _dbugHitChainPhase = dbugHitChainPhase.MouseWheel; #endif //find hit element HitTestCoreWithPrevChainHint(hitPointChain, _previousChain, e.X, e.Y); if (hitPointChain.Count > 0) { //------------------------------ //1. origin object SetEventOrigin(e, hitPointChain); //------------------------------ //portal ForEachOnlyEventPortalBubbleUp(e, hitPointChain, (e1, portal) => { //please ensure=> no local var/pararmeter capture inside lambda portal.PortalMouseWheel(e1); //***** _currentMouseWheel = e1.CurrentContextElement; return(true); }); //------------------------------ //use events if (!e.CancelBubbling) { _currentMouseWheel = null; e.SetCurrentContextElement(null);//clear ForEachEventListenerBubbleUp(e, hitPointChain, (e1, listener) => { //please ensure=> no local var/pararmeter capture inside lambda if (listener.BypassAllMouseEvents) { return(false); } _currentMouseWheel = listener; listener.ListenMouseWheel(e1); #if DEBUG if (e1.CancelBubbling) { } #endif //retrun true to stop this loop (no further bubble up) //return false to bubble this to upper control return(e1.CancelBubbling || !listener.BypassAllMouseEvents); }); } } SwapHitChain(hitPointChain); e.StopPropagation(); }
void IEventPortal.PortalMouseWheel(UIMouseWheelEventArgs e) { //this.OnMouseWheel(e); }
void IEventListener.ListenMouseWheel(UIMouseWheelEventArgs e) { OnMouseWheel(e); }
void IEventListener.ListenMouseWheel(UIMouseWheelEventArgs e) => MouseWheel?.Invoke(this, e);
void IEventListener.ListenMouseWheel(UIMouseWheelEventArgs e) { OnMouseWheel(e); _externalEventListener?.ListenMouseWheel(e); }