public HexGlyphMargin(IMenuService menuService, WpfHexViewHost wpfHexViewHost, HexViewTagAggregatorFactoryService viewTagAggregatorFactoryService, HexEditorFormatMapService editorFormatMapService, Lazy <HexGlyphMouseProcessorProvider, IGlyphMouseProcessorProviderMetadata>[] glyphMouseProcessorProviders, Lazy <HexGlyphFactoryProvider, IGlyphMetadata>[] glyphFactoryProviders, HexMarginContextMenuService marginContextMenuHandlerProviderService) { if (menuService is null) { throw new ArgumentNullException(nameof(menuService)); } canvas = new Canvas(); glyphFactories = new Dictionary <Type, GlyphFactoryInfo>(); childCanvases = Array.Empty <Canvas>(); this.wpfHexViewHost = wpfHexViewHost ?? throw new ArgumentNullException(nameof(wpfHexViewHost)); this.viewTagAggregatorFactoryService = viewTagAggregatorFactoryService ?? throw new ArgumentNullException(nameof(viewTagAggregatorFactoryService)); this.editorFormatMapService = editorFormatMapService ?? throw new ArgumentNullException(nameof(editorFormatMapService)); lazyGlyphMouseProcessorProviders = glyphMouseProcessorProviders ?? throw new ArgumentNullException(nameof(glyphMouseProcessorProviders)); lazyGlyphFactoryProviders = glyphFactoryProviders ?? throw new ArgumentNullException(nameof(glyphFactoryProviders)); var binding = new Binding { Path = new PropertyPath(Panel.BackgroundProperty), Source = canvas, }; canvas.SetBinding(DsImage.BackgroundBrushProperty, binding); wpfHexViewHost.HexView.Options.OptionChanged += Options_OptionChanged; wpfHexViewHost.HexView.ZoomLevelChanged += HexView_ZoomLevelChanged; canvas.IsVisibleChanged += GlyphMargin_IsVisibleChanged; UpdateVisibility(); canvas.Width = MARGIN_WIDTH; canvas.ClipToBounds = true; menuService.InitializeContextMenu(VisualElement, new Guid(MenuConstants.GUIDOBJ_GLYPHMARGIN_GUID), marginContextMenuHandlerProviderService.Create(wpfHexViewHost, this, PredefinedHexMarginNames.Glyph), null, new Guid(MenuConstants.GLYPHMARGIN_GUID)); }
GlyphMarginProvider(IMenuService menuService, HexViewTagAggregatorFactoryService viewTagAggregatorFactoryService, HexEditorFormatMapService editorFormatMapService, [ImportMany] IEnumerable<Lazy<HexGlyphMouseProcessorProvider, IGlyphMouseProcessorProviderMetadata>> glyphMouseProcessorProviders, [ImportMany] IEnumerable<Lazy<HexGlyphFactoryProvider, IGlyphMetadata>> glyphFactoryProviders, HexMarginContextMenuService marginContextMenuHandlerProviderService) { this.menuService = menuService; this.viewTagAggregatorFactoryService = viewTagAggregatorFactoryService; this.editorFormatMapService = editorFormatMapService; this.glyphMouseProcessorProviders = VSUTIL.Orderer.Order(glyphMouseProcessorProviders).ToArray(); this.glyphFactoryProviders = VSUTIL.Orderer.Order(glyphFactoryProviders).ToArray(); this.marginContextMenuHandlerProviderService = marginContextMenuHandlerProviderService; }
GlyphMarginProvider(IMenuService menuService, HexViewTagAggregatorFactoryService viewTagAggregatorFactoryService, HexEditorFormatMapService editorFormatMapService, [ImportMany] IEnumerable <Lazy <HexGlyphMouseProcessorProvider, IGlyphMouseProcessorProviderMetadata> > glyphMouseProcessorProviders, [ImportMany] IEnumerable <Lazy <HexGlyphFactoryProvider, IGlyphMetadata> > glyphFactoryProviders, HexMarginContextMenuService marginContextMenuHandlerProviderService) { this.menuService = menuService; this.viewTagAggregatorFactoryService = viewTagAggregatorFactoryService; this.editorFormatMapService = editorFormatMapService; this.glyphMouseProcessorProviders = VSUTIL.Orderer.Order(glyphMouseProcessorProviders).ToArray(); this.glyphFactoryProviders = VSUTIL.Orderer.Order(glyphFactoryProviders).ToArray(); this.marginContextMenuHandlerProviderService = marginContextMenuHandlerProviderService; }
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(); }
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; }
HexToolTipServiceFactoryImpl(HexViewTagAggregatorFactoryService viewTagAggregatorFactoryService) { this.viewTagAggregatorFactoryService = viewTagAggregatorFactoryService; }
HexMarkerServiceWpfHexViewCreationListener(HexViewTagAggregatorFactoryService viewTagAggregatorFactoryService, HexEditorFormatMapService editorFormatMapService) { this.viewTagAggregatorFactoryService = viewTagAggregatorFactoryService; this.editorFormatMapService = editorFormatMapService; }
HexAndAdornmentSequencerFactoryServiceImpl(HexViewTagAggregatorFactoryService hexViewTagAggregatorFactoryService) => this.hexViewTagAggregatorFactoryService = hexViewTagAggregatorFactoryService;
HexIntraTextAdornmentServiceProviderImpl(HexViewTagAggregatorFactoryService viewTagAggregatorFactoryService) { this.viewTagAggregatorFactoryService = viewTagAggregatorFactoryService; }
HexViewClassifierAggregatorServiceImpl(HexViewTagAggregatorFactoryService hexViewTagAggregatorFactoryService, VSTC.IClassificationTypeRegistryService classificationTypeRegistryService) { this.hexViewTagAggregatorFactoryService = hexViewTagAggregatorFactoryService; this.classificationTypeRegistryService = classificationTypeRegistryService; }
public HexViewClassifierAggregator(HexViewTagAggregatorFactoryService hexViewTagAggregatorFactoryService, VSTC.IClassificationTypeRegistryService classificationTypeRegistryService, HexView hexView) : base(hexViewTagAggregatorFactoryService.CreateTagAggregator <HexClassificationTag>(hexView), classificationTypeRegistryService, hexView.Buffer) { }
HexAndAdornmentSequencerFactoryServiceImpl(HexViewTagAggregatorFactoryService hexViewTagAggregatorFactoryService) { this.hexViewTagAggregatorFactoryService = hexViewTagAggregatorFactoryService; }
public HexGlyphMargin(IMenuService menuService, WpfHexViewHost wpfHexViewHost, HexViewTagAggregatorFactoryService viewTagAggregatorFactoryService, HexEditorFormatMapService editorFormatMapService, Lazy<HexGlyphMouseProcessorProvider, IGlyphMouseProcessorProviderMetadata>[] glyphMouseProcessorProviders, Lazy<HexGlyphFactoryProvider, IGlyphMetadata>[] glyphFactoryProviders, HexMarginContextMenuService marginContextMenuHandlerProviderService) { if (menuService == null) throw new ArgumentNullException(nameof(menuService)); if (wpfHexViewHost == null) throw new ArgumentNullException(nameof(wpfHexViewHost)); if (viewTagAggregatorFactoryService == null) throw new ArgumentNullException(nameof(viewTagAggregatorFactoryService)); if (editorFormatMapService == null) throw new ArgumentNullException(nameof(editorFormatMapService)); if (glyphMouseProcessorProviders == null) throw new ArgumentNullException(nameof(glyphMouseProcessorProviders)); if (glyphFactoryProviders == null) throw new ArgumentNullException(nameof(glyphFactoryProviders)); canvas = new Canvas(); glyphFactories = new Dictionary<Type, GlyphFactoryInfo>(); childCanvases = Array.Empty<Canvas>(); this.wpfHexViewHost = wpfHexViewHost; this.viewTagAggregatorFactoryService = viewTagAggregatorFactoryService; this.editorFormatMapService = editorFormatMapService; lazyGlyphMouseProcessorProviders = glyphMouseProcessorProviders; lazyGlyphFactoryProviders = glyphFactoryProviders; var binding = new Binding { Path = new PropertyPath(Panel.BackgroundProperty), Source = canvas, }; canvas.SetBinding(DsImage.BackgroundBrushProperty, binding); wpfHexViewHost.HexView.Options.OptionChanged += Options_OptionChanged; wpfHexViewHost.HexView.ZoomLevelChanged += HexView_ZoomLevelChanged; canvas.IsVisibleChanged += GlyphMargin_IsVisibleChanged; UpdateVisibility(); canvas.Width = MARGIN_WIDTH; canvas.ClipToBounds = true; menuService.InitializeContextMenu(VisualElement, new Guid(MenuConstants.GUIDOBJ_GLYPHMARGIN_GUID), marginContextMenuHandlerProviderService.Create(wpfHexViewHost, this, PredefinedHexMarginNames.Glyph), null, new Guid(MenuConstants.GLYPHMARGIN_GUID)); }
public HexViewClassifierAggregator(HexViewTagAggregatorFactoryService hexViewTagAggregatorFactoryService, VSTC.IClassificationTypeRegistryService classificationTypeRegistryService, HexView hexView) : base(hexViewTagAggregatorFactoryService.CreateTagAggregator<HexClassificationTag>(hexView), classificationTypeRegistryService, hexView.Buffer) { }
HexMarkerServiceWpfHexViewCreationListener(HexViewTagAggregatorFactoryService viewTagAggregatorFactoryService, HexEditorFormatMapService editorFormatMapService, IThemeService themeService) { this.viewTagAggregatorFactoryService = viewTagAggregatorFactoryService; this.editorFormatMapService = editorFormatMapService; this.themeService = themeService; }