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
displayModesDisplayModeControllerviewingGroupsViewingGroupControllercataloguePortrayalCatalogue
Returns
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
cataloguePortrayalCatalogueThe parsed portrayal catalogue.
displayModeIdstringThe id of the desired display mode (e.g.
"DisplayBase"). Matched case-insensitively. If the mode is not declared the returned set is empty.
Returns
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
cataloguePortrayalCatalogueThe parsed portrayal catalogue.