home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Development / CIT.v4 / citra / CITSlider.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-13  |  2.1 KB  |  89 lines

  1. //
  2. //                    CITSlider include
  3. //
  4. //                          StormC
  5. //
  6. //                     version 2002.03.09
  7. //
  8.  
  9. #ifndef CIT_SLIDER_H
  10. #define CIT_SLIDER_H TRUE
  11.  
  12. #include <gadgets/slider.h>
  13.  
  14. #ifndef CIT_GADGETS_H
  15. #include "CITGadget.h"
  16. #endif
  17.  
  18. //
  19. // This enum for internal use only
  20. //
  21. enum
  22. {
  23.   CITSLIDER_MIN,
  24.   CITSLIDER_MAX,
  25.   CITSLIDER_LEVEL,
  26.   CITSLIDER_ORIENTATION,
  27.   CITSLIDER_DISPHOOK,
  28.   CITSLIDER_TICKS,
  29.   CITSLIDER_SHORTTICKS,
  30.   CITSLIDER_TICKSIZE,
  31.   CITSLIDER_KNOBIMAGE,
  32.   CITSLIDER_BODYFILL,
  33.   CITSLIDER_BODYIMAGE,
  34.   CITSLIDER_GRADIENT,
  35.   CITSLIDER_PENARRAY,
  36.   CITSLIDER_INVERT,
  37.   CITSLIDER_KNOBDELTA,
  38.   CITSLIDER_LAST
  39. };
  40.  
  41. class CITSlider:public CITGadget
  42. {
  43.   public:
  44.     CITSlider();
  45.     ~CITSlider();
  46.  
  47.     void Min(WORD min)
  48.       {setTag(CITSLIDER_MIN,SLIDER_Min,min);}
  49.     void Max(WORD max)
  50.       {setTag(CITSLIDER_MAX,SLIDER_Max,max);}
  51.     void Level(WORD level)
  52.       {setTag(CITSLIDER_LEVEL,SLIDER_Level,level);}
  53.     void Orientation(WORD orien)
  54.       {setTag(CITSLIDER_ORIENTATION,SLIDER_Orientation,orien);}
  55.     void Ticks(LONG ticks)
  56.       {setTag(CITSLIDER_TICKS,SLIDER_Ticks,ticks);}
  57.     void ShortTicks(BOOL b = TRUE)
  58.       {setTag(CITSLIDER_SHORTTICKS,SLIDER_ShortTicks,b);}
  59.     void TickSize(WORD tSize)
  60.       {setTag(CITSLIDER_TICKSIZE,SLIDER_TickSize,tSize);}
  61.     void KnobImage(struct Image* im)
  62.       {setTag(CITSLIDER_KNOBIMAGE,SLIDER_KnobImage,ULONG(im));}
  63.     void BodyFill(WORD bFill)
  64.       {setTag(CITSLIDER_BODYFILL,SLIDER_BodyFill,bFill);}
  65.     void BodyImage(struct Image* im)
  66.       {setTag(CITSLIDER_BODYIMAGE,SLIDER_BodyImage,ULONG(im));}
  67.     void Gradient(BOOL b = TRUE)
  68.       {setTag(CITSLIDER_GRADIENT,SLIDER_Gradient,b);}
  69.     void PenArray(UWORD pen)
  70.       {setTag(CITSLIDER_PENARRAY,SLIDER_PenArray,pen);}
  71.     void Invert(BOOL b = TRUE)
  72.       {setTag(CITSLIDER_INVERT,SLIDER_Invert,b);}
  73.     void KnobDelta(WORD kDelta)
  74.       {setTag(CITSLIDER_KNOBDELTA,SLIDER_KnobDelta,kDelta);}
  75.  
  76.     WORD Level();
  77.  
  78.   protected:
  79.     virtual Object* NewObjectA(TagItem* tags);
  80.     virtual void    hookSetup(ULONG userData);
  81.  
  82.   private:
  83.     void setTag(int index,ULONG attr,ULONG val);
  84.  
  85.     TagItem* sliderTag;
  86. };
  87.  
  88. #endif
  89.