home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / gui / precog2_1.lha / Precognition2_1 / include / Valuator.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-07  |  1.3 KB  |  59 lines

  1. /* ==========================================================================
  2. **
  3. **                   Valuator.h
  4. **
  5. ** PObject<GraphicObject<Interactor<Valuator
  6. **
  7. ** A Valuator is a virtual class, derrived from class Interactor.
  8. ** Valuators are those interactors which allow the user to input
  9. ** (or select via button interaction) a value.
  10. **
  11. ** Examples; CycleGadgets, IntegerGadgets, StringGadgets
  12. **
  13. ** ©1991 WILLISoft
  14. **
  15. ** ==========================================================================
  16. */
  17.  
  18. #ifndef VALUATOR_H
  19. #define VALUATOR_H
  20.  
  21. #include "Interactor.h"
  22.  
  23.  
  24. typedef Interactor Valuator;
  25.  
  26. void Valuator_Init __PARMS(( Valuator *self ));
  27.  
  28. LONG Value __PARMS((
  29.                   Valuator *self
  30.           ));
  31.    /*
  32.    ** Returns the current value
  33.    */
  34.  
  35.  
  36. LONG SetValue __PARMS((
  37.                Valuator *self,
  38.                LONG selection
  39.              ));
  40.    /*
  41.    ** Sets the current value, returns the value.
  42.    */
  43.  
  44.  
  45. /* moved from StringGadget.h -- since they seem to be more universal -- EDB */
  46. /*
  47. ** NOTE:  The methods 'Value()', and 'SetValue()' should be used
  48. ** to retrieve and set the values.  These take/return LONG values.
  49. **
  50. ** These macros cast them to (char*).
  51. */
  52.  
  53. #define StringValue(i)       (char *)Value( i )
  54. #define SetStringValue(i,s)  (char *)SetValue( i, (LONG)s )
  55.  
  56.  
  57. #endif
  58.  
  59.