Please enable JavaScript to view this site.

 

This topic covers the implementation details of TTextFrameRec.

 

Scope: TypeDefinitions.pas; record. Prepared from the curated implementation supplied for this review on 2 October 2026.

 

Each side has a state. Any checked side enables the shared payload; Options selects individual values. Numeric selected values use Trunc(value×10000). ComboType further restricts which fields apply.

 

Options is comma-terminated and uses this record’s own ordinal sequence. The reader’s Width buffer default differs from the record initializer; constructor defaults are not universal missing-field defaults.

 

The legacy right-side read has the same buffRight-key/destination anomaly as TTextShadeRec.

 

Notation and shared helper rules: Reading this reference.

 

XML identity and composition

 

Literal rec_type values emitted within these routines: TComboTextFrameRec, TTextFrameRec. 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:

 

TCombinedFrameShadeRec

 

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.

 

Left

 

XML representation: The text of the Left element.

 

Initial value: 1 (TTextFrameRec.Initialize).

 

Reading: Reads the element into buffLeft when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.FWasReadIn is false. Before this read, buffLeft is set to 0.

 

Reading: Reads the stored number, divides it by 10000.0, and assigns the result to Left when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboRec.ComboType is not cfsBoxModify (4). The temporary numeric value starts at 0 before reading.

 

Writing: Stores Left multiplied by 10000.0, then truncated to an integer when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboType is not cfsBoxModify (4); tfrLeft is selected in Options.

 

buffRight

 

XML representation: The text of the buffRight element.

 

Reading: Reads the element into buffInt when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.FWasReadIn is false.

 

Export: No corresponding write is implemented locally. This can be a compatibility input or a field handled elsewhere.

 

TopState

 

XML representation: The text of the TopState element.

 

Initial value: qcbGrayed (2) (TTextFrameRec.Initialize).

 

Reading: Reads the element into TopState when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete].

 

Writing: Stores the numeric value of TopState (see the value table below) when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete].

 

BottomState

 

XML representation: The text of the BottomState element.

 

Initial value: qcbGrayed (2) (TTextFrameRec.Initialize).

 

Reading: Reads the element into BottomState when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete].

 

Writing: Stores the numeric value of BottomState (see the value table below) when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete].

 

LeftState

 

XML representation: The text of the LeftState element.

 

Initial value: qcbGrayed (2) (TTextFrameRec.Initialize).

 

Reading: Reads the element into LeftState when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete].

 

Writing: Stores the numeric value of LeftState (see the value table below) when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete].

 

RightState

 

XML representation: The text of the RightState element.

 

Initial value: qcbGrayed (2) (TTextFrameRec.Initialize).

 

Reading: Reads the element into RightState when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete].

 

Writing: Stores the numeric value of RightState (see the value table below) when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete].

 

Options

 

XML representation: The text of the Options element.

 

Reading: Reads the stored value for Options; its subsequent processing is shown in Implementation when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)).

 

Writing: Stores strOptions when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)).

 

ColorName

 

XML representation: The text of the ColorName element.

 

Initial value: an empty string (TTextFrameRec.Initialize).

 

Reading: Reads the element into ColorName when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)).

 

Writing: Stores ColorName when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); tfrColor is selected in Options.

 

Width

 

XML representation: The text of the Width element.

 

Initial value: 1 (TTextFrameRec.Initialize).

 

Reading: Reads the stored number, divides it by 10000.0, and assigns the result to Width when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)). The temporary numeric value starts at 100 * 10000 before reading.

 

Writing: Stores Width multiplied by 10000.0, then truncated to an integer when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); tfrWidth is selected in Options.

 

Shade

 

XML representation: The text of the Shade element.

 

Initial value: 100 (TTextFrameRec.Initialize).

 

Reading: Reads the stored number, divides it by 10000.0, and assigns the result to Shade when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)). The temporary numeric value starts at 100 * 10000 before reading.

 

Writing: Stores Shade multiplied by 10000.0, then truncated to an integer when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); tfrShade is selected in Options.

 

Opacity

 

XML representation: The text of the Opacity element.

 

Initial value: 100 (TTextFrameRec.Initialize).

 

Reading: Reads the stored number, divides it by 10000.0, and assigns the result to Opacity when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)). The temporary numeric value starts at 100 * 10000 before reading.

 

Writing: Stores Opacity multiplied by 10000.0, then truncated to an integer when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); tfrOpacity is selected in Options.

 

Style

 

XML representation: The text of the Style element.

 

Initial value: 0 (TTextFrameRec.Initialize).

 

Reading: Reads the element into Style when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)).

 

Writing: Stores the numeric value of Style when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); tfrStyle is selected in Options.

 

StyleName

 

XML representation: The text of the StyleName element.

 

Initial value: an empty string (TTextFrameRec.Initialize).

 

Reading: Reads the element into StyleName when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)).

 

Writing: Stores StyleName when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); tfrStyle is selected in Options.

 

Top

 

XML representation: The text of the Top element.

 

Initial value: 1 (TTextFrameRec.Initialize).

 

