SkinDefinition
ReferencesThe editable source of a Skin. Every property of the skin is either set outright, inherited from another property through modifiers, or left unbound and taken from the built-in default. The Lit and Dim skins live in one definition and may inherit from each other; an unbound icon property does so on its own, following its twin in the other mode before it resorts to the built-in default. A definition compiles to a Skin with ToSkin(PropertyId).
Constructors
Properties
BoundProperties
#Default
#The definition behind the built-in skins, read from the Default.ghskin resource. It is the inheritance-aware twin of Skin.DefaultLit and Skin.DefaultDim, and the starting point for new skins. Each call returns a fresh copy.
Indexers
this[]
#Gets the binding of a property, or null if the property is not bound and therefore takes its built-in default.
Methods
Bind
#Bind a property. Replaces any existing binding.
Exceptions:
| ArgumentException | The property does not exist, the binding has the wrong kind, or it would create a cycle. |
CandidateSources
#Gets the properties this property may inherit from: those of the same kind that would not create a cycle.
ChainOf
#Gets the chain of sources behind a property, nearest first, ending at a property that is set outright or unbound.
Clear
#public void Clear()
DependentsOf
#Gets the properties that directly depend on a property, either by inheriting from it or by mixing it in.
Duplicate
#Evaluate
#Freeze
#Replace an inherited binding by its current result, as a literal. The property stops following its source.
FromSkins
#Gets a fresh copy of the default definition, which expresses the built-in skins as a small number of root colours and the relationships between them.
Inherit
#LoadFromFile
#Parse
#Read a definition from its text form. Faulty lines are skipped and reported.
Set
#Set
#Set
#Set
#Set a dash property to alternating dash and gap lengths. An empty pattern, or null, is a solid stroke.
Unbind
#Remove the binding of a property, so it takes its built-in default.
Returns: True if the property was bound.