HC_Style_Segment
-
Key
HC_Style_Segment(char const *style) - Key HC_Style_Segment(char const style)
“Styles” the currently open segment to be drawn in the style of the referenced ones.
Inserts a request into the currently open segment that whenever this segment is displayed, the referenced segment(s) should be searched for and their opinions about attribute settings used. In other words, this segment should be displayed in the style of the referenced segment.
The most common use of “styling” is when you want to change something in a large or arbitrary number of places without having to go to, or refer to, all those places.
By convention, style segments should have no life of their own - they should have no drawing primitives inside. Also by convention, Stylee’s live in the “Style Library” segment tree - their full names should begin with “?Style Library/…”. There is no reason for this, though, besides aesthetics.
The attribute inheritance rules are as follows:
\li If the current segment has an opinion about an attribute, the style's opinion about it is ignored. \li Otherwise, the style's opinion, if any, is used. \li If the style has subsegments or includee's, they have no effect on the requester. \li If there are several styles to be applied to the current segment, they have equal precedence. If they conflict about
their attributes, the results are random.
- If the style itself is styled, the net opinion to be applied to the current segment is figured first.
This should be compared with Include_Segment() , which adds to but does not change the current segment in any way.
The referenced segment (the segment that’s to be used as a style) doesn’t need to have anything in it, but it must at least exist at the time Style_Segment() is called.
“Driver”, “Streaming Mode”, and “Metafile” attributes are not subject to being done as a Style.
HC_Copy_Segment, HC_Include_Segment, HC_Conditional_StyleParameters
style: Name, possibly including wildcards, of other segment(s).