protected override void CreateSelectionBox(Rectangle boundingBox) { var spec = new HighlightSpec(_selectionBoxStyle, boundingBox); _selectionBox?.Dispose(); _selectionBox = HtmlHighlight.Create(this.MshtmlDocument, spec); }
private void Document_HighlightsUpdated(object sender, Rectangle bb) { _eventCaptureSurface?.Dispose(); var spec = new HighlightSpec(_eventCaptureSurfaceStyle, bb); _eventCaptureSurface = HtmlHighlight.Create(this.MshtmlDocument, spec, OnMouseDownCallback, OnMouseMoveCallback, OnMouseUpCallback); }
public void ShowHighlights(ZoneTree tree, IEnumerable <HighlightSpec> highlightSpecs) { var toRemove = _highlights.Except(highlightSpecs).ToArray(); foreach (HtmlHighlight highlight in toRemove) { highlight.Remove(); _highlights.Remove(highlight); } var toAdd = highlightSpecs.Except(_highlights); foreach (var spec in toAdd) { var highlight = HtmlHighlight.Create(_msDoc, spec); _highlights.Add(highlight); } var verticalScrollAreas = this.GetVerticalScrollArea(tree); this.NotifyHighlightsUpdated(verticalScrollAreas); }