[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _gtSetColorStr()
 Change the CA-Clipper color attributes setting
------------------------------------------------------------------------------
 C Prototype

     #include "gt.api"
     ERRCODE _gtSetColorStr(
                             BYTEP fpColorString
                           )

 Arguments

     fpColorString is a null-terminated character string containing a
     list of color attribute settings.  The following table shows each color
     setting with its scope:

     Color Settings
     ------------------------------------------------------------------------
     Setting        Scope
     ------------------------------------------------------------------------
     Standard       All screen output commands and functions
     Enhanced       GETs and selection highlights
     Border         Border around screen, not supported on EGA and VGA
     Background     Not supported
     Unselected     Unselected GETs
     ------------------------------------------------------------------------

     The order of the settings in the table is the order in which they must
     be specified in fpColorString.  Each setting is a foreground and
     background color separated by a slash (/) character and followed by a
     comma.

     All settings are optional.  If a setting is skipped, its previous value
     is retained with only new values set.  Settings may be skipped within
     the list or left off the end as illustrated in the example below.

 Returns

     _gtSetColorStr() returns zero if successful.  Any other value indicates
     an error.

 Description

     _gtSetColorStr() changes the current CA-Clipper color attributes to
     those specified in fpColorString.  Before using this function, you may
     want to save the current color setting with _gtGetColorStr() so that you
     can restore the prior color setting.

     fpColorString is made up of several color settings, each color
     corresponding to a different region of the screen.  As stated above,
     each setting is made up of a foreground and background color pair.
     Foreground defines the color of characters displayed on the screen.
     Background defines the color displayed behind the character.  Spaces and
     nondisplayable characters display as background only.

     Standard: The standard setting governs all console, full-screen, and
     interface commands and functions when displaying to the screen.  This
     includes commands such as @...PROMPT, @...SAY, and ?, and functions such
     as ACHOICE(), DBEDIT(), and MEMOEDIT().

     Enhanced: The enhanced setting governs highlighted displays.  This
     includes GETs with INTENSITY ON, and the MENU TO, DBEDIT(), and
     ACHOICE() selection highlights.

     Border: The border is an area around the outside of the screen to
     which you cannot write.

     Background: The background is not supported at this time.

     Unselected: The unselected setting indicates that a GET no longer
     has input focus.  The current GET (the GET with input focus) is
     displayed in the enhanced color while all other GETs are displayed in
     the unselected color.

     In addition to colors, foreground settings can have high intensity
     and/or blinking attributes.  With a monochrome display, high intensity
     enhances brightness of painted text.  With a color display, high
     intensity changes the hue of the specified color.  For example, "N"
     displays foreground text as black where "N+" displays the same text as
     gray.  High intensity is denoted by "+".

     The blinking attribute (controlled by _gtSetBlink()) causes the
     foreground text to flash on and off at rapid intervals.  Blinking is
     denoted with "*".  The attribute character can occur anywhere in the
     setting string but is always applied to the foreground color regardless
     of where it occurs.

     The following colors are supported:

     List of Colors
     ------------------------------------------------------------------------
     Color          Letter    Monochrome
     ------------------------------------------------------------------------
     Black          N, Space  Black
     Blue           B         Underline
     Green          G         White
     Cyan           BG        White
     Red            R         White
     Magenta        RB        White
     Brown          GR        White
     White          W         White
     Gray           N+        White
     Bright Blue    B+        Bright Underline
     Bright Green   G+        Bright White
     Bright Cyan    BG+       Bright White
     Bright Red     R+        Bright White
     Bright Magenta RB+       Bright White
     Yellow         GR+       Bright White
     Bright White   W+        Bright White
     Black          U         Underline
     Inverse Video  I         Inverse Video
     Blank          X         Blank
     ------------------------------------------------------------------------

 Examples

     .  These two examples demonstrate specifying _gtSetColorStr()
        with missing settings:

        #include "gt.api"
        .
        .
        .
           // Settings left off the end
           _gtSetColorStr( "W/N, BG+/B" );
           //
           // Settings skipped within the list
           _gtSetColorStr("W/N, BG+/B,,,W/N");
        .
        .
        .

 Files  Library is CLIPPER.LIB, header file is Gt.api.


See Also: _gtColorSelect() _gtGetColorStr() _gtSetBlink()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson