SkinProperties

public static class SkinProperties
Static knowledge about skin properties: which combinations of PropertyId bits exist, what kind of value each holds, and how identifiers are written as text.

Properties

All

#
public static PropertyId[] All { get; }
Gets every property that exists, in both modes, in a stable order.

IconColourRoles

#
public static PropertyId[] IconColourRoles { get; }

IconShades

#
public static PropertyId[] IconShades { get; }

Methods

Family

#
public static PropertyId Family(PropertyId id)
id (PropertyId)

HasCore

#
public static bool HasCore(PropertyId wireKind)
wireKind (PropertyId)

HasDash

#
public static bool HasDash(PropertyId wireKind)
Only the wires that signal a state are dashed: empty, disabled and tentative. Item, list and tree wires are always solid, and say what they carry through width and core.
wireKind (PropertyId)

HasOverlay

#
public static bool HasOverlay(PropertyId variant)
Only disabled objects are drawn with an overlay, so the role exists for those shades alone.
variant (PropertyId)

HasSelection

#
public static bool HasSelection(PropertyId wireGroup)
wireGroup (PropertyId)

InMode

#
public static PropertyId[] InMode(PropertyId mode)
Gets every property in a given mode.
mode (PropertyId)Either PropertyId.Lit or PropertyId.Dim.

IsValid

#
public static bool IsValid(PropertyId id)
id (PropertyId)

KindOf

#
public static PropertyType KindOf(PropertyId id)
id (PropertyId)

Mode

#
public static PropertyId Mode(PropertyId id)
id (PropertyId)

Role

#
public static PropertyId Role(PropertyId id)
id (PropertyId)

ToToken

#
public static string ToToken(PropertyId id)
Write a property as a token: mode, family, role and variants separated by full stops, several variants joined by plus signs. Shade, grip and icon colour properties without any variant carry the word Normal.
id (PropertyId)

TryParse

#
public static bool TryParse(string token, out PropertyId id)
Parse a token written by ToToken(PropertyId). Case-insensitive.
token (string)
id (out PropertyId)

Variant

#
public static PropertyId Variant(PropertyId id)
id (PropertyId)

WithMode

#
public static PropertyId WithMode(PropertyId id, PropertyId mode)
id (PropertyId)
mode (PropertyId)

WithRole

#
public static PropertyId WithRole(PropertyId id, PropertyId role)
id (PropertyId)
role (PropertyId)

WithVariant

#
public static PropertyId WithVariant(PropertyId id, PropertyId variant)
id (PropertyId)
variant (PropertyId)