home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BK-SC1_4.DMS / in.adf / MUIClass.Lha / Include / Classes / TWiMUI / Numeric.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-16  |  2.4 KB  |  65 lines

  1. //
  2. //  $VER: Numeric.h     1.0 (16 Jun 1996)
  3. //
  4. //    c 1996 Thomas Wilhelmi
  5. //
  6. //
  7. // Address : Taunusstrasse 14
  8. //           61138 Niederdorfelden
  9. //           Germany
  10. //
  11. //  E-Mail : willi@twi.rhein-main.de
  12. //
  13. //   Phone : +49 (0)6101 531060
  14. //   Fax   : +49 (0)6101 531061
  15. //
  16. //
  17. //  $HISTORY:
  18. //
  19. //  16 Jun 1996 :   1.0 : first public Release
  20. //
  21.  
  22. #ifndef CPP_TWIMUI_NUMERIC_H
  23. #define CPP_TWIMUI_NUMERIC_H
  24.  
  25. #ifndef CPP_TWIMUI_AREA_H
  26. #include <classes/twimui/area.h>
  27. #endif
  28.  
  29. class MUINumeric : public MUIArea
  30.     {
  31.     protected:
  32.         MUINumeric(STRPTR cl) : MUIArea(cl) { };
  33.     public:
  34.         MUINumeric(const struct TagItem *t) : MUIArea(MUIC_Numeric) { init(t); };
  35.         MUINumeric(const Tag, ...);
  36.         MUINumeric() : MUIArea(MUIC_Numeric) { };
  37.         MUINumeric(MUINumeric &p) : MUIArea(p) { };
  38.         virtual ~MUINumeric();
  39.         MUINumeric &operator= (MUINumeric &);
  40.         void Default(const LONG p) { set(MUIA_Numeric_Default,(ULONG)p); };
  41.         LONG Default() const { return((LONG)get(MUIA_Numeric_Default,0L)); };
  42.         void Format(const STRPTR p) { set(MUIA_Numeric_Format,(ULONG)p); };
  43.         STRPTR Format() const { return((STRPTR)get(MUIA_Numeric_Format,NULL)); };
  44.         void Max(const LONG p) { set(MUIA_Numeric_Max,(ULONG)p); };
  45.         LONG Max() const { return((LONG)get(MUIA_Numeric_Max,0L)); };
  46.         void Min(const LONG p) { set(MUIA_Numeric_Min,(ULONG)p); };
  47.         LONG Min() const { return((LONG)get(MUIA_Numeric_Min,0L)); };
  48.         void Reverse(const BOOL p) { set(MUIA_Numeric_Reverse,(ULONG)p); };
  49.         BOOL Reverse() const { return((BOOL)get(MUIA_Numeric_Reverse,FALSE)); };
  50.         void RevLeftRight(const BOOL p) { set(MUIA_Numeric_RevLeftRight,(ULONG)p); };
  51.         BOOL RevLeftRight() const { return((BOOL)get(MUIA_Numeric_RevLeftRight,FALSE)); };
  52.         void RevUpDown(const BOOL p) { set(MUIA_Numeric_RevUpDown,(ULONG)p); };
  53.         BOOL RevUpDown() const { return((BOOL)get(MUIA_Numeric_RevUpDown,FALSE)); };
  54.         void Value(const LONG p) { set(MUIA_Numeric_Value,(ULONG)p); };
  55.         LONG Value() const { return((LONG)get(MUIA_Numeric_Value,0L)); };
  56.         void Decrease(LONG p) { dom(MUIM_Numeric_Decrease,(ULONG)p); };
  57.         void Increase(LONG p) { dom(MUIM_Numeric_Increase,(ULONG)p); };
  58.         LONG ScaleToValue(LONG p1, LONG p2, LONG p3) { return((LONG)dom(MUIM_Numeric_ScaleToValue,(ULONG)p1,(ULONG)p2,(ULONG)p3)); };
  59.         void SetDefault() { dom(MUIM_Numeric_SetDefault); };
  60.         STRPTR Stringify(LONG p) { return((STRPTR)dom(MUIM_Numeric_Stringify,(ULONG)p)); };
  61.         LONG ValueToScale(LONG p1, LONG p2) { return((LONG)dom(MUIM_Numeric_ValueToScale,(ULONG)p1,(ULONG)p2)); };
  62.     };
  63.  
  64. #endif
  65.