home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 488.lha / TCL_alpha2 / tcl.lzh / tcl / docs / tcla / gadgets.doc < prev    next >
Encoding:
Text File  |  1990-05-04  |  2.3 KB  |  70 lines

  1.  
  2.  
  3.     gadget add hit left top width height [relbottom] [relright] 
  4.         [relwidth] [relheight] [disabled]
  5.         [up tclcode] [down tclcode]
  6.  
  7.             add a hitbox gadget.  Your up routine is executed if specified
  8.             when the mouse button goes up and your down routine is 
  9.             executed if specified when the button goes down.
  10.  
  11.     gadget add toggle left top width height [relbottom] [relright] 
  12.         [relwidth] [relheight] [selected] [disabled]
  13.         [up tclcode] [down tclcode]
  14.  
  15.             add a toggle gadget.  Up and down routines are executed as
  16.             above.  If selected is set, it will appear selected when
  17.             created.
  18.  
  19.     gadget add string left top width height initial [relbottom] [relright] 
  20.         [relwidth] [relheight] [selected] [disabled]
  21.         [up tclcode] [down tclcode]
  22.         [stringcenter] [stringright]
  23.  
  24.             add a string gadget.  Strings can be 100 chars long max.
  25.             The down routine, if specified, is executed when the user
  26.             clicks in the gadget area, the up routine, if specified,
  27.             is executed when the user hits enter.
  28.  
  29.     gadget add integer left top width height initial [relbottom] [relright] 
  30.         [relwidth] [relheight] [selected] [disabled]
  31.         [up tclcode] [down tclcode]
  32.  
  33.             A variation of string gadget, this guy allows one to enter
  34.             integers.
  35.  
  36.     gadget add proportional left top width height [relbottom] [relright]
  37.         [relwidth] [relheight] [selected] [disabled]
  38.         [up tclcode] [down tclcode]
  39.         [horizontal index pixels_per_unit total]
  40.         [vertical index pixels_per_unit total]
  41.             index is the current index, pixels_per_unit is the pixels
  42.             per unit of things we're dealing with, usually font height
  43.             and width, total is the total number of units.
  44.  
  45.     gadget remove gadgethandle
  46.             get rid of gadget
  47.  
  48.     gadget on gadgethandle
  49.             unghost it
  50.  
  51.     gadget off gadgethandle
  52.             ghost it
  53.  
  54.     gadget value gadgethandle
  55.     gadget value gadgethandle [vertical,horizontal,vertunits,horizunits]
  56.         Fetch the value, boolean gadgets come out 0/1.
  57.         prop gadgets return the current position relative to the number
  58.           passed for a total when created or last setvalue
  59.         horizunits and vertunits are the number of units (calculated from
  60.         the current gadget size and pixels_per_unit given at gadget
  61.         definition time) displayable on the screen in the relevant direction
  62.  
  63.     gadget setvalue gadgethandle string or 0/1 for toggle
  64.     gadget setvalue gadgethandle [vertical,horizontal] currentindex total
  65.         for prop gadgets
  66.  
  67.     gadget refresh
  68.             refresh the gadgets
  69.  
  70.