Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 CurrentLineHighlighterWpfHexViewCreationListener(HexEditorFormatMapService editorFormatMapService) => this.editorFormatMapService = editorFormatMapService;
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
 HexEditorFactoryServiceImpl(HexEditorOptionsFactoryService hexEditorOptionsFactoryService, ICommandService commandService, [ImportMany] IEnumerable <Lazy <WpfHexViewCreationListener, IDeferrableTextViewRoleMetadata> > wpfHexViewCreationListeners, [ImportMany] IEnumerable <Lazy <HexEditorFactoryServiceListener> > hexEditorFactoryServiceListeners, FormattedHexSourceFactoryService formattedHexSourceFactoryService, HexViewClassifierAggregatorService hexViewClassifierAggregatorService, HexAndAdornmentSequencerFactoryService hexAndAdornmentSequencerFactoryService, HexClassificationFormatMapService classificationFormatMapService, HexEditorFormatMapService editorFormatMapService, HexAdornmentLayerDefinitionService adornmentLayerDefinitionService, HexLineTransformProviderService lineTransformProviderService, WpfHexViewMarginProviderCollectionProvider wpfHexViewMarginProviderCollectionProvider, IMenuService menuService, HexEditorOperationsFactoryService editorOperationsFactoryService, HexSpaceReservationStackProvider spaceReservationStackProvider, HexBufferLineFormatterFactoryService hexBufferLineFormatterFactoryService, VSTC.IClassificationTypeRegistryService classificationTypeRegistryService, [ImportMany] IEnumerable <Lazy <HexCursorProviderFactory, ITextViewRoleMetadata> > hexCursorProviderFactories)
 {
     this.hexEditorOptionsFactoryService = hexEditorOptionsFactoryService;
     this.commandService = commandService;
     this.wpfHexViewCreationListeners            = wpfHexViewCreationListeners.ToArray();
     this.hexEditorFactoryServiceListeners       = hexEditorFactoryServiceListeners.ToArray();
     this.formattedHexSourceFactoryService       = formattedHexSourceFactoryService;
     this.hexViewClassifierAggregatorService     = hexViewClassifierAggregatorService;
     this.hexAndAdornmentSequencerFactoryService = hexAndAdornmentSequencerFactoryService;
     this.classificationFormatMapService         = classificationFormatMapService;
     this.editorFormatMapService                     = editorFormatMapService;
     this.adornmentLayerDefinitionService            = adornmentLayerDefinitionService;
     this.lineTransformProviderService               = lineTransformProviderService;
     this.wpfHexViewMarginProviderCollectionProvider = wpfHexViewMarginProviderCollectionProvider;
     this.menuService = menuService;
     this.editorOperationsFactoryService       = editorOperationsFactoryService;
     this.spaceReservationStackProvider        = spaceReservationStackProvider;
     this.hexBufferLineFormatterFactoryService = hexBufferLineFormatterFactoryService;
     this.classificationTypeRegistryService    = classificationTypeRegistryService;
     this.hexCursorProviderFactories           = hexCursorProviderFactories.ToArray();
 }
Ejemplo n.º 5
0
 ColumnLineSeparatorServiceProviderImpl(HexEditorFormatMapService editorFormatMapService) => this.editorFormatMapService = editorFormatMapService;
Ejemplo n.º 6
0
 HexMarkerServiceWpfHexViewCreationListener(HexViewTagAggregatorFactoryService viewTagAggregatorFactoryService, HexEditorFormatMapService editorFormatMapService)
 {
     this.viewTagAggregatorFactoryService = viewTagAggregatorFactoryService;
     this.editorFormatMapService          = editorFormatMapService;
 }
Ejemplo n.º 7
0
 ActiveColumnHighlighterServiceProviderImpl(HexEditorFormatMapService editorFormatMapService) => this.editorFormatMapService = editorFormatMapService;