/// <summary> /// Handle mouse move to handle hover cursor and text selection. /// </summary> /// <param name="parent">the control hosting the html to set cursor and invalidate</param> /// <param name="location">the location of the mouse</param> public void HandleMouseMove(RControl parent, RPoint location) { ArgChecker.AssertArgNotNull(parent, "parent"); try { var loc = OffsetByScroll(location); if (_selectionHandler != null && IsMouseInContainer(location)) { _selectionHandler.HandleMouseMove(parent, loc); } /* * if( _hoverBoxes != null ) * { * bool refresh = false; * foreach(var hoverBox in _hoverBoxes) * { * foreach(var rect in hoverBox.Item1.Rectangles.Values) * { * if( rect.Contains(loc) ) * { * //hoverBox.Item1.Color = "gold"; * refresh = true; * } * } * } * * if(refresh) * RequestRefresh(true); * } */ } catch (Exception ex) { ReportError(HtmlRenderErrorType.KeyboardMouse, "Failed mouse move handle", ex); } }
/// <summary> /// Handle mouse move to handle hover cursor and text selection. /// </summary> /// <param name="parent">the control hosting the html to set cursor and invalidate</param> /// <param name="e">the mouse event args</param> public void HandleMouseMove(Control parent, MouseEventArgs e) { ArgChecker.AssertArgNotNull(parent, "parent"); ArgChecker.AssertArgNotNull(e, "e"); if (_selectionHandler != null) { _selectionHandler.HandleMouseMove(parent, OffsetByScroll(e.Location)); } }
/// <summary> /// Handle mouse move to handle hover cursor and text selection. /// </summary> /// <param name="parent">the control hosting the html to set cursor and invalidate</param> /// <param name="e">the mouse event args</param> public void HandleMouseMove(Control parent, MouseEventArgs e) { ArgChecker.AssertArgNotNull(parent, "parent"); ArgChecker.AssertArgNotNull(e, "e"); try { if (_selectionHandler != null && IsMouseInContainer(e.Location)) { _selectionHandler.HandleMouseMove(parent, OffsetByScroll(e.Location)); } } catch (Exception ex) { ReportError(HtmlRenderErrorType.KeyboardMouse, "Failed mouse move handle", ex); } }
/// <summary> /// Handle mouse move to handle hover cursor and text selection. /// </summary> /// <param name="parent">the control hosting the html to set cursor and invalidate</param> /// <param name="location">the location of the mouse</param> public void HandleMouseMove(RControl parent, RPoint location) { ArgChecker.AssertArgNotNull(parent, "parent"); try { var loc = OffsetByScroll(location); if (_selectionHandler != null && IsMouseInContainer(location)) { _selectionHandler.HandleMouseMove(parent, loc); } if (_hoverBoxes != null) { bool refresh = false; foreach (var hoverBox in _hoverBoxes) { foreach (var rect in hoverBox.CssBox.Rectangles.Values) { if (rect.Contains(loc)) { //Console.WriteLine("" + hoverBox.CssBlock.Class); hoverBox.CssBox.Color = "red"; refresh = true; } } } if (refresh) { RequestRefresh(true); } } } catch (Exception ex) { ReportError(HtmlRenderErrorType.KeyboardMouse, "Failed mouse move handle", ex); } }