Dec 072017
C Source to a color selection program. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
CXLCOLOR.C | 4975 | 1472 | deflated |
GCOLOR.C | 5252 | 1526 | deflated |
GCOLOR.EXE | 7908 | 5025 | deflated |
GETCOLOR.DOC | 2631 | 1139 | deflated |
Download File GETCOLOR.ZIP Here
Contents of the GETCOLOR.DOC file
Tuesday, 24 October
GETCOLOR.DOC
This is the documentation file for the routine get_color(). This subroutine
will pop up a window on the screen and allow the user to cursor around a
selection box and select a color, similar to the customization routines
available on many programs including Turbo C and Qmodem.
The source for get_color() is included in the file "GCOLOR.C". GCOLOR.C
contains a simple main() module to demonstrate the usage of get_color().
Although get_color() was written specifically for Turbo C 2.0, only minor
modifications will be necessary to use the source with other compilers. Note
that get_color() calls several other functions which are included in GCOLOR.C,
including base_scrn(), draw_box(), _VideoInt(), hide_cursor(), save_cursor(),
and restore_cursor().
I am releasing the source for get_color() under the CREDITWARE program. That
means you can use it/abuse it/modify it all you want, just give me credit for
the original source.......
Elliott W. Jackson
P.O. Box 846
Oxford, KS 67119
===============================================================================
NAME
get_color
PURPOSE
Use get_color() to pop up a menu on the screen and allow the user to select
a color. Useful for color customization routines.
SYNTAX
void get_color(int *color, int backcolor, int top, int left);
int *color;pointer to color attribute
int backcolor;color to use for the background of the pop-up menu
int top;screen coordinate for top line of pop-up menu
int left;screen coordinate for left edge of pop-up menu
EXAMPLE CALL
get_color(&color, GREEN, 3, 10);
INCLUDES
#include
DESCRIPTION
The get_color() routine will pop up a screen menu and allow the user to
move around a box using the cursor keys and select a color. The menu will
be popped up with its upper left corner at the coordinates specified by the
'top' and 'left' input parameters. The color of the edge of the menu is
controlled by the 'backcolor' parameter. A pointer to the current attribute
should be passed to get_color() using the '*color' pointer.
The user terminates the function by hitting 'Enter' or 'Escape'. If 'Enter'
is selected '*color' will point to the new attribute, and if 'Escape' is
selected the attribute pointed to by '*color' will remain unchanged.
RETURNS
None. The current and new color attributes are passed to and from
get_color() by the '*color' parameter.
===============================================================================
GETCOLOR.DOC
This is the documentation file for the routine get_color(). This subroutine
will pop up a window on the screen and allow the user to cursor around a
selection box and select a color, similar to the customization routines
available on many programs including Turbo C and Qmodem.
The source for get_color() is included in the file "GCOLOR.C". GCOLOR.C
contains a simple main() module to demonstrate the usage of get_color().
Although get_color() was written specifically for Turbo C 2.0, only minor
modifications will be necessary to use the source with other compilers. Note
that get_color() calls several other functions which are included in GCOLOR.C,
including base_scrn(), draw_box(), _VideoInt(), hide_cursor(), save_cursor(),
and restore_cursor().
I am releasing the source for get_color() under the CREDITWARE program. That
means you can use it/abuse it/modify it all you want, just give me credit for
the original source....
Elliott W. Jackson
P.O. Box 846
Oxford, KS 67119
===============================================================================
NAME
get_color
PURPOSE
Use get_color() to pop up a menu on the screen and allow the user to select
a color. Useful for color customization routines.
SYNTAX
void get_color(int *color, int backcolor, int top, int left);
int *color;pointer to color attribute
int backcolor;color to use for the background of the pop-up menu
int top;screen coordinate for top line of pop-up menu
int left;screen coordinate for left edge of pop-up menu
EXAMPLE CALL
get_color(&color, GREEN, 3, 10);
INCLUDES
#include
DESCRIPTION
The get_color() routine will pop up a screen menu and allow the user to
move around a box using the cursor keys and select a color. The menu will
be popped up with its upper left corner at the coordinates specified by the
'top' and 'left' input parameters. The color of the edge of the menu is
controlled by the 'backcolor' parameter. A pointer to the current attribute
should be passed to get_color() using the '*color' pointer.
The user terminates the function by hitting 'Enter' or 'Escape'. If 'Enter'
is selected '*color' will point to the new attribute, and if 'Escape' is
selected the attribute pointed to by '*color' will remain unchanged.
RETURNS
None. The current and new color attributes are passed to and from
get_color() by the '*color' parameter.
===============================================================================
December 7, 2017
Add comments