home *** CD-ROM | disk | FTP | other *** search
/ Nebula / nebula.bin / SourceCode / Classes / Gauges / README < prev    next >
Text File  |  1993-01-19  |  2KB  |  47 lines

  1. This is the begining of a general purpose gauges package.
  2.  
  3. Revision:
  4.     1.0    Made subclass of Control and now supports target action on over/underflow
  5.         Added read:/write:/awake methods.  (Should work as custom pallate)
  6.     0.9    First revision. Gauge class with BarGauge and ValuatorGauge
  7.         subclasses. Supports tics, tic labels, and autoscaling.
  8.  
  9. Design:
  10.     There is a general purpose gauge class called "Gauge" that knows how
  11.     to do all of the functions of a specific gauge but draw it and refresh
  12.     it's background.  It has all of the functions to set flags, data and
  13.     load values.
  14.     
  15.     The subclasses implement a few messages.  They know how to 
  16.     "restoreBitmap:" and "drawSelf::". The first causes the off screen
  17.     bitmap, holding the backgroundof the object, to be redrawn.  This is
  18.     usually the result of rescaling, resizing or color changes.  The second
  19.     method mentioned composites the background and then draws the value
  20.     marker.
  21.     
  22. Usage:
  23.     Parse the Gauge and whatever subclass you want to use into IB.  The
  24.     put a custom view in your interface and change the type to the gauge
  25.     you want.  You can now make it an outlet or do whatever IB stuff you
  26.     want.
  27.     
  28.     You will probably want to set some flags,  borderType, label state,
  29.     number of tic marks, min and max values.  This will generate the
  30.     background.  Also, load up the autoscale parameters.  Now start sending
  31.     it data and the pointer should track the data.  
  32.     
  33. Demo:
  34.     You can hook up sliders to gauges and compile just that.  This will
  35.     cause the bars to track sliders.  Probably would make agood pallate.
  36.     
  37. Working Gauges:
  38.     Bar Gauge
  39.     Valuator Gauge
  40.     
  41. NonWorking Gauges:
  42.     Dial
  43.     
  44.     
  45. <joe>
  46.  
  47.