This topic covers the implementation details of TAboveBelowHorizonRec.
Scope: TypeDefinitions.pas; record. Prepared from the curated implementation supplied for this review on 2 October 2026.
The intended parent contains ShowWhen, Above and Below. Each child has ChangeFont, FontName and Text, corresponding to TAboveBelowTextOptions.
Current writer anomaly: after creating each child it calls node.SetAttribute instead of node2.SetAttribute. The parent’s rec_type is consequently overwritten with TAboveBelowTextOptions. The reader does not use rec_type for dispatch. Keep this discrepancy visible until the implementation is corrected.
Notation and shared helper rules: Reading this reference.
Literal rec_type values emitted within these routines: TAboveBelowHorizonRec, TAboveBelowTextOptions. Nested values may belong to child wrappers rather than this owner itself; the attribute entries below give their exact locations.
Exact XML fields and attributes
The paths below start at this record or property node. A slash identifies a child element; @ identifies an attribute. Curly braces mark a variable index or expression, not literal XML text. Initial values describe initialization; they do not establish what an omitted individual element does. The Implementation toggle below contains the supplied routines for exact branch order and conversions.
ShowWhen
XML representation: The text of the ShowWhen element.
Reading: Reads the element into ShowWhen when the record node exists.
Writing: Stores the numeric value of ShowWhen (see the value table below) whenever the writer reaches this field.
Above/ChangeFont
XML representation: The text of the ChangeFont element.
Reading: Reads the element into Above.ChangeFont when the record node exists; node2 exists.
Writing: Stores true or false according to Above.ChangeFont whenever the writer reaches this field.
Above/FontName
XML representation: The text of the FontName element.
Reading: Reads the element into Above.FontName when the record node exists; node2 exists.
Writing: Stores Above.FontName whenever the writer reaches this field.
Above/Text
XML representation: The text of the Text element.
Reading: Reads the element into s when the record node exists; node2 exists. Before this read, s is set to Above.Text.
Writing: Stores Above.Text whenever the writer reaches this field.
Below/ChangeFont
XML representation: The text of the ChangeFont element.
Reading: Reads the element into Below.ChangeFont when the record node exists; node2 exists.
Writing: Stores true or false according to Below.ChangeFont whenever the writer reaches this field.
Below/FontName
XML representation: The text of the FontName element.
Reading: Reads the element into Below.FontName when the record node exists; node2 exists.
Writing: Stores Below.FontName whenever the writer reaches this field.
Below/Text
XML representation: The text of the Text element.
Reading: Reads the element into s when the record node exists; node2 exists. Before this read, s is set to Below.Text.
Writing: Stores Below.Text whenever the writer reaches this field.
@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TAboveBelowHorizonRec” whenever the writer reaches this field.
Writing: Stores the literal text “TAboveBelowTextOptions” whenever the writer reaches this field.
Initialization and reset values
This type has no separate initializer in the supplied code. Its starting values come from its enclosing object, inherited initialization, or existing state. Relevant enclosing initializers are identified below.
Enclosing initialization contexts
The following enclosing routines establish or override this record’s starting values. Follow the owner link for the complete initializer. Different enclosing objects can supply different defaults.
TMoonOptions.Create is documented in TMoonOptions.
Value namespaces used by this implementation
These are declared Pascal ordinal values. Use the ordinal only where the field serializer actually writes ord(...), an integer cast or an equivalent value. Set-marker strings and local option lists have their own representation; sentinel members in an enum are not automatically legal XML choices.
TShowAboveBelowWhen
Ordinal |
Declared member |
0 |
sabEveryDay |
1 |
sabFirstDay |
2 |
sabLastDay |
3 |
sabFirstAndLastDay |
Storage declarations relevant to interpretation
These are in-memory member and property types, not a list of mandatory XML children. They retain array bounds, fixed buffers and selector types. The field reference above defines what is actually serialized.
Name |
Declared type / bounds |
Kind |
ShowWhen |
TShowAboveBelowWhen |
member |
Below |
TAboveBelowTextOptions |
member |
Above |
TAboveBelowTextOptions |
member |
The Implementation toggle contains only TAboveBelowHorizonRec methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.
Declaration reproduces this record’s complete declaration from the supplied source, including its fields, properties and method signatures.