A reference-value-type-declaration declares identifier to be
the name of a reference-value type. The identifier shall not be
the
name of a characteristic or of any other keyword argument accepted by a
make-expression.
(first-area-reference-value symbol #!key default: inherit:)
(last-area-reference-value symbol #!key default: inherit:)
(last-preceding-area-reference-value symbol #!key default:)
(all-area-reference-values symbol #!key unique: inherit:)
Each of these procedures may be used only in a
generate-specification or in the construction of a
decoration area. The context in which these procedures are
used determines a list of areas, the associated-areas list,
on which these procedures operate.
When the procedures are used in the construction of a decoration area,
the associated-areas list contains just the decorated area. When the
procedures are used in a generate-specification in a
header-specification, footer-specification, or
footnote-separator-specification in a column-specification,
then the associated-area list contains the areas that are placed in
the same column-set area container and that are in the body-text zone and
that overlap the column. When the procedures are used in a
generate-specification in a header-specification or
footer-specification, or in a page-region-specification,
then the associated-area list contains the areas that are placed in
the same page-region area container as the generated area.
A flow object is eligible if
| • it has a reference value symbol, or |
| • it has an ancestor with a reference value symbol,
and inherit: is specified and is not #f. |
The relevant reference value for an eligible flow object is
the reference value symbol of the eligible flow object, if the
eligible flow object has the reference value symbol, and otherwise
is the reference value symbol of the nearest ancestor of the
eligible flow object that has the reference value symbol.
first-area-reference-value does a pre-order traversal of the
flow object tree searching for the first eligible flow object
that produces an area that
| • is one of the areas in the associated-area list, or |
| • is contained in one of the areas in the associated-area list |
and returns a generated-object whose kernel is the value of the relevant
reference value for that flow object.
When a flow object has more
than one stream, then each stream is searched separately. If
the search finds flow objects in more than one stream,
then the flow object that is earlier
in the layout order of the area is returned. If the search
finds no flow object,
the value of the default: argument is returned,
which shall be a generated-object.
last-area-reference-value behaves the same as
first-area-reference-value except that the order of the search
is reversed.
last-preceding-area-reference-value does a pre-order
traversal of the flow object tree searching for the last
eligible flow object, all of whose areas are before all the areas
in the associated-areas list, and returns a generated-object
whose kernel is the value of the relevant reference value for
that flow object.
If no flow object is
found, the value of the default: argument is returned, which
shall be a generated-object.
| This procedure might be used in the default: argument
for the first-area-reference-value procedure. |
|
all-area-reference-values does a pre-order traversal of the
flow object tree searching for all eligible flow objects
that produce an area that is, or is contained in, one of the areas in
the associated-area list; it returns a
generated-object whose kernel is a list containing the value of the
relevant reference value for each such eligible flow object in the order
in which it was found. If unique: is not #f, then duplicate
(in the sense of equal?) values shall be discarded.