Table of Contents

Class DisplayModeController

Namespace
EncDotNet.S100.Pipelines.Vector
Assembly
EncDotNet.S100.Core.dll

Tracks the active S-100 Part 9 display-mode id for a vector portrayal catalogue.

public sealed class DisplayModeController
Inheritance
DisplayModeController
Inherited Members

Remarks

Per S-100 Part 9 ยง11.7, a portrayal catalogue may declare one or more <displayMode> elements (e.g. DisplayBase, StandardDisplay, OtherInformation for S-101). Each mode references a set of <viewingGroupLayer> ids, and each layer references a set of integer viewing groups. The active mode determines the base on/off state of every viewing group; per-group user overrides (handled by ViewingGroupController) layer on top.

This controller carries only the chosen mode id. The per-spec catalogue subscribes to Changed and translates the id into a concrete viewing-group set, which it pushes into its paired ViewingGroupController.

Properties

ActiveDisplayModeId

The id of the active display mode, or null when no mode is active (interpreted as "all viewing groups visible").

public string? ActiveDisplayModeId { get; }

Property Value

string

DeclaredModeIds

The set of display-mode ids declared by the per-spec portrayal catalogue this controller is bound to. Empty until SetDeclaredModeIds(IReadOnlySet<string>) is called (typically by DisplayModeMembership.Bind). The viewer uses this to decide which ECDIS categories make sense for a given spec. The returned set is a non-downcastable read-only view.

public IReadOnlySet<string> DeclaredModeIds { get; }

Property Value

IReadOnlySet<string>

Methods

SetActive(string?)

Sets ActiveDisplayModeId. Pass null to clear (every viewing group visible by default).

public void SetActive(string? displayModeId)

Parameters

displayModeId string

SetDeclaredModeIds(IReadOnlySet<string>)

Records the catalogue-declared mode ids. Does not raise Changed; this is metadata only.

public void SetDeclaredModeIds(IReadOnlySet<string> ids)

Parameters

ids IReadOnlySet<string>

Events

Changed

Raised whenever ActiveDisplayModeId changes.

public event Action? Changed

Event Type

Action