home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_GEN / DOS_GUI.ZIP / HELPFILE < prev    next >
Text File  |  1994-01-11  |  31KB  |  1,212 lines

  1. 1212
  2. $Topic,Contents
  3.  
  4.  
  5.  
  6.                  ^Help on Help^
  7.                  ^Graphics Library's Capabilities^
  8.                  ^Text Mode Functions^
  9.                  ^Graphics Mode Functions^
  10.                  ^Mouse Functions^
  11.                  ^Entry Fields^
  12.                  ^Pull Down  Menu^
  13.                  ^Button Functions^
  14.                  ^Percent Bar Display^
  15.                  ^Scroll Bar^
  16.                  ^Window Functions^
  17.                  ^Miscellaneous Functions^
  18.                  ^How to Order Source Code^
  19.                       
  20.  
  21.  
  22.  
  23.  
  24. $Topic,Help On Help
  25.  
  26. To activate HELP press the F1 Key or use the pull down
  27. menu.
  28.  
  29. The Help Screen is organized as a large file separated by 
  30. different Help Topics.  The file may be examined by scrolling
  31. or by selecting related topics; related topics are displayed 
  32. in green. To select a related topic, simply click it with
  33. the mouse or press the TAB key several times until the topic
  34. is selected; then press Enter.
  35.  
  36. Help Buttons :
  37.  
  38.  ^Contents^  : displays the Contents Screen
  39.     Back     : returns to the previous screen up to 300 levels
  40.     Done     : Exit Help
  41.  
  42. Help is activated by a single^Help Function^from the library.
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. $Topic,Help Function
  66.  
  67. void help(char *title,char *helpfile,char *starting_topic)
  68.  
  69. title          : is the displayed title on the help window.
  70. helpfile       : Hyper text help file.
  71. starting_topic : The topic to be shown on the startup screen.
  72.  
  73.  
  74. HELP FILE FORMAT :
  75.  
  76. first line : the number of lines in the help file
  77.  
  78. The rest of the file would be Help topics followed by help
  79. information.
  80.  
  81. Note : Each help topic must be at least 21 lines apart.
  82.  
  83. Anywhere in the help text another help topic may be displayed
  84. by enclosing the topic with\^ character.  The information will
  85. be displayed in green and if clicked on, help function will display 
  86. that topic.  To get back to the original topic, use the BACK button.
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. $Topic,Graphics Library's Capabilities
  109.  
  110.  
  111. The Plain Design GUI library is designed to function in the 
  112. graphics mode while allowing programming using Text mode and
  113. graphics mode functions.  You may easily convert a text mode
  114. program to graphics mode using this library.   
  115.  
  116. When using a text mode function, the screen will be 80 characters 
  117. wide and 30 characters long.  In graphics mode it is 640 * 480
  118. pixels.
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140. $Topic,Text Mode Functions
  141.  
  142.    
  143. In text mode X coordinates are between 0-79  Y coordinates are 0-29
  144. color is in the form of  '0xbf'
  145.                          b=background : from 0 to F
  146.                          f=forground  : from 0 to F
  147.  
  148.  
  149. Functions :
  150.  
  151. **************************************************
  152. *            Draw a filled rectangle             *        
  153. **************************************************
  154. void frect(int x1,int x2,int y1,int y2,int color); 
  155.  
  156.  
  157. **************************************************
  158. *                 Draw a rectangle               *        
  159. **************************************************
  160. void rect(int x1,int x2,int y1,int y2,int color); 
  161.  
  162.  
  163. **************************************************
  164. *          Draw a double line rectangle          *        
  165. **************************************************
  166. void dl_rect(int x1,int x2,int y1,int y2,int color); 
  167.  
  168.  
  169. **************************************************
  170. *          write a character at X,Y              *        
  171. **************************************************
  172. void          writechar (int x,int y,unsigned char c,int color);
  173.  
  174.  
  175. **************************************************
  176. *      write a character in window handle h      *        
  177. **************************************************
  178. void    writecharh(int x,int y,unsigned char c,int color,int h);
  179.  
  180.  
  181. **************************************************
  182. *      write a string starting at X,Y            *        
  183. **************************************************
  184. void          pls       (int x,int y,char *string,int color);
  185.  
  186.  
  187. **************************************************
  188. * write a string starting at X,Y of window h     *        
  189. **************************************************
  190. void    plsh      (int x,int y,char *string,int color,int h);
  191.  
  192.  
  193. **************************************************
  194. *      read a character from location X,Y        *        
  195. **************************************************
  196. unsigned char readchar  (int x,int y);
  197.  
  198.  
  199. **************************************************
  200. *      read color of the character at X,Y        *        
  201. **************************************************
  202. int           readcolor (int x,int y);
  203.  
  204.  
  205. **************************************************
  206. * read a string starting at X,Y and size length  *        
  207. **************************************************
  208. void          readstring(int x,int y,int size,char *string);
  209.  
  210.  
  211. **************************************************
  212. *  change color of the character block           *        
  213. **************************************************
  214. void     chcolor(int x,int y,int xsize,int ysize,int color);
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236. $Topic,Graphics Mode Functions
  237.  
  238.  
  239. Graphics mode functions operate independently from the text mode
  240. screen memory.  When a text mode function is used to write a 
  241. character at location XY ,  that character may be read later by
  242. using the 'readchar' and 'readcolor' functions.  In graphics mode
  243. this is not possible.  
  244. In graphics mode XY coordinates are : 0<=X<=639   0<=Y<=479
  245.  
  246. To convert graphic coordinates to text coordinates :
  247.  
  248.         Xgraphics=Xtext*font_width    Ygraphics=Ytext*font_height
  249.  
  250. Graphics Functions :
  251.                             
  252.                           ^Geometric Shapes^
  253.                           ^Writting Text^
  254.                           ^Saving / Restoring Pixel Blocks^
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278. $Topic,Geometric Shapes
  279.  
  280.  
  281. Note: the functions that start with 'c' do not turn the graphics
  282.       cursor off when drawing.  The equivalent function that does 
  283.       not start with the letter c does turn the cursor off.
  284.  
  285.  
  286. Geometric Functions :
  287.  
  288.  
  289. **************************************************
  290. *      read or draw a pixel int coordinates XY   *        
  291. **************************************************
  292. void          SETPIX(int x,int y,char color);
  293. int           GETPIX(int x,int y);
  294. int           RSETPIX(int,int,int);   /* XOR the color value */
  295.  
  296.  
  297. **************************************************
  298. *                Draw a Line                     *        
  299. **************************************************
  300. void          gr_line (int x1,int y1,int x2,int y2,int color);
  301. void          cgr_line(int x1,int y1,int x2,int y2,int color);
  302.  
  303.  
  304. **************************************************
  305. *  Draw a Line   XOR the color                   *        
  306. **************************************************
  307. void          xor_line (int x1,int y1,int x2,int y2,int color)
  308.  
  309.  
  310. **************************************************
  311. *          Draw a graphics rectangle             *        
  312. **************************************************
  313. void          grect (int x1,int y1,int x2,int y2,int color);
  314. void          cgrect(int x1,int y1,int x2,int y2,int color);
  315.  
  316.  
  317. *********************************************************
  318. * Draw a rectangle with Width 'w' pixels, xor the color * 
  319. *********************************************************
  320. void          xor_rect(int w,int x1,int y1,int x2,int y2,int color)
  321.  
  322.  
  323. **************************************************
  324. *     Draw a graphics filled rectangle           *        
  325. **************************************************
  326. void          gfillrect (int x1,int y1,int x2,int y2,int color);
  327. void          cgfillrect(int x1,int y1,int x2,int y2,int color);
  328.  
  329.  
  330. **************************************************
  331. *  Draw a graphics filled rectangle XOR color    *        
  332. **************************************************
  333. void          xor_frect (int x1,int y1,int x2,int y2,int color)
  334.  
  335.  
  336. **************************************************
  337. *     Draw an ellipse                            *        
  338. **************************************************
  339. void          ELLIPSE(int x,int y,int a,int b,int color);
  340.  
  341.  
  342. **************************************************
  343. * Draw an ellipse cut at x1cut,y1cut,x2cut,y2cut *    
  344. **************************************************
  345. int           PCELLIP(int x,int y,int a,int b,
  346.                       int x1cut,int y1cut,
  347.                       int x2cut,int y2cut,
  348.                       int color);
  349.  
  350. **************************************************
  351. * Same as PCELLIP, but   XOR   the   color       *    
  352. **************************************************
  353. int           RCELLIP(int x,int y,int a,int b,
  354.                       int x1cut,int y1cut,
  355.                       int x2cut,int y2cut,
  356.                       int color);
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.                       
  378.                       
  379.                       
  380.                       
  381.                       
  382.                       
  383. $Topic,Writting Text
  384.  
  385.  
  386. Graphics text functions are similar to Text mode functions, 
  387. except that they do not alter the screen memory ( they cannot
  388. be read back ).  The XY coordinates are the graphics coordinates
  389. while the color value is the same as their TEXT mode equivalent; 
  390.  
  391.  
  392. void  gwritechar(int gx,int gy,unsigned char c      ,int color);
  393. void  gpls      (int gx,int gy,unsigned char *string,int color);
  394. void  cgpls     (int gx,int gy,unsigned char *string,int color);
  395.  
  396. The following functions are the same as above except that the
  397. color value is between 0 and 15.  These functions do not display
  398. a background color for text.
  399.  
  400. void  gwritechar2(int gx,int gy,unsigned char c      ,int color);
  401. void  gpls2      (int gx,int gy,unsigned char *string,int color);
  402.  
  403. The following functions will XOR the color value
  404.  
  405. void  rgwritechar(int gx,int gy,unsigned char c      ,int color);
  406. void  rgpls2     (int gx,int gy,unsigned char *string,int color);
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429. $Topic,Saving / Restoring Pixel Blocks
  430.  
  431. A block of pixels may be saved in memory and restored later. 
  432. This function is used extensively by the pull down menu
  433. function, to restore the background of the menus after it is
  434. deactivated.
  435.  
  436.  
  437. ***************************************************************
  438. *  Save a block of pixels in memory                           *
  439. ***************************************************************
  440.  
  441. int    GET_IMAGE(int x,int y,int xsize,int ysize,char far *m);
  442.  
  443. note : before calling this function, the memory used must be
  444.        allocated using farmalloc.  The size of the required
  445.        memory to be allocated is determined by get_block_size
  446.        function.
  447.  
  448. ***************************************************************
  449. *  return size of the block required for GET_IMAGE function   *
  450. ***************************************************************
  451. long    get_block_size(int x1,int y1,int x2,int y2);
  452.  
  453.  
  454. ***************************************************************
  455. *  Restore a block of pixels previously saved by GET_IMAGE    *
  456. ***************************************************************
  457. void     RESTORE_IMAGE(char far *m,int x1,int y1);
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482. $Topic,Mouse Functions
  483.  
  484.  
  485. When initdisplay is called, the mouse is initialized.  The mouse
  486. routines in this library work by polling;  they are not interupt
  487. driven.  If in a loop area the mouse stops operating, add the 
  488. line gcurs(MOVE);  to the loop.  This function will take care of
  489. all mouse movements.
  490.  
  491.  
  492.  
  493. *****************************************************************
  494. * read the location of the mouse : values are for graphics mode *
  495. * to convert to text divide by font_width and font_height vars  *
  496. *****************************************************************
  497. void get_ml(int *x,int *y);
  498.  
  499.  
  500. **********************************************************
  501. * returns YES or NO for the status of the mouse left key *
  502. **********************************************************
  503. int mouse_left_pressed(void);
  504.  
  505.  
  506. **********************************************************
  507. * this function sets variables ms and dc for the status  *
  508. * ms can be any values:PRESSED,RELEASED,PRESSEDRELEASED  *
  509. * dc can be any of above values, but it could also       *
  510. * become DOUBLECLICKED                                   *
  511. **********************************************************
  512. int mouse_state(void);
  513.  
  514. **********************************************************
  515. *                  Show mosue cursor                     *
  516. **********************************************************
  517. void          show_mouse_cursor(void);
  518.  
  519.  
  520. **********************************************************
  521. *                  hide mosue cursor                     *
  522. **********************************************************
  523. void          hide_mouse_cursor(void);
  524.  
  525.  
  526. **********************************************************
  527. *  limit mouse movement                                  *
  528. **********************************************************
  529. void          limit_mouse(int x1,int y1,int x2,int y2);
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551. $Topic,Entry Fields
  552.  
  553.  
  554. Entry fields may be a text field or a binary field.  To
  555. edit a field, a field structure must be created first 
  556. and passed to the field functions.
  557.  
  558.  
  559. ******************************************************************
  560. *                       TEXT      FIELD                          *
  561. ******************************************************************
  562. int text_field(struct xfield *,int action);
  563.  
  564.        action : INIT       /* initialize and display */
  565.                 -2         /* edit                   */
  566.  
  567. struct xfield          
  568.   int  type;               /* type of the field                 */
  569.                            /* can be F_TEXT,F_DATE,F_TIME,F_TEL */  
  570.   int  x;                  /* field's X coordinate              */
  571.   int  y;                  /* field's Y coordinate              */
  572.   int  length;             /* field length                      */
  573.   char title[20];          /* title of the field                */
  574.   char f[80];              /* field content                     */
  575.   int  fcolor;             /* field color                       */
  576.   int  tcolor;             /* title color                       */
  577.   int  xstart;             /* default x location for the cursor */
  578. };
  579.  
  580.  
  581. ******************************************************************
  582. *                       BINARY    FIELD                          *
  583. ******************************************************************
  584. int  binary_field(&bfield,action,int h);
  585.  
  586.        action : INIT       /* initialize and display */
  587.                 -2         /* edit                   */
  588.  
  589.        h      : window handle or -1 for no window                     
  590.  
  591.  
  592. struct bfield
  593. {
  594.   int  x;                  /* x coordinate of the field         */
  595.   int  y;                  /* y coordinate of the field         */
  596.   char title[54];          /* title of the field                */
  597.   int  fcolor;             /* color of the field it selft       */
  598.   int  tcolor;             /* color of the title of the field   */
  599.   int  content;            /* set to yes or no                  */
  600. };
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627. $Topic,Pull Down  Menu
  628.  
  629.  
  630. This library provides a very powerful pull down menu function.
  631. Pull Down Menus are implemented by a single function bar_menu.
  632. The pull down menu has a default behavior which may modified by
  633. calling the^Pull Down Menu Functions^.  For simplicity use the
  634. default parameters first.
  635.  
  636. The bar_menu function acts as a getkey function until the pull
  637. down menu is invoked.
  638.  
  639. To add a pull down menu to your program you must first creat a 
  640. menu descriptor file; a menu descriptor defines the pull down's
  641. titles and entries.  To place a menu title in the pull down menu
  642. you must add the following line:
  643.  
  644. "%Pull Down Title" id acc
  645.  
  646.         . Note that the title string starts with %
  647.         . id  is the value returned when the menu is activated
  648.         . acc is a key code for an accelerator key for the menu
  649.           for example if the title is for exit, you might want
  650.           ALTX to also activate exit without having to use the
  651.           menu, then acc should be the value for ALTX which is
  652.           301
  653.           
  654. To add entries under a title you must add lines as follows:
  655. "Entry 1" id1 acc1
  656. "Entry 2" id2 acc2
  657.  ....
  658.  
  659. When a title has entries associated to it, its id value is
  660. ignored, but the acc value will turn on the pull down menu
  661. starting with that title.
  662.  
  663. Entry ids are the values returned when a menu entry is activated.
  664. When bar_menu senses an accelerator, it will automatically return
  665. the id associated to that accelerator without invoking the pull 
  666. down menu.  
  667.  
  668. Note : accelerators are optional and may be omitted.
  669.  
  670. To add a line between two entries simply add the word LINE as
  671. follows :
  672.  
  673. "Entry 1" id1 acc1
  674. LINE
  675. "Entry 2" id2 acc2
  676.  
  677. To add a submenu under an entry do as follows :
  678.  
  679. "Entry 1" id1 acc1
  680. SUBMENU
  681.   "SubEntry1" subid1 subacc1
  682.   "SubEntry2" subid2 subacc2
  683. END
  684. "Entry 2" id2 acc2
  685.  
  686.  
  687. There is no limit to how many levels of submenus you may add in
  688. the menu descriptor file.
  689.  
  690.  
  691.  
  692.  
  693. To add the pull down menu to a program do as follows :
  694.  
  695.  
  696. bar_menu(INIT);
  697.  
  698. while(1)
  699. {
  700.   message=bar_menu(KEY_RETURN);
  701.  
  702.  
  703. }
  704.  
  705. The bar_menu function by default looks for a descriptor file 
  706. "MENUFILE".  To change the menu file name use 
  707.  
  708.   void          ch_menu_filename(char *newfilename);
  709.  
  710.  
  711.  
  712. After you are satisfied with the Pull Down Menu you have created, 
  713. you can compile the menufile in your program by using the 
  714. CT_VAR.EXE program.  This program reads the menufile and creates
  715. a header file which can be included in your program.  To make
  716. the bar_menu function look at the header file instead of a text
  717. file add the following function before initializing the bar_menu
  718. function.
  719.  
  720. set_menu_descriptor(VARIABLE,menu_var,num_of_lines);
  721.  
  722. CT_VAR names the menu variables as menu_var and num_of_lines; you
  723. may change those variable names, but make sure to change the
  724. names in the above function call also.
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747. $Topic,Pull Down Menu Functions
  748.  
  749. ------------------------------------------------------------------
  750. int bar_menu(int action);
  751. ------------------------------------------------------------------
  752.  
  753. The main entry to the drop down menu function.  When action=INIT, 
  754. the menu is initialized; when action=DISPLAY, the bar_menu will 
  755. display the menu titles on the screen; when action=KEY_RETURN, the 
  756. bar_menu function is in operational state.  It will return EOF if
  757. no operation had taken place.
  758.  
  759. RETURNS :    Keyborard code, or menu definition number when 
  760.                 selected EOF when there is no keyboard action.
  761. ------------------------------------------------------------------
  762. NOTE :  the following functions change the attributes of the 
  763.         colors used for the menu.  All background function
  764.         which start with bg_ can use the following background 
  765.         color values :
  766.  
  767.  
  768.         BG_BLACK           0x00
  769.         BG_BLUE            0x10
  770.         BG_GREEN           0x20
  771.         BG_CYAN            0x30
  772.         BG_RED             0x40
  773.         BG_MAGENTA         0x50
  774.         BG_BROWN           0x60
  775.         BG_WHITE           0x70
  776.  
  777.         All the forground function which start with fg_ can use 
  778.         the following forground color values :
  779.  
  780.  
  781.         FG_BLACK           0x00
  782.         FG_BLUE            0x01
  783.         FG_GREEN           0x02
  784.         FG_CYAN            0x03
  785.         FG_RED             0x04
  786.         FG_MAGENTA         0x05
  787.         FG_BROWN           0x06
  788.         FG_WHITE           0x07
  789.         FG_GRAY            0x08
  790.         FG_LIGHT_BLUE      0x09
  791.         FG_LIGHT_GREEN     0x0A
  792.         FG_LIGHT_CYAN      0x0B
  793.         FG_LIGHT_RED       0x0C
  794.         FG_LIGHT_MAGENTA   0x0D
  795.         FG_LIGHT_YELLOW    0x0E
  796.         FG_BRIGHT_WHITE    0x0F
  797. ------------------------------------------------------------------
  798. void bg_menu_color(int color);
  799. ------------------------------------------------------------------
  800.  
  801. This function changes the background color of the menu rectangle 
  802. and text.
  803.  
  804. RETURNS : NONE
  805. ------------------------------------------------------------------
  806. void fg_menu_color(int color);
  807. ------------------------------------------------------------------
  808.  
  809. This function changes the forground color of the menu rectangle 
  810. and text.
  811.  
  812. RETURNS : NONE
  813. ------------------------------------------------------------------
  814. void bg_menu_hotkey_color(int color)
  815. ------------------------------------------------------------------
  816.  
  817. This function changes the background color of the menu hotkey 
  818. letter.
  819.  
  820. RETURNS : NONE
  821. ------------------------------------------------------------------
  822. void fg_menu_hotkey_color(int color)
  823. ------------------------------------------------------------------
  824.  
  825. This function changes the forground color of the menu hotkey 
  826. letter.
  827.  
  828. RETURNS : NONE
  829. ------------------------------------------------------------------
  830. void bg_menu_sel_color(int color)
  831. ------------------------------------------------------------------
  832.  
  833. This function changes the background color of the highlighted menu.
  834.  
  835. RETURNS : NONE
  836. ------------------------------------------------------------------
  837. void fg_menu_sel_color(int color)
  838. ------------------------------------------------------------------
  839.  
  840. This function changes the forground color of the highlighted menu.
  841.  
  842. RETURNS : NONE
  843. ------------------------------------------------------------------
  844. void bg_menu_shadow(int color)
  845. ------------------------------------------------------------------
  846.  
  847. This function changes the background color of shadow trailing the 
  848. menu rectangle.
  849.  
  850. RETURNS : NONE
  851. ------------------------------------------------------------------
  852. void fg_menu_shadow(int color)
  853. ------------------------------------------------------------------
  854.  
  855. This function changes the forground color of shadow trailing the 
  856. menu rectangle.
  857.  
  858. RETURNS : NONE
  859. ------------------------------------------------------------------
  860. void ch_menu_x(int x);
  861. ------------------------------------------------------------------
  862. This function will change the x location of the menu bar.  This 
  863. function must be called before, the bar_menu is initialized.  
  864.  
  865. RETURNS : NONE
  866.  
  867. ------------------------------------------------------------------
  868. void ch_menu_xsize(int xsize);
  869. ------------------------------------------------------------------
  870. This function will change the size of the menu bar.  By default 
  871. the menu bar will be extended across the screen.  If a smaller 
  872. menu bar is desired, use this function.  This function must be 
  873. called before, the bar_menu is initialized.
  874.  
  875. RETURNS : NONE
  876.  
  877. ------------------------------------------------------------------
  878. void ch_menu_y(int y);
  879. ------------------------------------------------------------------
  880. This function will change the y location of the bar menu.  This 
  881. function must be called before, the bar_menu is initialized.  
  882.  
  883. RETURNS : NONE
  884.  
  885. ------------------------------------------------------------------
  886. void set_menu_descriptor(int type,char **menu_variable,
  887.                          int num_of_lines );
  888. ------------------------------------------------------------------
  889. This function will allow to select the menu descriptor type, 
  890. between TEXT_FILE and VARIABLE.  By default the type is set to 
  891. TEXT_FILE.  To compile the menu descriptor in the program, run 
  892. CT_VAR.EXE to convert the menu descriptor file to a header file. 
  893. run set_menu_descriptor :
  894.  
  895.              type :  VARIABLE  or  TEXT_FILE
  896.     menu_variable :  pointer to the array of pointers describing 
  897.                      the menu descriptor.  
  898.      num_of_lines :  number of entries in the menu_variable.
  899.  
  900. If this function is being used to sert the descriptor 
  901.  
  902. RETURNS : NONE
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. $Topic,Button Functions
  929.  
  930.  
  931. *******************************************************
  932. * Draw a button at location XY with size xsize, ysize *
  933. *******************************************************
  934. int   draw_button(char *bstring,int x ,int y ,int xsize,int ysize,
  935.                                 int id,int acc);
  936.  
  937.       bstring : string written inside of the button
  938.       x,y     : x,y location of the button in text coordinates
  939.                 to use graphics coordinates 
  940.                 x=1000+xg  where xg is in graphics coordinates
  941.                 y=1000+yg
  942.  
  943.       xsize   : size of the button in graphics coordinates
  944.       ysize
  945.  
  946.       id      : value returned by check_button, when the button
  947.                 is invoked.
  948.  
  949.       acc     : accelerator key code, when key pressed, id is 
  950.                 retured.
  951.  
  952. Returns : button handle
  953.  
  954. *******************************************************
  955. * Disable a button                                    *
  956. *******************************************************
  957. void  disable_button(int h);
  958.  
  959.  
  960.  
  961. *******************************************************
  962. * Disable a button  and paint the background color    *
  963. *******************************************************
  964. void  disable_button2(int h,int color);
  965.  
  966.  
  967.  
  968. ***************************************************************
  969. * Check button activity, If nothing return ch else it returns *
  970. * the button id                                               *
  971. ***************************************************************
  972. int   check_button(int ch);
  973.  
  974.  
  975.  
  976. **********************************************
  977. * deactivate or reactivate displayed buttons *
  978. **********************************************
  979. void  deactivate_activebuttons(void);
  980. void  reactivate_activebuttons(void); 
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004. $Topic,Percent Bar Display
  1005.  
  1006. Displays a bar showing the percentage of  Numerator / Denominator
  1007. This function is useful is showing the progress of an action.
  1008.  
  1009.  
  1010. int  show_percent_bar(
  1011.                        int a,            // numerator
  1012.                        int b,            // denomnator
  1013.                        int x,            // bar x
  1014.                        int y,            // bar y
  1015.                        int xw,           // bar total width
  1016.                        int yw,           // bar total height
  1017.                        int border_color, // bar border color
  1018.                        int bar_color,    // filled bar color
  1019.                        int rev_num_color // color of the percent 
  1020.                                             display
  1021.                      )
  1022.  
  1023. The first time this function is called, a must be 0.  At that
  1024. time the function will initialize.
  1025.  
  1026.  
  1027. When done, show_percent_bar must be called again with a=-1
  1028. to release the memory it allocated.
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051. $Topic,Scroll Bar
  1052.  
  1053.  
  1054. The scroll bar function displays an adjustable bar.
  1055. When adjusted, it changes a variable to show the level of
  1056. adjustment that took place.  If the variable is changed
  1057. outside of the scroll bar function, it will readjust to
  1058. show the new level.
  1059.  
  1060.  
  1061. int scr_bar(
  1062.             int action,             // INIT or ACTION
  1063.             int ch,                 // input character 
  1064.             int maxnum,             // maximum number for num
  1065.             int *num,               // current level 0<=num<=maxnum
  1066.             int x1,int y1,int x2,int y2, // scroll bar coordinates
  1067.             int border_color,            // scroll bar border color
  1068.             int bar_color,               // bar color itself
  1069.             int key_sw      // if ==-1 deactivate up,down 
  1070.                             // arrow functionality internal to
  1071.                             // the scroll bar function.
  1072.                             // if 0 it will scroll the bar up and
  1073.                             // down when the arrows are pressed.
  1074.            );
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098. $Topic,Window Functions
  1099.  
  1100.   The window functions of this library work in text mode
  1101.   coordinates.
  1102.  
  1103.  
  1104. **********************************************
  1105. * draw a window while saving the background  *
  1106. **********************************************
  1107. wh=messagebox( 
  1108.                int x,int y,int xsize,int ysize, // coordinates
  1109.                int color,                       // window color
  1110.                int shadow,                      // window shadow
  1111.                int border             // window border YES or NO
  1112.              );
  1113.  
  1114.  
  1115. Returns : the window handle
  1116.  
  1117.  
  1118. **********************************************
  1119. * Remove a window                            *
  1120. **********************************************
  1121. void   destroy_messagebox(int wh);
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144. $Topic,Miscellaneous Functions
  1145.  
  1146.  
  1147. ******************************************************
  1148. * delay in milli second                              *
  1149. ******************************************************
  1150. void          delay_func(int milli);
  1151.  
  1152.  
  1153.  
  1154. ******************************************************
  1155. *   Return the key pressed, EOF when no action       *
  1156. ******************************************************
  1157. int           getkey(void);
  1158.  
  1159.  
  1160.  
  1161. ******************************************************
  1162. * Returns YES when alt key is pressed                *
  1163. ******************************************************
  1164. int           alt_pressed(void);
  1165.  
  1166.  
  1167. ******************************************************
  1168. *   Set the video mode                               *
  1169. ******************************************************
  1170. int           set_video_mode(int);
  1171.  
  1172.  
  1173. ******************************************************
  1174. * Get the video mode                                 *
  1175. ******************************************************
  1176. int           get_video_mode(void);
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195. $Topic,How to Order Source Code
  1196.  
  1197.  
  1198. Library Source Code for the GUI library is available for 
  1199. $29.00 + $5.00 S/H in US International orders add $10.00 S/H
  1200.  
  1201.  
  1202. Send Check or Money Order Only  to :
  1203.  
  1204.  
  1205.                          Plain Design Inc.
  1206.                          P.O. Box 135
  1207.                          Midland Park, NJ 07432
  1208.  
  1209.  
  1210. Please indicate the floppy size.
  1211.