Esempio n. 1
0
 /// <summary>
 /// Creates a margin or returns null
 /// </summary>
 /// <param name="wpfHexViewHost">WPF hex view host</param>
 /// <param name="marginContainer">Margin container</param>
 /// <returns></returns>
 public abstract WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer);
Esempio n. 2
0
 public override WpfHexViewMargin?CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new SpacerMargin(wpfHexViewHost);
Esempio n. 3
0
 public WpfHexViewMarginInfo(WpfHexViewMarginProvider provider, IWpfHexViewMarginMetadata metadata, WpfHexViewMargin margin)
 {
     Provider = provider;
     Metadata = metadata;
     Margin   = margin;
 }
Esempio n. 4
0
 public WpfHexViewMarginProviderCollectionImpl(Lazy <WpfHexViewMarginProvider, IWpfHexViewMarginMetadata>[] wpfHexViewMarginProviders, WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer, string marginContainerName)
 {
     if (wpfHexViewMarginProviders is null)
     {
         throw new ArgumentNullException(nameof(wpfHexViewMarginProviders));
     }
     if (wpfHexViewHost is null)
     {
         throw new ArgumentNullException(nameof(wpfHexViewHost));
     }
     if (marginContainerName is null)
     {
         throw new ArgumentNullException(nameof(marginContainerName));
     }
     this.wpfHexViewMarginProviders = wpfHexViewMarginProviders.Where(a =>
                                                                      StringComparer.OrdinalIgnoreCase.Equals(marginContainerName, a.Metadata.MarginContainer) &&
                                                                      wpfHexViewHost.HexView.Roles.ContainsAny(a.Metadata.TextViewRoles)
                                                                      ).ToArray();
     this.wpfHexViewHost    = wpfHexViewHost;
     this.marginContainer   = marginContainer ?? throw new ArgumentNullException(nameof(marginContainer));
     currentMargins         = Array.Empty <WpfHexViewMarginInfo>();
     wpfHexViewHost.Closed += WpfHexViewHost_Closed;
     UpdateMargins();
 }
 public override WpfHexViewMargin?CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new BottomRightCornerMargin(wpfHexViewHost);
Esempio n. 6
0
 /// <summary>
 /// Creates a <see cref="HexGlyphFactory"/> or returns null
 /// </summary>
 /// <param name="view">Hex view</param>
 /// <param name="margin">Margin</param>
 /// <returns></returns>
 public abstract HexGlyphFactory GetGlyphFactory(WpfHexView view, WpfHexViewMargin margin);
 public abstract WpfHexViewMarginProviderCollection Create(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer, string marginContainerName);
 /// <summary>
 /// Creates a mouse processor or returns null
 /// </summary>
 /// <param name="wpfHexViewHost">Hex view host</param>
 /// <param name="margin">Margin</param>
 /// <returns></returns>
 public abstract HexMouseProcessor GetAssociatedMouseProcessor(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin margin);
Esempio n. 9
0
 public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new WpfHexViewContainerMargin(wpfHexViewMarginProviderCollectionProvider, wpfHexViewHost, PredefinedHexMarginNames.RightControl, false);
Esempio n. 10
0
 public override HexGlyphFactory GetGlyphFactory(WpfHexView view, WpfHexViewMargin margin) => new HexImageReferenceGlyphFactory();
Esempio n. 11
0
 public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new HorizontalScrollBarMargin(wpfHexViewHost);
Esempio n. 12
0
 public override WpfHexViewMargin?CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new LeftSelectionMargin(wpfHexViewMarginProviderCollectionProvider, wpfHexViewHost, editorOperationsFactoryService.GetEditorOperations(wpfHexViewHost.HexView));
Esempio n. 13
0
 public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new VerticalScrollBarMargin(scrollMapFactoryService, wpfHexViewHost);
Esempio n. 14
0
 public override WpfHexViewMargin?CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new HexGlyphMargin(menuService, wpfHexViewHost, viewTagAggregatorFactoryService, editorFormatMapService, glyphMouseProcessorProviders, glyphFactoryProviders, marginContextMenuHandlerProviderService);
 public override WpfHexViewMarginProviderCollection Create(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer, string marginContainerName)
 {
     if (wpfHexViewHost == null)
     {
         throw new ArgumentNullException(nameof(wpfHexViewHost));
     }
     if (marginContainer == null)
     {
         throw new ArgumentNullException(nameof(marginContainer));
     }
     if (marginContainerName == null)
     {
         throw new ArgumentNullException(nameof(marginContainerName));
     }
     return(new WpfHexViewMarginProviderCollectionImpl(wpfHexViewMarginProviders, wpfHexViewHost, marginContainer, marginContainerName));
 }
		/// <summary>
		/// Creates a mouse processor or returns null
		/// </summary>
		/// <param name="wpfHexViewHost">Hex view host</param>
		/// <param name="margin">Margin</param>
		/// <returns></returns>
		public abstract HexMouseProcessor GetAssociatedMouseProcessor(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin margin);
Esempio n. 17
0
 public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new ZoomControlMargin(wpfHexViewHost, editorOperationsFactoryService.GetEditorOperations(wpfHexViewHost.HexView));