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 WpfHexViewMarginProviderCollectionImpl(Lazy<WpfHexViewMarginProvider, IWpfHexViewMarginMetadata>[] wpfHexViewMarginProviders, WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer, string marginContainerName) {
			if (wpfHexViewMarginProviders == null)
				throw new ArgumentNullException(nameof(wpfHexViewMarginProviders));
			if (wpfHexViewHost == null)
				throw new ArgumentNullException(nameof(wpfHexViewHost));
			if (marginContainer == null)
				throw new ArgumentNullException(nameof(marginContainer));
			if (marginContainerName == 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;
			currentMargins = Array.Empty<WpfHexViewMarginInfo>();
			wpfHexViewHost.Closed += WpfHexViewHost_Closed;
			UpdateMargins();
		}
		public abstract WpfHexViewMarginProviderCollection Create(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer, string marginContainerName);
		public override IGuidObjectsProvider Create(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin margin, string marginName) {
			if (wpfHexViewHost == null)
				throw new ArgumentNullException(nameof(wpfHexViewHost));
			if (margin == null)
				throw new ArgumentNullException(nameof(margin));
			if (marginName == null)
				throw new ArgumentNullException(nameof(marginName));
			if (margin.GetHexViewMargin(marginName) != margin)
				throw new ArgumentException();
			return new GuidObjectsProvider(wpfHexViewHost, margin, marginName, marginContextMenuHandlerProviders);
		}
			public GuidObjectsProvider(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin margin, string marginName, Lazy<HexMarginContextMenuHandlerProvider, IMarginContextMenuHandlerProviderMetadata>[] marginContextMenuHandlerProviders) {
				this.wpfHexViewHost = wpfHexViewHost;
				this.margin = margin;
				this.marginName = marginName;
				this.marginContextMenuHandlerProviders = marginContextMenuHandlerProviders;
			}
		public override HexGlyphFactory GetGlyphFactory(WpfHexView view, WpfHexViewMargin margin) => new HexImageReferenceGlyphFactory();
Exemple #7
0
		public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
			new HexGlyphMargin(menuService, wpfHexViewHost, viewTagAggregatorFactoryService, editorFormatMapService, glyphMouseProcessorProviders, glyphFactoryProviders, marginContextMenuHandlerProviderService);
		public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
			new WpfHexViewContainerMargin(wpfHexViewMarginProviderCollectionProvider, wpfHexViewHost, PredefinedHexMarginNames.BottomControl, false);
 /// <summary>
 /// Creates <see cref="IHexMarginContextMenuHandler"/>s or returns null
 /// </summary>
 /// <param name="wpfHexViewHost">Hex view host</param>
 /// <param name="margin">Margin</param>
 /// <returns></returns>
 public abstract IHexMarginContextMenuHandler Create(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin margin);
		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));
		/// <summary>
		/// Creates a <see cref="IGuidObjectsProvider"/>
		/// </summary>
		/// <param name="wpfHexViewHost">Hex view host</param>
		/// <param name="margin">Margin</param>
		/// <param name="marginName">Margin name</param>
		/// <returns></returns>
		public abstract IGuidObjectsProvider Create(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin margin, string marginName);
		/// <summary>
		/// Creates <see cref="IHexMarginContextMenuHandler"/>s or returns null
		/// </summary>
		/// <param name="wpfHexViewHost">Hex view host</param>
		/// <param name="margin">Margin</param>
		/// <returns></returns>
		public abstract IHexMarginContextMenuHandler Create(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin margin);
Exemple #14
0
		public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
			new SpacerMargin(wpfHexViewHost);
		public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
			new BottomRightCornerMargin(wpfHexViewHost);
Exemple #16
0
		public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
			new ZoomControlMargin(wpfHexViewHost, editorOperationsFactoryService.GetEditorOperations(wpfHexViewHost.HexView));
 /// <summary>
 /// Creates a <see cref="IGuidObjectsProvider"/>
 /// </summary>
 /// <param name="wpfHexViewHost">Hex view host</param>
 /// <param name="margin">Margin</param>
 /// <param name="marginName">Margin name</param>
 /// <returns></returns>
 public abstract IGuidObjectsProvider Create(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin margin, string marginName);
		public override WpfHexViewMargin CreateMargin(WpfHexViewHost wpfHexViewHost, WpfHexViewMargin marginContainer) =>
			new HorizontalScrollBarContainerMargin(wpfHexViewMarginProviderCollectionProvider, wpfHexViewHost);
		public WpfHexViewMarginInfo(WpfHexViewMarginProvider provider, IWpfHexViewMarginMetadata metadata, WpfHexViewMargin margin) {
			Provider = provider;
			Metadata = metadata;
			Margin = margin;
		}