Please enable JavaScript to view this site.

 

Navigation: Appendices > Q++Studio > XML Identifiers > Internal Data Structures > Implementation > List

TPictureboxAttr — XML implementation

Scroll Prev Up Next More

This topic covers the implementation details of TPictureboxAttr.

 

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

 

Align, BoundingBox and CropOptions are three different enum domains; do not substitute InDesign SDK constant numbers. Scale and Scroll each have a Change flag and values stored as Round(value×1000000).

 

Initialize sets top-left alignment, no transparency, no fit-to-picture, scale 100%, media-box bounding, page 1 and crop-to-page. The XML reader reads Align through an unseeded temporary integer; supply it rather than relying on missing-field behavior.

 

The XML reader does not reproduce all the explicit range-repair checks found in the older string-list reader. Do not promise the same validation for XML.

 

Notation and shared helper rules: Reading this reference.

 

XML identity and composition

 

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

 

Transparent

 

XML representation: The text of the Transparent element.

 

Initial value: false (TPictureboxAttr.Initialize).

 

Reading: Reads the element into Transparent when the record node exists.

 

Writing: Stores true or false according to Transparent whenever the writer reaches this field.

 

FitBoxToPicture

 

XML representation: The text of the FitBoxToPicture element.

 

Initial value: false (TPictureboxAttr.Initialize).

 

Reading: Reads the element into FitBoxToPicture when the record node exists.

 

Writing: Stores true or false according to FitBoxToPicture whenever the writer reaches this field.

 

Align

 

XML representation: The text of the Align element.

 

Initial value: pbaTopLeft (3) (TPictureboxAttr.Initialize).

 

Reading: Reads the element into buffInt when the record node exists. The subsequent conversion is shown in Implementation.

 

Writing: Stores the text representation of ord (Align) whenever the writer reaches this field.

 

Filename

 

XML representation: The text of the Filename element.

 

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

 

Reading: Reads the element into Filename when the record node exists.

 

Writing: Stores Filename whenever the writer reaches this field.

 

Scale/ChangeScale

 

XML representation: The text of the ChangeScale element.

 

Initial value: false (TPictureboxAttr.Initialize).

 

Reading: Reads the element into ChangeScale when the record node exists; node2 exists.

 

Writing: Stores true or false according to ChangeScale whenever the writer reaches this field.

 

Scale/xScale

 

XML representation: The text of the xScale element.

 

Initial value: 100.0 (TPictureboxAttr.Initialize).

 

Reading: Reads the stored number, divides it by 1000000.0, and assigns the result to xScale when the record node exists; node2 exists; ChangeScale is true. The temporary numeric value starts at 100000000 before reading.

 

Writing: Stores xScale multiplied by 1000000, then rounded to an integer when ChangeScale is true.

 

Scale/yScale

 

XML representation: The text of the yScale element.

 

Initial value: 100.0 (TPictureboxAttr.Initialize).

 

Reading: Reads the stored number, divides it by 1000000.0, and assigns the result to yScale when the record node exists; node2 exists; ChangeScale is true. The temporary numeric value starts at 100000000 before reading.

 

Writing: Stores yScale multiplied by 1000000, then rounded to an integer when ChangeScale is true.

 

Scroll/ChangeScroll

 

XML representation: The text of the ChangeScroll element.

 

Initial value: false (TPictureboxAttr.Initialize).

 

Reading: Reads the element into ChangeScroll when the record node exists; node2 exists.

 

Writing: Stores true or false according to ChangeScroll whenever the writer reaches this field.

 

Scroll/xScroll

 

XML representation: The text of the xScroll element.

 

Initial value: 0.0 (TPictureboxAttr.Initialize).

 

Reading: Reads the stored number, divides it by 1000000.0, and assigns the result to xScroll when the record node exists; node2 exists; ChangeScroll is true. The temporary numeric value starts at 0 before reading.

 

Writing: Stores xScroll multiplied by 1000000, then rounded to an integer when ChangeScroll is true.

 

Scroll/yScroll

 

XML representation: The text of the yScroll element.

 

Initial value: 0.0 (TPictureboxAttr.Initialize).

 

Reading: Reads the stored number, divides it by 1000000.0, and assigns the result to yScroll when the record node exists; node2 exists; ChangeScroll is true. The temporary numeric value starts at 0 before reading.

 

Writing: Stores yScroll multiplied by 1000000, then rounded to an integer when ChangeScroll is true.

 

BoundingBox

 

XML representation: The text of the BoundingBox element.

 

Initial value: kPDFMediaBox (0) (TPictureboxAttr.Initialize).

 

Reading: Reads the element into buffInt when the record node exists. The subsequent conversion is shown in Implementation.

 

Writing: Stores the text representation of ord (BoundingBox) whenever the writer reaches this field.

 

PageNum

 

XML representation: The text of the PageNum element.

 

Initial value: 1 (TPictureboxAttr.Initialize).

 

Reading: Reads the element into PageNum when the record node exists.

 

Writing: Stores the text representation of ord (PageNum) whenever the writer reaches this field.

 

CropOptions

 

XML representation: The text of the CropOptions element.

 

Initial value: kINDDCropToPage (0) (TPictureboxAttr.Initialize).

 

Reading: Reads the element into buffInt when the record node exists. The subsequent conversion is shown in Implementation.

 

Writing: Stores the text representation of ord (CropOptions) whenever the writer reaches this field.

 

@rec_type

 

XML representation: The rec_type attribute.

 

Writing: Stores the literal text “TPictureboxAttr” whenever the writer reaches this field.

 

Initialization and reset values

 

TPictureboxAttr.Initialize

 

Setting or temporary variable

Initial value

When it is assigned

self

Default (TPictureboxAttr)

Always

Filename

an empty string

Always

Align

pbaTopLeft (3)

Always

Transparent

false

Always

FitBoxToPicture

false

Always

ChangeScroll

false

Always

xScroll

0.0

Always

yScroll

0.0

Always

ChangeScale

false

Always

xScale

100.0

Always

yScale

100.0

Always

BoundingBox

kPDFMediaBox (0)

Always

PageNum

1

Always

CropOptions

kINDDCropToPage (0)

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.

 

TBoundingBox

 

Ordinal

Declared member

0

kPDFMediaBox

1

kPDFCropBox

2

kPDFBleedBox

3

kPDFTrimBox

4

kPDFVisibleContent

5

kPDFArt

6

kPDFPage

7

kPDFContentAllLayers

 

TCropOptions

 

Ordinal

Declared member

0

kINDDCropToPage

1

kINDDCropToBleed

2

kINDDCropToSlug

 

TPictureBoxAlignment

 

Ordinal

Declared member

0

pbaCenterNoStretch

1

pbaHomeoStretch

2

pbaFullStretch

3

pbaTopLeft

4

pbaSpecificValues

5

pbaScaleToFill

6

pbaNone

 

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

Filename

string

member

Align

TPictureBoxAlignment

member

Transparent

boolean

member

FitBoxToPicture

boolean

member

ChangeScroll

boolean

member

xScroll

double

member

yScroll

double

member

ChangeScale

boolean

member

xScale

double

member

yScale

double

member

BoundingBox

TBoundingBox

member

PageNum

integer

member

CropOptions

TCropOptions

member

 

Implementation details

 

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