This topic covers the implementation details of TTimesDisplayRec.
Scope: TypeDefinitions.pas; record. Prepared from the curated implementation supplied for this review on 2 October 2026.
default_vals=true resets standard time display settings, then still reads NoTimeText. This is an explicit exception to treating a default marker as “ignore every other child”.
The standard format is hh":"nn, RoundMinutes=true and empty NoTimeText. IsDefault accepts either empty NoTimeText or --:-- and also requires default minute font settings. The latter are serialized directly under MinutesFontSettings.
Formatting and NoTimeText use fixed Char buffers of 20 and 15 storage slots. Actual usable length depends on StringToArray.
Notation and shared helper rules: Reading this reference.
Literal rec_type values emitted within these routines: TTimesDisplayRec. Nested values may belong to child wrappers rather than this owner itself; the attribute entries below give their exact locations.
Structures used directly by this XML implementation:
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.
default_vals
XML representation: The text of the default_vals element.
Reading: Reads the element into UseDefaultVals when the record node exists. Before this read, UseDefaultVals is set to false.
Writing: Stores the literal text “true” when IsDefault is true.
Writing: Stores the literal text “false” when IsDefault is false.
NoTimeText
XML representation: The text of the NoTimeText element.
Initial value: an empty string (TTimesDisplayRec.ResetToDefaults).
Reading: Reads the element into NoTimeText when the record node exists; UseDefaultVals is true.
Reading: Reads the element into NoTimeText when the record node exists; UseDefaultVals is false.
Writing: Stores NoTimeText when IsDefault is true.
Writing: Stores NoTimeText when IsDefault is false.
Formatting
XML representation: The text of the Formatting element.
Initial value: “hh":"nn” (TTimesDisplayRec.ResetToDefaults).
Reading: Reads the element into Formatting when the record node exists; UseDefaultVals is false.
Writing: Stores Formatting when IsDefault is false.
RoundMinutes
XML representation: The text of the RoundMinutes element.
Initial value: true (TTimesDisplayRec.ResetToDefaults).
Reading: Reads the element into RoundMinutes when the record node exists; UseDefaultVals is false.
Writing: Stores true or false according to RoundMinutes when IsDefault is false.
@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TTimesDisplayRec” whenever the writer reaches this field.
Nested records and repeated elements
Operation |
XML location |
When it is processed |
Read MinutesSettings.FontSettings |
MinutesFontSettings |
the record node exists; UseDefaultVals is false |
Write MinutesSettings.FontSettings |
MinutesFontSettings |
IsDefault is false |
Initialization and reset values
TTimesDisplayRec.ResetToDefaults
Setting or temporary variable |
Initial value |
When it is assigned |
Formatting |
“hh":"nn” |
Always |
NoTimeText |
an empty string |
Always |
RoundMinutes |
true |
Always |
This routine also calls MinutesSettings.ResetToDefaults. See Implementation for their order and any conditional calls.
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.
TReligiousOptions.Create is documented in TReligiousOptions.
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 |
FFormatting |
array [1..20] of Char |
member |
FNoTimeText |
array [1..15] of Char |
member |
RoundMinutes |
Boolean |
member |
MinutesSettings |
TmcTextSettings |
member |
Formatting |
string |
property/accessor |
NoTimeText |
string |
property/accessor |
The Implementation toggle contains only TTimesDisplayRec 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.