Beispiel #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);
Beispiel #2
0
 public override WpfHexViewMargin?CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new SpacerMargin(wpfHexViewHost);
Beispiel #3
0
 public WpfHexViewMarginInfo(WpfHexViewMarginProvider provider, IWpfHexViewMarginMetadata metadata, WpfHexViewMargin margin)
 {
     Provider = provider;
     Metadata = metadata;
     Margin   = margin;
 }
Beispiel #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);
Beispiel #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);
Beispiel #9
0
 public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new WpfHexViewContainerMargin(wpfHexViewMarginProviderCollectionProvider, wpfHexViewHost, PredefinedHexMarginNames.RightControl, false);
Beispiel #10
0
 public override HexGlyphFactory GetGlyphFactory(WpfHexView view, WpfHexViewMargin margin) => new HexImageReferenceGlyphFactory();
Beispiel #11
0
 public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new HorizontalScrollBarMargin(wpfHexViewHost);
Beispiel #12
0
 public override WpfHexViewMargin?CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new LeftSelectionMargin(wpfHexViewMarginProviderCollectionProvider, wpfHexViewHost, editorOperationsFactoryService.GetEditorOperations(wpfHexViewHost.HexView));
 public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new VerticalScrollBarMargin(scrollMapFactoryService, wpfHexViewHost);
Beispiel #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);
Beispiel #17
0
 public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
 new ZoomControlMargin(wpfHexViewHost, editorOperationsFactoryService.GetEditorOperations(wpfHexViewHost.HexView));