home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / SoundApps / TimeWarp / Source / CompletionView.h < prev    next >
Encoding:
Text File  |  1995-06-12  |  1.3 KB  |  53 lines

  1. /* CompletionView.h
  2.  * CompletionView is a simple "gas gauge" display to display the proress
  3.  * of some calclation.  As you call [compltionView setDoubleValue:value]
  4.  * with values of 0.0 to 1.0, the completion view go from empty to full.
  5.  *
  6.  * You may freely copy, distribute, and reuse the code in this example.
  7.  * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
  8.  * fitness for any particular use.
  9.  *
  10.  * Written by: Robert Poor
  11.  * Created: Sep/92
  12.  */
  13.  
  14. #import <appkit/View.h>
  15.  
  16. @interface CompletionView:View
  17. {
  18.   double    value;        /* 0.0 <= value < 1.0 */
  19.   int        pctValue;    /* value expressed from 0 to 100 % */
  20.   float        backgroundColor;
  21.   float        completionColor;
  22.   id        textField;
  23.   BOOL        updateTextField;
  24. }
  25.  
  26. - initFrame:(const NXRect *)frameRect;
  27.  
  28. - (double)value;
  29. - setDoubleValue:(double)aValue;
  30. /*
  31.  * Value is assumed to range between 0.0 and 1.0
  32.  */
  33.  
  34. - (float)backgroundColor;
  35. - setBackgroundColor:(float)color;
  36. - (float)completionColor;
  37. - setCompletionColor:(float)color;
  38. /*
  39.  * Get/Set the colors used for to draw the gauge.
  40.  */
  41.  
  42. - textField;
  43. - setTextField:aTextField;
  44. /*
  45.  * If there is an object that responds to setStringValue, then the completion
  46.  * view will update it's text with a string of the form "nn%" whenever its
  47.  * value changes.
  48.  */
  49.  
  50. - drawSelf:(NXRect *)rects :(int)rectCount;
  51.  
  52. @end
  53.