public HexAndAdornmentSequencerImpl(HexView hexView, HexTagAggregator <HexSpaceNegotiatingAdornmentTag> hexTagAggregator)
 {
     this.hexView                  = hexView ?? throw new ArgumentNullException(nameof(hexView));
     this.hexTagAggregator         = hexTagAggregator ?? throw new ArgumentNullException(nameof(hexTagAggregator));
     hexView.Closed               += HexView_Closed;
     hexTagAggregator.TagsChanged += HexTagAggregator_TagsChanged;
 }
Beispiel #2
0
 protected HexClassifierAggregator(HexTagAggregator <HexClassificationTag> hexTagAggregator, VSTC.IClassificationTypeRegistryService classificationTypeRegistryService, HexBuffer buffer)
 {
     this.classificationTypeRegistryService = classificationTypeRegistryService ?? throw new ArgumentNullException(nameof(classificationTypeRegistryService));
     this.hexTagAggregator         = hexTagAggregator ?? throw new ArgumentNullException(nameof(hexTagAggregator));
     this.buffer                   = buffer ?? throw new ArgumentNullException(nameof(buffer));
     hexTagAggregator.TagsChanged += HexTagAggregator_TagsChanged;
 }
Beispiel #3
0
 public HexMarkerService(WpfHexView wpfHexView, HexTagAggregator <HexMarkerTag> tagAggregator, VSTC.IEditorFormatMap editorFormatMap, IThemeService themeService)
 {
     if (wpfHexView == null)
     {
         throw new ArgumentNullException(nameof(wpfHexView));
     }
     if (tagAggregator == null)
     {
         throw new ArgumentNullException(nameof(tagAggregator));
     }
     if (editorFormatMap == null)
     {
         throw new ArgumentNullException(nameof(editorFormatMap));
     }
     if (themeService == null)
     {
         throw new ArgumentNullException(nameof(themeService));
     }
     this.wpfHexView                  = wpfHexView;
     this.tagAggregator               = tagAggregator;
     this.editorFormatMap             = editorFormatMap;
     this.themeService                = themeService;
     textMarkerAdornmentLayer         = wpfHexView.GetAdornmentLayer(PredefinedHexAdornmentLayers.TextMarker);
     negativeTextMarkerAdornmentLayer = wpfHexView.GetAdornmentLayer(PredefinedHexAdornmentLayers.NegativeTextMarker);
     markerElements = new List <MarkerElement>();
     useReducedOpacityForHighContrast = wpfHexView.Options.GetOptionValue(DefaultWpfHexViewOptions.UseReducedOpacityForHighContrastOptionId);
     onRemovedDelegate                     = OnRemoved;
     wpfHexView.Closed                    += WpfHexView_Closed;
     wpfHexView.LayoutChanged             += WpfHexView_LayoutChanged;
     wpfHexView.Options.OptionChanged     += Options_OptionChanged;
     tagAggregator.BatchedTagsChanged     += TagAggregator_BatchedTagsChanged;
     editorFormatMap.FormatMappingChanged += EditorFormatMap_FormatMappingChanged;
 }
Beispiel #4
0
 public HexToolTipServiceImpl(HexViewTagAggregatorFactoryService viewTagAggregatorFactoryService, HexView hexView)
 {
     if (hexView == null)
     {
         throw new ArgumentNullException(nameof(hexView));
     }
     if (viewTagAggregatorFactoryService == null)
     {
         throw new ArgumentNullException(nameof(viewTagAggregatorFactoryService));
     }
     this.hexView    = hexView;
     tagAggregator   = viewTagAggregatorFactoryService.CreateTagAggregator <HexToolTipStructureSpanTag>(hexView);
     hexView.Closed += HexView_Closed;
     hexView.Options.OptionChanged += Options_OptionChanged;
     UpdateHighlightStructureUnderMouseCursor();
 }
