Brief Index      Full Index      I.M. Reference

Set_Window_Pattern


Functions

void Set_Window_Pattern (const char *pattern)
void UnSet_Window_Pattern (void)
void QSet_Window_Pattern (const char *segment, const char *pattern)
void QUnSet_Window_Pattern (const char *segment)

Function Documentation

void Set_Window_Pattern ( const char *  pattern  ) 

Specifies the patterned texture to use for window backgrounds.

Parameters:
pattern - Special constant or keyword. See details section.

DETAILS

The choices are almost the same as for Set_Face_Pattern(). Legal values for pattern are as follows:

  • "solid" The normal opaque background---the Window is painted uniformly with the color of the current Window Color.
  • "clear" The window background is left clear (unless the window is the outer most HOOPS window). Whatever is underneath the window "shines through". Note: Whenever the clear window has to be erased and redrawn, the underlying window will also have to be erased and redrawn. Also, in the present implementation, this option must be set locally on the window it is to affect---or it will not inherit properly.
  • "invisible" This has the same effect as "clear" with the added behaviour that it does not clear the z-buffer prior to drawing the geometry within the window. This allows geometry within the subwindow to interact with geometry contained in the parent window.
  • "blend" Creates the window background by sampling from the window behind the current one. This is particularly useful when users want an opaque sub-window to blend with a main window that uses a gradient or image background, but do not wish to see geometry from the main window. To acheive this type of blending with solid backgrounds, it is possible to set the sub-window color to that of the main window. The net effect is that the sub-window background seems clear, while the geometry in the main window is clipped. The 'blend' option allows a similar effect for variegated backgrouds.
  • "N | S | E | W | NE | NW | SE | SW" Gradient window backgrounds. In essence these options are a direction vector with the window color being the from and window contrast color being the to color. For example, "N" would mean that the bottom of the window will reflect the window color while the top of the window will be the window contrast color. up, down, right, left are synonyms for N, S, E, W.
  • "##" A crosshatch pattern, filling the whole background. The lines will generally be painted with the current Window Contrast Color. The spaces will get the current Window Color.
  • "||" Like the crosshatch pattern, but vertical bars instead.
  • "==" Horizontal bars.
  • "//" Slant-right.
  • "\\" Slant-left.
  • "::" Dotted (square grid).
  • "<><>;" Diamonds.
  • "[] []" Checkerboard.
Set_Window_Pattern() should normally be called on the "?Picture" segment (which is given a Window attribute during system startup), or else in conjunction with setting a Window on a new subsegment. The Window attribute, when attached to a segment, instructs the system to give that segment a particular region of the screen. Whatever Window Pattern attribute is in effect at that point in the segment tree, determines the background pattern of that new window.

Set applies the pattern to the currently open segment; QSet applies it to the named segment(s); UnSet removes any previous value from the currently open segment; and QUnSet removes the value from the named segment(s). On a Set or QSet, any previous value is discarded.

NOTES

The precise spatial frequency of the pattern as it finally appears on the screen (e.g., the particular interval of a "##" pattern), and whether the pattern squeezes, stretches, and rotates itself appropriately as the Window changes size may each depend on the display device.

RESTRICTIONS

The "invisible" pattern is only currently supported in our OpenGL and Direct3D drivers.

See also:
Set_Window, Set_Color, Bring_To_Front, Set_Face_Pattern, Set_Window_Frame, Set_Visibility.

void UnSet_Window_Pattern ( void   ) 

Removes all settings established by a previous call to Set_Window_Pattern().

DETAILS

No additional details. See Set_Window_Pattern()

void QSet_Window_Pattern ( const char *  segment,
const char *  pattern 
)

Similar to Set_Window_Pattern(), but operates on a given segment rather than the currently open one.

Parameters:
segment - Name of the segment(s) to be changed. "?Picture" is often used for this parameter.
pattern - Special constant ("solid", "clear", "##", "||", "==", "//", "\\", "::", "<><>;", "[] []").

DETAILS

No additional details. See Set_Window_Pattern()

void QUnSet_Window_Pattern ( const char *  segment  ) 

Removes all settings established by a previous call Set_Window_Pattern(), but operates on a given segment rather than the currently open one.

Parameters:
segment - Name of the segment(s) to be changed. "?Picture" is often used for this parameter.

DETAILS

No additional details. See Set_Window_Pattern()

Main Index
Brief Index      Full Index      I.M. Functions