home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / code / bcpp / file10 / utility.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-19  |  6.8 KB  |  234 lines

  1. /**********************************************************************\
  2. *                                                                      *
  3. *  utility.c -- Information about snapshot, clip and convert           *
  4. *                                                                      *
  5. \**********************************************************************/
  6.  
  7. #include "defs.h"
  8.  
  9. /**********************************************************************\
  10. *                                                                      *
  11. *  about_clip -- information about the CLIP utility                    *
  12. *                                                                      *
  13. \**********************************************************************/
  14.  
  15. int about_clip()
  16. {
  17.    static char *string[] = {
  18.    "About CLIP",
  19.    "CLIP is a utility program that you can",
  20.    "use to reduce the size of a pixel run file."
  21.    };
  22.  
  23.    /* clear the screen and display the info window */
  24.  
  25.    fg_mousevis(OFF);
  26.    fg_restore(0,xlimit,menu_bottom,ylimit);
  27.    info_window(136,504,60,string,3);
  28.  
  29.    /* wait for a keystroke or mouse button */
  30.  
  31.    fg_mousevis(ON);
  32.    wait_for_keystroke();
  33.  
  34.    /* restore the screen and return to the menu */
  35.  
  36.    fg_mousevis(OFF);
  37.    fg_restore(0,xlimit,menu_bottom,ylimit);
  38.  
  39.    fg_mousevis(ON);
  40.    redraw = TRUE;
  41.  
  42.    return(OK);
  43. }
  44.  
  45. /**********************************************************************\
  46. *                                                                      *
  47. *  about_convert -- information about the CONVERT utility              *
  48. *                                                                      *
  49. \**********************************************************************/
  50.  
  51. int about_convert()
  52. {
  53.    static char *string[] = {
  54.    "About CONVERT",
  55.    "CONVERT is a utility program that you can use to",
  56.    "translate pixel run files between standard format",
  57.    "and packed format.  If an image contains 16 or",
  58.    "fewer colors, you can pack it and save disk space."
  59.    };
  60.  
  61.    fg_mousevis(OFF);
  62.    /* clear the screen and display the info window */
  63.  
  64.    fg_restore(0,xlimit,menu_bottom,ylimit);
  65.    info_window(120,520,60,string,5);
  66.  
  67.    /* wait for a keystroke or mouse button */
  68.  
  69.    fg_mousevis(ON);
  70.    wait_for_keystroke();
  71.  
  72.    /* restore the screen and return to the menu */
  73.  
  74.    fg_mousevis(OFF);
  75.    fg_restore(0,xlimit,menu_bottom,ylimit);
  76.  
  77.    fg_mousevis(ON);
  78.    redraw = TRUE;
  79.  
  80.    return(OK);
  81. }
  82.  
  83. /**********************************************************************\
  84. *                                                                      *
  85. *  about_editspr -- information about the EDITSPR utility              *
  86. *                                                                      *
  87. \**********************************************************************/
  88.  
  89. int about_editspr()
  90. {
  91.    static char *string[] = {
  92.    "About EDITSPR",
  93.    "The EDITSPR utility changes all pixel runs of",
  94.    "one color to another color for an image stored in",
  95.    "Fastgraph's standard pixel run (SPR) format.  It",
  96.    "also combines adjacent pixel runs of like colors."
  97.    };
  98.  
  99.    /* clear the screen and display the info window */
  100.  
  101.    fg_mousevis(OFF);
  102.    fg_restore(0,xlimit,menu_bottom,ylimit);
  103.    info_window(120,520,60,string,5);
  104.  
  105.    /* wait for a keystroke or mouse button */
  106.  
  107.    fg_mousevis(ON);
  108.    wait_for_keystroke();
  109.  
  110.    /* restore the screen and return to the menu */
  111.  
  112.    fg_mousevis(OFF);
  113.    fg_restore(0,xlimit,menu_bottom,ylimit);
  114.  
  115.    fg_mousevis(ON);
  116.    redraw = TRUE;
  117.  
  118.    return(OK);
  119. }
  120.  
  121. /**********************************************************************\
  122. *                                                                      *
  123. *  about_grabrgb -- information about the GrabRGB utility              *
  124. *                                                                      *
  125. \**********************************************************************/
  126.  
  127. int about_grabrgb()
  128. {
  129.    static char *string[] = {
  130.    "About GrabRGB",
  131.    "GrabRGB is a TSR to capture color information",
  132.    "in 256-color graphics modes.  You can use",
  133.    "GrabRGB with SNAPSHOT to preserve the original",
  134.    "colors of a captured image."
  135.    };
  136.  
  137.    /* clear the screen and display the info window */
  138.  
  139.    fg_mousevis(OFF);
  140.    fg_restore(0,xlimit,menu_bottom,ylimit);
  141.    info_window(120,520,60,string,5);
  142.  
  143.    /* wait for a keystroke or mouse button */
  144.  
  145.    fg_mousevis(ON);
  146.    wait_for_keystroke();
  147.  
  148.    /* restore the screen and return to the menu */
  149.  
  150.    fg_mousevis(OFF);
  151.    fg_restore(0,xlimit,menu_bottom,ylimit);
  152.  
  153.    fg_mousevis(ON);
  154.    redraw = TRUE;
  155.  
  156.    return(OK);
  157. }
  158.  
  159. /**********************************************************************\
  160. *                                                                      *
  161. *  about_hercfix -- information about the HERCFIX utility              *
  162. *                                                                      *
  163. \**********************************************************************/
  164.  
  165. int about_hercfix()
  166. {
  167.    static char *string[] = {
  168.    "About HERCFIX",
  169.    "The HERCFIX utility lets you use SNAPSHOT with",
  170.    "programs that do not update the BIOS data area",
  171.    "when establishing the Hercules graphics mode."
  172.    };
  173.  
  174.    /* clear the screen and display the info window */
  175.  
  176.    fg_mousevis(OFF);
  177.    fg_restore(0,xlimit,menu_bottom,ylimit);
  178.    info_window(120,520,60,string,4);
  179.  
  180.    /* wait for a keystroke or mouse button */
  181.  
  182.    fg_mousevis(ON);
  183.    wait_for_keystroke();
  184.  
  185.    /* restore the screen and return to the menu */
  186.  
  187.    fg_mousevis(OFF);
  188.    fg_restore(0,xlimit,menu_bottom,ylimit);
  189.  
  190.    fg_mousevis(ON);
  191.    redraw = TRUE;
  192.  
  193.    return(OK);
  194. }
  195.  
  196. /**********************************************************************\
  197. *                                                                      *
  198. *  about_snapshot -- information about the SNAPSHOT utility            *
  199. *                                                                      *
  200. \**********************************************************************/
  201.  
  202. int about_snapshot()
  203. {
  204.    static char *string[] = {
  205.    "About SNAPSHOT",
  206.    "SNAPSHOT is a TSR that you can use to capture",
  207.    "graphic images and store them in pixel run files.",
  208.    "Use your favorite paint program, CAD program, or",
  209.    "any other method to display a graphic image and",
  210.    "then use SNAPSHOT to create a pixel run file."
  211.    };
  212.  
  213.    /* clear the screen and display the info window */
  214.  
  215.    fg_mousevis(OFF);
  216.    fg_restore(0,xlimit,menu_bottom,ylimit);
  217.    info_window(120,520,60,string,6);
  218.  
  219.    /* wait for a keystroke or mouse button */
  220.  
  221.    fg_mousevis(ON);
  222.    wait_for_keystroke();
  223.  
  224.    /* restore the screen and return to the menu */
  225.  
  226.    fg_mousevis(OFF);
  227.    fg_restore(0,xlimit,menu_bottom,ylimit);
  228.  
  229.    fg_mousevis(ON);
  230.    redraw = TRUE;
  231.  
  232.    return(OK);
  233. }
  234.