home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / OTL-MC7.DMS / in.adf / ansicdemo.lha / ANSI-C / gadtools / ReadMe < prev   
Encoding:
Text File  |  1991-08-08  |  2.7 KB  |  83 lines

  1. Gadget Toolkit Example Code
  2.  
  3. 1991 Amiga Developers Conference, Milan.
  4.  
  5. There are five example programs, each of which may be compiled with
  6.  
  7.     lc -L
  8.  
  9. or
  10.  
  11.     lc -L -cfist -v
  12.  
  13.  
  14. menu1.c:
  15.  
  16. This is an example of using GadTools menus.  It creates a menu strip
  17. that has two menus, with several items each.  Sub-menus and separator
  18. bars are also shown.  This program prints out information regarding
  19. any menu activity.  If run with no parameters, menu1 will use the
  20. screen's font to layout the menus.  Optionally, menu1 takes a font
  21. name and size as parameters, and it will lay the menus out using the
  22. font you specify if it is available.  You might say
  23.  
  24.     menu1 times.font 24
  25.  
  26.  
  27. gadget1.c:
  28.  
  29. This is a straightforward example of creating GadTools gadgets.  It
  30. creates a string gadget, a slider gadget, and a button gadget.  The
  31. program prints out descriptions of the gadget activity it sees.  As
  32. well, clicking on the button increments the slider by one, until it
  33. wraps back around.
  34.  
  35.  
  36. gadget1b.c:
  37.  
  38. This incarnation adds two more string gadgets, so you can play with
  39. the Tab and Shift-Tab features.  As well, keyboard support has been
  40. added for the gadgets.
  41.  
  42.  
  43. gadget2.c:
  44.  
  45. This is an example of how one might do font-sensitive gadget layout
  46. using GadTools.  This program prints out information regarding any
  47. gadget activity.  If run with no parameters, gadget2 will use the
  48. screen's font to layout its gadgets.  Gadget2 optionally takes a font
  49. name and size as parameters, and it will lay its gadgets out using
  50. the font you specify if it can find it.  You might say
  51.  
  52.     gadget2 helvetica.font 15
  53.  
  54.  
  55. gadtools1.c:
  56.  
  57. This is a fairly involved example of GadTools gadgets and menus, and
  58. interactions between them.  It demonstrates the twelve specific kinds
  59. of GadTools gadgets, as well as many of the features of menus.
  60.  
  61. The following is a list of the interactions:
  62.  
  63. The "Gadgets" menu has an item "Foo" with sub-items "Set", "Clear",
  64. and "Toggle".  These will set, clear, or toggle the checkbox gadget
  65. labelled "Foo".
  66.  
  67. The "Gadgets" menu has a "Slider" item with sub-items "Increase" and
  68. "Decrease".  Selecting these will increment or decrement the slider
  69. gadget by 1, 5, or 10, which is also selectable by menu.
  70.  
  71. Clicking on the "ClickMe" button will change the contents of the
  72. integer gadget to the number "271828".
  73.  
  74. If the "Gadgets/MX Gadgets/Connected" sub-menu item is checked, then
  75. selecting Monday through Sunday from the mutually exclusive gadgets
  76. will set the cycle gadget to January through July respectively.
  77. Likewise, setting the cycle gadget to one of the first seven months
  78. will change the selected mutually exclusive gadget to the
  79. corresponding day.
  80.  
  81. If you drag the slider to a level between 0 and 11, the currently
  82. selected item in the listview will be set to the item of that number.
  83.