12.6.18 Box Flow Object Class
The box flow object may be used to put a box around a sequence of flow objects.  The box flow object is either displayed or inlined depending on the value of the display?: characteristic.  The box flow object has a single principal port.  If the box is displayed, then the port shall accept any displayed flow objects.  If the box is inlined, then the port shall accept any inlined flow objects.
The box flow object may result in more than one area. In this case, the border of the box adjacent to the break may be omitted if the box-open-end?: characteristic is true.
If the box is inlined, then this border shall be perpendicular to the writing-mode.  If the box is displayed, then this border shall be parallel to the writing-mode.
When the box is displayed, the size of the box (that is, the distance between the positions of the borders) in the direction determined by the writing-mode shall be equal to the display-size of the box less the start and end indents.  The display-size for the content of the box shall be equal to the size of the box.

NOTE 97

Thus, the start-indent: and end-indent: characteristics for the content of the box shall be set to give the desired separation between the border of the box and its content.  There is no automatic separation to take account of the thickness of border.
The applicable characteristics are:

•  display?: is a boolean that specifies whether the box shall be displayed rather than inlined. This characteristic is not inherited. The default value is #f.

•  box-type: is one of the following symbols:

•  border specifying that the box shall have a border.

•  background specifying that the box shall have a background.

•  both specifying that the box shall have both a border and a background.

The initial value is border.

•  box-open-end?: is a boolean that specifies whether a broken box shall have an open end. If the value is #t, the ending edge of the area before the line break shall not have the visible border, and the starting edge of the area after the line break shall not have the visible border. If the value is #f, broken box areas shall have the visible borders as usual. The initial value is #f.

•  background-color: is either #f or an object of type color that specifies the color in which the marks for the flow object's background should be made. The initial value is #f. This applies only if the box-type: characteristic does not have the value border.

•  background-layer: is an integer specifying the layer of the marks of the areas resulting from the background of a flow object. The initial value is -1. This applies only if the box-type: characteristic does not have the value border.

•  box-corner-rounded: specifies whether the corners of the box shall be drawn as quarter circles as follows:

•  #f indicating that no corners shall be rounded.

•  #t indicating that all corners shall be rounded.

•  a list of the symbols identifying the individual corners that shall be rounded; each symbol shall be of the form x-y where x and y are before or after; if the box is displayed then x specifies whether the corner is before or after the box in the direction determined by the writing-mode, and y specifies whether the corner is before or after the box in the placement direction of the area's coordinate system; if the box is inlined, then x indicates whether the corner is before or after the box in the escapement direction, and y indicates whether the corner is before or after the box in the line-progression direction.

The initial value is #f.

•  box-corner-radius: is a length-spec specifying the radius of the quarter circles to be used when box-corner-rounded: is not #f.  A negative value indicates that the center of the circle is at the point where the edges intersect; in this case, the corners shall be concave. The initial value is 3pt.

•  box-border-alignment: is a symbol specifying the alignment of the border's line relative to the position of the border, as follows:

•  center specifying that the line shall be centered with respect to the position of the border.

•  outside specifying that the edge of the line that is an outer edge of the box shall be aligned with the position of the border.

•  inside specifying that the edge of the line that is an inner edge of the box shall be aligned with the position of the border.

The initial value is outside.

•  box-size-before: is a length that specifies the distance from the placement path to the edge of the box that is before the placement path in the line-progression direction. This shall apply only if the flow object is inline. The initial value is 8pt.

•  box-size-after: is a length that specifies the distance from the placement path to the edge of the box that is after the placement path in the line-progression direction. This shall apply only if the flow object is inline. The initial value is 4pt.

•  color: is an object of type color that specifies the color in which the flow object's marks should be made. The initial value is the default color in the Device Gray color space. This applies to the box's border.

•  layer: is an integer specifying the layer of the marks of the areas resulting from the flow object.  An area shall be imaged after any area whose layer has a lower value. The initial value is 0. This applies to the box's border.

•  line-cap: is one of the symbols butt, round, or square specifying the cap style for the line. The initial value is butt. This applies to the box's border.

•  line-dash: is a list of one or more lengths that specifies the dash pattern of the line.  The first length specifies the number component of the CurrentDashPattern graphics state variable in ISO/IEC 10180.  The remaining lengths specify the vector component of the CurrentDashPattern graphics state variable. The initial value is a list containing the length 0pt. This applies to the box's border.

•  line-thickness: is a length that specifies the thickness of the line or lines. The initial value is 1pt. This applies to the box's border.

•  line-repeat: is a strictly positive integer that specifies the number of parallel lines to be drawn.  For example, a value of 2 indicates a double line. The initial value is 1. This applies to the box's border.

•  line-sep: is a length that gives the distance between the centers of parallel lines. The initial value is 1pt. This applies to the box's border.

•  line-miter-limit: is a number that specifies the miter limit for line joins. The semantics of the miter limit are described in ISO/IEC 10180. The initial value is 10. This applies to the box's border.