Reading: Reads the stored number, divides it by 10000.0, and assigns the result to Top when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboRec.ComboType is not cfsBoxModify (4). The temporary numeric value starts at 0 before reading.

 

Writing: Stores Top multiplied by 10000.0, then truncated to an integer when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboType is not cfsBoxModify (4); tfrTop is selected in Options.

 

Bottom

 

XML representation: The text of the Bottom element.

 

Initial value: 1 (TTextFrameRec.Initialize).

 

Reading: Reads the stored number, divides it by 10000.0, and assigns the result to Bottom when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboRec.ComboType is not cfsBoxModify (4). The temporary numeric value starts at 0 before reading.

 

Writing: Stores Bottom multiplied by 10000.0, then truncated to an integer when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboType is not cfsBoxModify (4); tfrBottom is selected in Options.

 

Right

 

XML representation: The text of the Right element.

 

Initial value: 1 (TTextFrameRec.Initialize).

 

Reading: Reads the stored number, divides it by 10000.0, and assigns the result to Right when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboRec.ComboType is not cfsBoxModify (4). The temporary numeric value starts at 0 before reading.

 

Writing: Stores Right multiplied by 10000.0, then truncated to an integer when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboType is not cfsBoxModify (4); tfrRight is selected in Options.

 

ClipToBox

 

XML representation: The text of the ClipToBox element.

 

Initial value: false (TTextFrameRec.Initialize).

 

Reading: Reads the element into ClipToBox when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboRec.ComboType is not cfsBoxModify (4); ComboRec.ComboType is not cfsBoxCreate (2).

 

Writing: Stores true or false according to ClipToBox when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboType is not cfsBoxModify (4); ComboType is not cfsBoxCreate (2); tfrClipToBox is selected in Options.

 

Length

 

XML representation: The text of the Length element.

 

Reading: Reads the element into Length when the record node exists; (the TopState child element exists or the BottomState child element exists or the LeftState child element exists or the RightState child element exists); ComboRec.ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboRec.ComboType is not cfsBoxModify (4); ComboRec.ComboType is not cfsBoxCreate (2).

 

Writing: Stores the numeric value of Length (see the value table below) when ComboType is not one of [cfsNone, cfsBoxKeep, cfsBoxDelete]; (LeftState is qcbChecked (1) or RightState is qcbChecked (1) or TopState is qcbChecked (1) or BottomState is qcbChecked (1)); ComboType is not cfsBoxModify (4); ComboType is not cfsBoxCreate (2); tfrLength is selected in Options.

 

@rec_type

 

XML representation: The rec_type attribute.

 

Writing: Stores the literal text “TTextFrameRec” when ComboType is one of [cfsNone, cfsText].

 

Writing: Stores the literal text “TComboTextFrameRec” when ComboType is not one of [cfsNone, cfsText].

 

Nested records and repeated elements

 

Operation

XML location

When it is processed

Read self

.

Whenever this part of the routine is reached

 

Initialization and reset values

 

TTextFrameRec.Initialize

 

Setting or temporary variable

Initial value

When it is assigned

self

Default (TTextFrameRec)

Always

Style

0

Always

StyleName

an empty string

Always

TopState

qcbGrayed (2)

Always

BottomState

qcbGrayed (2)

Always

LeftState

qcbGrayed (2)

Always

RightState

qcbGrayed (2)

Always

Top

1

Always

Bottom

1

Always

Left

1

Always

Right

1

Always

ColorName

an empty string

Always

Shade

100

Always

Opacity

100

Always

Width

1

Always

ClipToBox

false

Always

 

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.

 

TqppCheckBoxState

 

Ordinal

Declared member

0

qcbUnchecked

1

qcbChecked

2

qcbGrayed

 

TRulesLength

 

Ordinal

Declared member

0

qrlIndents

1

qrlText

2

qrlColumn

 

TCombinedFrameShadeType

 

Ordinal

Declared member

0

cfsNone

1

cfsText

2

cfsBoxCreate

3

cfsBoxKeep

4

cfsBoxModify

5

cfsBoxDelete

 

TTextFrameOptions

 

Ordinal

Declared member

0

tfrClipToBox

1

tfrLength

2

tfrColor

3

tfrShade

4

tfrOpacity

5

tfrWidth

6

tfrStyle

7

tfrLeft

8

tfrRight

9

tfrTop

10

tfrBottom

 

Built-in numeric style names and their separate namespaces: Values and encodings.

 

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

TopState

TqppCheckBoxState

member

BottomState

TqppCheckBoxState

member

LeftState

TqppCheckBoxState

member

RightState

TqppCheckBoxState

member

Options

set of TTextFrameOptions

member

Top

double

member

Bottom

double

member

Left

double

member

Right

double

member

Length

TRulesLength

member

Style

integer

member

FColorName

array [1..50] of Char

member

Shade

double

member

Opacity

double

member

Width

double

member

ClipToBox

boolean

member

FStyleName

array [1..128] of Char

member

ColorName

string

property/accessor

StyleName

string

property/accessor

 

Implementation details

 

The Implementation toggle contains only TTextFrameRec 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.

 

Declaration

 

Implementation