void Mouse_Move(object sender, OpenTK.Input.MouseMoveEventArgs otk_e) { if (!CrowInterface.ProcessMouseMove(otk_e.X, otk_e.Y)) { MouseMove.Raise(sender, otk_e); } }
public virtual void onMouseMove(object sender, MouseMoveEventArgs e) { //bubble event to the top GraphicObject p = Parent as GraphicObject; if (p != null) p.onMouseMove(sender,e); MouseMove.Raise (this, e); }
protected virtual void GL_Mouse_Move(object sender, OpenTK.Input.MouseMoveEventArgs otk_e) { if (activeIdx == -2) { focusedIdx = -1; for (int i = 0; i < ifaceControl.Count; i++) { if (ifaceControl [i].ProcessMouseMove(otk_e.X, otk_e.Y)) { focusedIdx = i; return; } } } else if (focusedIdx >= 0) { ifaceControl [focusedIdx].ProcessMouseMove(otk_e.X, otk_e.Y); return; } if (focusedIdx < 0) { MouseMove.Raise(sender, otk_e); } }
//public string update = ""; #endregion #region Mouse Handling void Mouse_Move(object sender, MouseMoveEventArgs e) { if (_activeWidget != null) { //first, ensure object is still in the graphic tree if (_activeWidget.HostContainer == null) { activeWidget = null; } else { //send move evt even if mouse move outside bounds _activeWidget.onMouseMove(_activeWidget, e); return; } } if (_hoverWidget != null) { //first, ensure object is still in the graphic tree if (_hoverWidget.HostContainer == null) { hoverWidget = null; } else { //check topmost graphicobject first GraphicObject tmp = _hoverWidget; GraphicObject topc = null; while (tmp is GraphicObject) { topc = tmp; tmp = tmp.Parent as GraphicObject; } int idxhw = GraphicObjects.IndexOf(topc); if (idxhw != 0) { int i = 0; while (i < idxhw) { if (GraphicObjects [i].MouseIsIn(e.Position)) { _hoverWidget.onMouseLeave(this, e); GraphicObjects [i].checkHoverWidget(e); return; } i++; } } if (_hoverWidget.MouseIsIn(e.Position)) { _hoverWidget.checkHoverWidget(e); return; } else { _hoverWidget.onMouseLeave(this, e); //seek upward from last focused graph obj's while (_hoverWidget.Parent as GraphicObject != null) { _hoverWidget = _hoverWidget.Parent as GraphicObject; if (_hoverWidget.MouseIsIn(e.Position)) { _hoverWidget.checkHoverWidget(e); return; } else { _hoverWidget.onMouseLeave(this, e); } } } } } //top level graphic obj's parsing for (int i = 0; i < GraphicObjects.Count; i++) { GraphicObject g = GraphicObjects[i]; if (g.MouseIsIn(e.Position)) { g.checkHoverWidget(e); PutOnTop(g); return; } } _hoverWidget = null; MouseMove.Raise(this, e); }
protected virtual void OnMouseMove(MouseMoveEvent e) { MouseMove.Raise(e); }