Beispiel #5
0
 void Initialize()
 {
     if (mouseProcessorCollection != null)
     {
         return;
     }
     iconCanvas = new Canvas {
         Background = Brushes.Transparent
     };
     canvas.Children.Add(iconCanvas);
     mouseProcessorCollection = new HexMouseProcessorCollection(VisualElement, null, new DefaultHexMouseProcessor(), CreateMouseProcessors(), null);
     lineInfos       = new Dictionary <object, LineInfo>();
     tagAggregator   = viewTagAggregatorFactoryService.CreateTagAggregator <HexGlyphTag>(wpfHexViewHost.HexView);
     editorFormatMap = editorFormatMapService.GetEditorFormatMap(wpfHexViewHost.HexView);
     InitializeGlyphFactories();
 }
 public HexIntraTextAdornmentServiceImpl(WpfHexView wpfHexView, HexViewTagAggregatorFactoryService viewTagAggregatorFactoryService)
 {
     if (wpfHexView == null)
     {
         throw new ArgumentNullException(nameof(wpfHexView));
     }
     if (viewTagAggregatorFactoryService == null)
     {
         throw new ArgumentNullException(nameof(viewTagAggregatorFactoryService));
     }
     adornmentTagInfos          = new List <AdornmentTagInfo>();
     currentLineIdentityTags    = new HashSet <object>();
     this.wpfHexView            = wpfHexView;
     tagAggregator              = viewTagAggregatorFactoryService.CreateTagAggregator <HexIntraTextAdornmentTag>(wpfHexView);
     tagAggregator.TagsChanged += TagAggregator_TagsChanged;
     wpfHexView.Closed         += WpfHexView_Closed;
     wpfHexView.LayoutChanged  += WpfHexView_LayoutChanged;
 }
Beispiel #7
0
		public HexMarkerService(WpfHexView wpfHexView, HexTagAggregator<HexMarkerTag> tagAggregator, VSTC.IEditorFormatMap editorFormatMap, IThemeService themeService) {
			if (wpfHexView == null)
				throw new ArgumentNullException(nameof(wpfHexView));
			if (tagAggregator == null)
				throw new ArgumentNullException(nameof(tagAggregator));
			if (editorFormatMap == null)
				throw new ArgumentNullException(nameof(editorFormatMap));
			if (themeService == null)
				throw new ArgumentNullException(nameof(themeService));
			this.wpfHexView = wpfHexView;
			this.tagAggregator = tagAggregator;
			this.editorFormatMap = editorFormatMap;
			this.themeService = themeService;
			textMarkerAdornmentLayer = wpfHexView.GetAdornmentLayer(PredefinedHexAdornmentLayers.TextMarker);
			negativeTextMarkerAdornmentLayer = wpfHexView.GetAdornmentLayer(PredefinedHexAdornmentLayers.NegativeTextMarker);
			markerElements = new List<MarkerElement>();
			useReducedOpacityForHighContrast = wpfHexView.Options.GetOptionValue(DefaultWpfHexViewOptions.UseReducedOpacityForHighContrastOptionId);
			onRemovedDelegate = OnRemoved;
			wpfHexView.Closed += WpfHexView_Closed;
			wpfHexView.LayoutChanged += WpfHexView_LayoutChanged;
			wpfHexView.Options.OptionChanged += Options_OptionChanged;
			tagAggregator.BatchedTagsChanged += TagAggregator_BatchedTagsChanged;
			editorFormatMap.FormatMappingChanged += EditorFormatMap_FormatMappingChanged;
		}
Beispiel #8
0
		void Initialize() {
			if (mouseProcessorCollection != null)
				return;
			iconCanvas = new Canvas { Background = Brushes.Transparent };
			canvas.Children.Add(iconCanvas);
			mouseProcessorCollection = new HexMouseProcessorCollection(VisualElement, null, new DefaultHexMouseProcessor(), CreateMouseProcessors(), null);
			lineInfos = new Dictionary<object, LineInfo>();
			tagAggregator = viewTagAggregatorFactoryService.CreateTagAggregator<HexGlyphTag>(wpfHexViewHost.HexView);
			editorFormatMap = editorFormatMapService.GetEditorFormatMap(wpfHexViewHost.HexView);
			InitializeGlyphFactories();
		}