/// <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);
public override WpfHexViewMargin?CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) => new SpacerMargin(wpfHexViewHost);
public WpfHexViewMarginInfo(WpfHexViewMarginProvider provider, IWpfHexViewMarginMetadata metadata, WpfHexViewMargin margin) { Provider = provider; Metadata = metadata; Margin = margin; }
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);
/// <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);
public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) => new WpfHexViewContainerMargin(wpfHexViewMarginProviderCollectionProvider, wpfHexViewHost, PredefinedHexMarginNames.RightControl, false);
public override HexGlyphFactory GetGlyphFactory(WpfHexView view, WpfHexViewMargin margin) => new HexImageReferenceGlyphFactory();
public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) => new HorizontalScrollBarMargin(wpfHexViewHost);
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);
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)); }
public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) => new ZoomControlMargin(wpfHexViewHost, editorOperationsFactoryService.GetEditorOperations(wpfHexViewHost.HexView));