Table of Contents

Class DisplayModeMembership

Namespace
EncDotNet.S100.Portrayals
Assembly
EncDotNet.S100.Portrayals.dll

Resolves S-100 Part 9 §11.7 display-mode membership: walks displayMode → viewingGroupLayer → viewingGroup and returns the integer viewing-group ids that belong to a given mode.

public static class DisplayModeMembership
Inheritance
DisplayModeMembership
Inherited Members

Methods

Bind(DisplayModeController, ViewingGroupController, PortrayalCatalogue)

Wires displayModes to keep viewingGroups in sync with the active display mode declared in catalogue. The wiring updates the viewing-group controller's mode membership only; any user overrides set via SetUserOverride(int, bool?) are preserved across mode changes.

public static Action Bind(DisplayModeController displayModes, ViewingGroupController viewingGroups, PortrayalCatalogue catalogue)

Parameters

displayModes DisplayModeController
viewingGroups ViewingGroupController
catalogue PortrayalCatalogue

Returns

Action

The handler that was attached to Changed, in case callers need to detach it later.

Resolve(PortrayalCatalogue, string)

Resolves the integer viewing-group ids that are visible for the given display mode declared in catalogue. Layer ids referenced by the mode but absent from the catalogue are skipped silently; viewing-group ids that don't parse as integers are skipped silently (a non-numeric id is meaningless to DrawingInstruction.ViewingGroup).

public static IReadOnlySet<int> Resolve(PortrayalCatalogue catalogue, string displayModeId)

Parameters

catalogue PortrayalCatalogue

The parsed portrayal catalogue.

displayModeId string

The id of the desired display mode (e.g. "DisplayBase"). Matched case-insensitively. If the mode is not declared the returned set is empty.

Returns

IReadOnlySet<int>

ResolveChartText(PortrayalCatalogue)

Resolves the viewing groups of the catalogue's Chart text layer: the text groups no display mode lists, which the mariner switches on and off independently (the S-101 portrayal catalogue's "text layer groups"). Empty when the catalogue has no such layer.

public static IReadOnlySet<int> ResolveChartText(PortrayalCatalogue catalogue)

Parameters

catalogue PortrayalCatalogue

The parsed portrayal catalogue.

Returns

IReadOnlySet<int>