Brief Index      Full Index      I.M. Reference

Style_Segment


Functions

void Style_Segment (const char *style)
HC_KEY KStyle_Segment (const char *style)
void Style_Segment_By_Key (HC_KEY seg_key)
HC_KEY KStyle_Segment_By_Key (HC_KEY seg_key)
void Conditional_Style (const char *style, const char *conditions)
HC_KEY KConditional_Style (const char *style, const char *conditions)
void Conditional_Style_By_Key (HC_KEY seg_key, const char *conditions)
HC_KEY KConditional_Style_By_Key (HC_KEY seg_key, const char *conditions)

Function Documentation

void Style_Segment ( const char *  style  ) 

"Styles" the currently open segment to be drawn in the style of the referenced ones.

Parameters:
style - Name, possibly including wildcards, of other segment(s).

DETAILS

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:

If the current segment has an opinion about an attribute, the style's opinion about it is ignored. Otherwise, the style's opinion, if any, is used. If the style has subsegments or includee's, they have no effect on the requester. 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.

NOTES

"Driver", "Streaming Mode", and "Metafile" attributes are not subject to being done as a Style.

RESTRICTIONS

See also:
Copy_Segment, Include_Segment, Conditional_Style

HC_KEY KStyle_Segment ( const char *  style  ) 

Similar to Style_Segment(), but returns an HC_KEY to the style.

Parameters:
style - Name, possibly including wildcards, of other segment(s).
Returns:
A new key for the segment as styled, as opposed to its original segment key.

DETAILS

No additional details. See Style_Segment()

void Style_Segment_By_Key ( HC_KEY  seg_key  ) 

Similar to Style_Segment(), but operates on an style referenced by an HC_KEY.

Parameters:
seg_key - A key to the segment whose style you want to reference.

DETAILS

No additional details. See Style_Segment()

HC_KEY KStyle_Segment_By_Key ( HC_KEY  seg_key  ) 

Similar to KStyle_Segment(), but returns the style reference key.

Parameters:
seg_key - A key to the segment whose style to want to reference.
Returns:
A key for the segment as styled, as opposed to its original segment key.

DETAILS

No additional details. See Style_Segment()

void Conditional_Style ( const char *  style,
const char *  conditions 
)

Similar to Style_Segment(), but uses a list of conditions that must be satisfied in order for the inclusion to apply.

Parameters:
style - Pathname to extra segment(s) to be styled when displaying the current segment.
conditions - The conditions that are associated with a particular conditional style and that are valid input to Set_Conditions().

DETAILS

The Conditional variant of Style_Segment allows the user to register, during the styling, one or a series of conditions that must match with the conditions set on the containing segment ( see Set_Conditions() ) in order for the styling to apply. The conditions are user-defined and have no internal meaning to HOOPS other than as elements that can be compared. Conditions are inherited down the tree like other regular attributes and are resolved at draw time when inheritance is fully resolved.

See also:
Show_Conditional_Style, Set_Condtions, Show_Conditions

HC_KEY KConditional_Style ( const char *  style,
const char *  conditions 
)

Similar to Conditional_Style(), but returns a key to the styled segment.

Parameters:
style - Pathname to extra segment(s) to be styled when displaying the current segment.
conditions - The conditions that are associated with a particular conditional style and that are valid input to Set_Conditions().
Returns:
style_key New key for the segment as conditionally styled, as opposed to its original key.

DETAILS

No additional details. See Conditional_Style()

void Conditional_Style_By_Key ( HC_KEY  seg_key,
const char *  conditions 
)

Similar to Conditional_Style(), but accepts a key rather than a pathname to identify the segment to be styled.

Parameters:
seg_key - Segment key to extra segment(s) to be styled when displaying the current segment.
conditions - The conditions that are associated with a particular conditional style and that are valid input to Set_Conditions().

DETAILS

No additional details. See Conditional_Style()

HC_KEY KConditional_Style_By_Key ( HC_KEY  seg_key,
const char *  conditions 
)

Similar to Conditional_Style(), but accepts a key rather than a pathname to identify the segment to be styled.

Parameters:
seg_key - Segment key to extra segment(s) to be styled when displaying the current segment.
conditions - The conditions that are associated with a particular conditional style and that are valid input to Set_Conditions().
Returns:
style_key New key for the segment as conditionally styled, as opposed to its original key.

DETAILS

No additional details. See Conditional_Style()

Main Index
Brief Index      Full Index      I.M. Functions