•  line-join: is one of the symbols miter, round, or bevel specifying the join style of the line. The initial value is miter. This applies to the box's border.

•  writing-mode: is one of the symbols left-to-right, right-to-left, or top-to-bottom.  The direction determined by the writing-mode shall be perpendicular to the placement direction.  The initial value is left-to-right. When the box is inline, this determines the placement of flow objects in the box.

•  position-preference: is either #f or one of the symbols top or bottom.  This applies if the flow object is directed into a port on a column-set-sequence flow object that is flowed into both the top-float and bottom-float zones of a column-subset and indicates whether the areas from this flow object may be flowed into only one of the zones. This characteristic is not inherited. The default value is #f.

•  inhibit-line-breaks?: is a boolean specifying whether line breaks shall be inhibited before and after each area produced by this flow object. This applies only to line breaks introduced by the formatter to make lines fit in the available space. The initial value is #f. This applies only if the flow object is inlined.

•  break-before-priority: is an integer that affects whether a break is allowed before this flow object.  The break priority of a potential breakpoint is the maximum of the break-after-priority of the flow object immediately preceding the potential breakpoint and the break-before-priorities of the flow object immediately following the potential breakpoint, and any characters immediately following that character for which the drop-after-line-break?: characteristic is true.  A break shall be allowed at a potential breakpoint only if the break priority is even.  This characteristic is not inherited. The default value is 0. This applies only if the flow object is inlined.

•  break-after-priority: is an integer that affects whether a break is allowed after this flow object as described in the specification of the break-before-priority: characteristic. This characteristic is not inherited. The default value is 0. This applies only if the flow object is inlined.

•  start-indent: is a length-spec specifying the indent for the edge of the area at the start in the direction of the writing-mode. The initial value is 0pt. This applies only if the flow object is displayed.

•  end-indent: is a length-spec specifying the indent for the edge of the area at the end in the direction of the writing-mode. The initial value is 0pt. This applies only if the flow object is displayed.

•  span: is a strictly positive integer specifying the number of columns that the areas resulting from this flow object shall span. This characteristic shall apply if the flow object is directed into a port on a column-set-sequence flow object that is flowed into the top-float, bottom-float, or body-text zone of a spannable column-subset.  The initial value is 1. This applies only if the flow object is displayed.

•  span-weak?: is a boolean specifying whether the areas resulting from this flow object span weakly rather than strongly.  See section 12.6.5.1, Column-set-model.  This characteristic applies if the flow object is directed into a port on a column-set-sequence flow object that is flowed into the top-float, bottom-float, or body-text zone of a spannable column-subset and has a span: characteristic with a value greater than 1.  The initial value is #f. This applies only if the flow object is displayed.

•  space-before: is an object of type display-space specifying space to be inserted before, in the placement direction, the areas produced by the flow object. This characteristic is not inherited. The default is for no space before to be inserted. This applies only if the flow object is displayed.

•  space-after: is an object of type display-space specifying space to be inserted after, in the placement direction, the areas produced by the flow object. This characteristic is not inherited. The default is for no space after to be inserted. This applies only if the flow object is displayed.

•  keep-with-previous?: is a boolean specifying whether the flow object shall be kept in the same area as the previous flow object. This characteristic is not inherited. The default value is #f. This applies only if the flow object is displayed.

•  keep-with-next?: is a boolean specifying whether the flow object shall be kept in the same area as the next flow object.  This characteristic is not inherited. The default value is #f. This applies only if the flow object is displayed.

•  break-before: is #f or one of the symbols page, page-region, column, or column-set specifying that the flow object shall start an area of that type. This characteristic is not inherited. The default is #f. This applies only if the flow object is displayed.

•  break-after: is #f or one of the symbols page, page-region, column, or column-set specifying that the flow object shall end an area of that type. This characteristic is not inherited. The default is #f. This applies only if the flow object is displayed.

•  keep: is one of the following:

•  #t meaning that the areas produced by this flow object shall be kept together within the smallest possible area.

•  the symbol page indicating that the areas produced by the flow object shall lie within the same page; in this case, the flow object shall have an ancestor flow object of class page-sequence.

•  the symbol column-set indicating that the areas produced by the flow object shall lie within the same column set; in this case, the flow object shall have an ancestor of class column-set-sequence.

•  the symbol column indicating that the areas produced by the flow object shall lie within the same column set, and that the first column that each area spans in the column set shall be the same.

•  #f indicating that this characteristic is to be ignored.

This characteristic is not inherited. The default value is #f. This applies only if the flow object is displayed.

•  may-violate-keep-before?: is a boolean which, if true, specifies that constraints imposed by the keep: characteristics of ancestor flow objects on the relative positioning of this flow object and its previous flow object may not be respected. This characteristic is not inherited. The default value is #f. This applies only if the flow object is displayed.

•  may-violate-keep-after?: is a boolean which, if true, specifies that constraints imposed by keep: characteristics of ancestor flow objects on the relative positioning of this flow object and its next flow object may not be respected. This characteristic is not inherited. The default value is #f. This applies only if the flow object is displayed.