home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / GUI100.ZIP / GUI.DOC < prev    next >
Text File  |  1993-10-16  |  9KB  |  326 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.             Graphical User Interface Handler
  11.                  Version  1.00
  12.  
  13.                       by
  14.                   Dan Watling
  15.  
  16. What's in this DOC:
  17. -------------------
  18. INTRODUCTION
  19. PACKAGING LIST
  20. COMMANDS
  21. CONTACTING THE AUTHOR
  22. NEXT VERSION
  23.  
  24.  
  25. INTRODUCTION
  26.  
  27.     The GUI Handler is the result of my efforts to make C/C++ GUI
  28.     routines easier for the graphics programmer. I have used it in 
  29.     my own programs with excellent results.
  30.  
  31.     Graphical User Interface Handler allows the programmer to  
  32.     easily make a simple GUI to complex GUI in a shorter time.
  33.     The complications of having to draw each individual button,
  34.     window, etc. are essentially removed! The GUI Handler is a very
  35.     powerful, yet, very flexible program. 
  36.  
  37. PACKAGING LIST
  38.  
  39.     The current version of GUI Handler consists of the following
  40.     files:
  41.  
  42.       GUI.DOC                           GUI Handler documentation
  43.       GUI.H                             GUI Header file
  44.       GUI.CPP                           Main Program Module
  45.       DRAW.EXE                          A Demonstration of what
  46.                     GUI Handler can do
  47.       REG.FRM                           Registration form
  48.     
  49.     If you did not recieve all of these files, please contact the
  50.     sysop of the board you downloaded it from.
  51.    
  52. COMMANDS
  53.  
  54.     Function     cls
  55.  
  56.     Syntax:      void cls(int color);
  57.  
  58.     Parameters:  Color to clear screen with.
  59.  
  60.     
  61.     Example:     cls(15);
  62.          Would paint the screen white.
  63.  
  64.  
  65.  
  66.     Function:    multispray
  67.  
  68.     Syntax:      void multispray(int x, int y);
  69.  
  70.     Parameters:  Puts a random color in a random circular area 
  71.          around pos X, Y
  72.  
  73.     Example:     multispray(50,50);
  74.          Targets 50X, 50Y as the center of the spray
  75.  
  76.  
  77.     Function:    spray
  78.  
  79.     Syntax:      void spray(int x, int y, int color);
  80.  
  81.     Parameters:  Puts color [color], in a random circular area 
  82.          around pos X, Y
  83.  
  84.  
  85.  
  86.     Function:    shadowtext
  87.  
  88.     Syntax:      void shadowtext(int x, int y, const char far *text,
  89.          int color);
  90.  
  91.     Parameters:  Puts Shadowed text to the screen at X, Y
  92.  
  93.     Example:     shadowtext(50,50,"Hello World!",7);
  94.          Would put the shadowed text 'Hello World!' at 50X, 50Y
  95.          and would color the foretext Light Grey
  96.     
  97.     
  98.     
  99.     Function:    drawbutton
  100.     
  101.     Syntax:      void drawbutton(int x, int y, int mx, int my, int 
  102.          labelcolor, const char far *label, int shadowed);
  103.     
  104.     Parameters:  X pos of upper-left corner, y pos of upper-left
  105.          corner, x pos of lower-right corner, y pos of
  106.          lower-right corner.
  107.          Labelcolor specifies the color of the buttontext.
  108.          Label refers to what the button will be label as
  109.          Shadowed asks if you want the button to be shadowed
  110.          TRUE for shadowed button, FALSE for regular button.
  111.     
  112.     Purpose:     To draw a button on the screen.
  113.     
  114.     Example:     drawbutton(50,50,150,100,15,"Cancel",TRUE);
  115.          Would draw a button at 50X, 50Y, and end it at
  116.          150X, 100Y, Labeled 'Cancel', colored white, with
  117.          a shadow.
  118.     
  119.     
  120.     
  121.     Function:    drawfilledbutton
  122.     
  123.     Syntax:      void drawfilledbutton(int x, int y, int mx, int my,
  124.          int color, int labelcolor, const char far *label,
  125.          int shadowed);
  126.     
  127.     Parameters:  X pos of upper-left corner, y pos of upper-left
  128.          corner, x pos of lower-right corner, y pos of
  129.          lower-right corner. Color of button.
  130.          Color of label. Label Name. Whether or not to make
  131.          the label shadowed.
  132.     
  133.     Purpose:     To draw a filled-button on the screen.
  134.     
  135.     Example:     drawfilledbutton(50,50,150,100,1,15,"Cancel",TRUE);
  136.          Would draw a button at 50X, 50Y, and end it at
  137.          150X, 100Y, button colored DARK_BLUE,
  138.          Labeled 'Cancel', colored white, with
  139.          a shadow.
  140.     
  141.     
  142.     
  143.     Function:    drawclickedbutton
  144.     
  145.     Syntax:      void drawclickedbutton(int x, int y, int mx, int my,
  146.          int labelcolor, const char far *label, int shadowed);
  147.     
  148.     Parameters:  Same as drawbutton, but it will draw a clicked button 
  149.          instead of an unclicked button.
  150.  
  151.     Purpose:     To draw a clicked-button on the screen.
  152.     
  153.     Example:     drawclickedbutton(50,50,150,100,15,"Cancel",TRUE);
  154.          Would draw a clicked button at 50X, 50Y, and end it at
  155.          150X, 100Y, Labeled 'Cancel', colored white, with
  156.          a shadow.
  157.     
  158.     
  159.     Function:    drawclickedfilledbutton
  160.     
  161.     Syntax:      void drawclickedfilledbutton(int x, int y, int mx,
  162.          int my, int color, int labelcolor, const char far 
  163.          *label, int shadowed);
  164.     
  165.     Parameters:  X pos of upper-left corner, y pos of upper-left
  166.          corner, x pos of lower-right corner, y pos of
  167.          lower-right corner. Color of button.
  168.     
  169.     Purpose:     Same as drawfilledbutton, but it draws a clicked-filled
  170.          button.
  171.     
  172.     Example:     drawclickedfilledbutton(50,50,150,100,1,15,
  173.          "Cancel",TRUE);
  174.          Would draw a clicked button at 50X, 50Y, and end it at
  175.          150X, 100Y, button colored DARK_BLUE,
  176.          Labeled 'Cancel', colored white, with
  177.          a shadow.
  178.  
  179.  
  180.  
  181.     Function:    drawvertscrollbar
  182.     
  183.     Syntax:      void drawvertscrollbar(int x, int y, int length);
  184.     
  185.     Parameters:  X pos of scroll bar, Y pos of scroll bar, length
  186.          of scroll bar
  187.     
  188.     Purpose:     To draw a Vertical(Up and Down) scroll bar on the 
  189.          screen
  190.  
  191.     
  192.     
  193.     Example:     drawvertscrollbar(50,50,200);
  194.          Would draw a scroll bar at 50X, 50Y, and end at
  195.          200Y
  196.  
  197.  
  198.  
  199.     Function:    drawhorzscrollbar
  200.     
  201.     Syntax:      void drawvertscrollbar(int x, int y, int length);
  202.     
  203.     Parameters:  X pos of scroll bar, Y pos of scroll bar, length
  204.          of scroll bar
  205.     
  206.     Purpose:     To draw a Horizontal(Left and Right) scroll bar
  207.          on the screen
  208.  
  209.     Example:     drawhorzscrollbar(50,50,200);
  210.          would draw a scroll bar at 50X, 50Y, and end at
  211.          200X
  212.  
  213.  
  214.  
  215.     Function:    drawscrollbox
  216.     
  217.     Syntax:      void drawscrollbox(int x, int y);
  218.     
  219.     Parameters:  X pos of scroll box, Y pos of scroll box.
  220.     
  221.     Purpose:     To draw a scroll box on the screen
  222.     
  223.     Example:     drawscrollbox(50,50);
  224.          Would draw a scroll box at 50X, 50Y.
  225.          (NOTE: I am trying to setup a routine to monitor
  226.           the scroll bars, so it will be easier on you, the
  227.           programmer)
  228.  
  229.  
  230.  
  231.     Function:    drawwindow
  232.     
  233.     Syntax:      void drawwindow(int x, int y, int mx, int my, 
  234.          const char far *title, int scrollbar);
  235.     
  236.     Parameters:  X pos of upper-left corner, Y pos of upper-left, 
  237.          corner, X pos of lower-right corner, Y pos of
  238.          lower-right corner. If you want the scroll bars
  239.          to be put on the window, just put TRUE in the
  240.          scrollbar part.
  241.  
  242.     Example:     drawwindow(20,20,500,300,"HELLO WORLD!,FALSE);
  243.          Would draw a window at 20X, 20Y, and extend it
  244.          to 500X, 300Y, with the name of the window as
  245.          "HELLO WORLD!", and draw it without the Scrollbars
  246.  
  247.  
  248.     Function:    textfield
  249.  
  250.     Syntax:      void textfield(int x, int y, int mx, int my);
  251.  
  252.     Parameters:  Specifies an area for text input, at X, Y MX, MY
  253.  
  254.     Example:     textfield(50,50,100,100);
  255.          Draws a black rectangle at 50X, 50Y, 100X, 100Y.
  256.  
  257.  
  258.     
  259.     Function:    putmenu
  260.     
  261.     Syntax:      void putmenu(void *menuname, int x, int y, int type);
  262.     
  263.     Parameters:  Name of the menu, X pos to place at, Y pos to 
  264.          place at, how to display it(ie. XOR, OR, AND, etc.)
  265.     
  266.     Example:     putmenu(MAIN_MENU, 0, 0, COPY);
  267.          Would put the menu of 'MAIN_MENU' at 0X, and 0Y
  268.          and painting it as COPY
  269.     
  270.     
  271.     Function:    getmenu
  272.     
  273.     Syntax:      void getmenu(void *menuname, int x, int y, int mx, int my);
  274.     
  275.     Parameters:  Name of menu, X upper-left pos to save, Y upper-left 
  276.          pos to save, X lower-right pos to save, Y lower-right
  277.          pos to save
  278.  
  279.     Example:     getmenu(MAIN_MENU,0,0,639,19);
  280.          Would get the menu 'MAIN_MENU' from 0X, 0Y, 639X, and
  281.          19Y
  282.  
  283.  
  284.  
  285.  
  286.  
  287. CONTACTING THE AUTHOR
  288.  
  289.     You can either get ahold of me by calling my board, Far Side of the
  290.     Sun at (815)477-8263, you can call me voice (815)477-7236, or last
  291.     but not least, you can write to me at:
  292.      Dan Watling
  293.      3408 Walkup Road
  294.      Crystal Lake, Illinois
  295.      60012-1109
  296.  
  297. NEXT SHAREWARE VERSION
  298.  
  299.     In the next shareware release of Graphical User Interface Handler, I 
  300.     intend on having the following things done:
  301.     
  302.     o Any bugs that I find, or that anyone else finds
  303.     o Making more commands that either I think of, or someone else
  304.       suggests
  305.     o Put the arrows on the scrollbar routines
  306.     o Hopefully, add a routine that monitors the scrollbars and such
  307.     o Make a different demo for GUIHandler
  308.  
  309. NEXT REGISTERED RELEASE
  310.  
  311.     In the next registered release of Graphical User Interface Handler, I
  312.     intend on having the following things done:
  313.  
  314.     o Any bugs that I find, or that anyone else finds
  315.     o Making more commands that either I think of, or someone else
  316.       suggests
  317.     o Put the arrows on the scrollbar routines
  318.     o Hopefully, add a routine that monitors the scrollbars and such
  319.     o Make a totally different demo for GUIHandler
  320.     o Add some mouse routines
  321.  
  322.     This should be done by November of 1993.
  323.     Remember, if you would like to register this, send $15.00 to me!
  324.  
  325.  
  326.