home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmiSoft / Dev / Gui / Cit.lha / CIT / citra / CITRadioButton.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-02-13  |  1.3 KB  |  63 lines

  1. //
  2. //                    CITRadioButton include
  3. //
  4. //                          StormC
  5. //
  6. //                     version 2003.02.12
  7. //
  8.  
  9. #ifndef CITRADIOBUTTON_H
  10. #define CITRADIOBUTTON_H TRUE
  11.  
  12. #include "CITGadget.h"
  13.  
  14. #include <gadgets/radiobutton.h>
  15.  
  16. //
  17. // This enum is for internal use only
  18. //
  19. enum
  20. {
  21.   CITRADIOBUTTON_LABELS = 0,
  22.   CITRADIOBUTTON_SPACING,
  23.   CITRADIOBUTTON_SELECTED,
  24.   CITRADIOBUTTON_LABELPLACE,
  25.   CITRADIOBUTTON_LAST
  26. };
  27.  
  28. class CITRadioButton:public CITGadget
  29. {
  30.   public:
  31.     CITRadioButton();
  32.     ~CITRadioButton();
  33.  
  34.     void Labels(char** labels);
  35.     void Labels(List* labels)
  36.            {setTag(CITRADIOBUTTON_LABELS,RADIOBUTTON_Labels,ULONG(labels));}
  37.     void Spacing(WORD spacing)
  38.            {setTag(CITRADIOBUTTON_SPACING,RADIOBUTTON_Spacing,spacing);}
  39.     void Selected(LONG sel)
  40.            {setTag(CITRADIOBUTTON_SELECTED,RADIOBUTTON_Selected,sel);}
  41.     void LabelPlace(WORD place)
  42.            {setTag(CITRADIOBUTTON_LABELPLACE,RADIOBUTTON_LabelPlace,place);}
  43.  
  44.     WORD Selected();
  45.  
  46.   protected:
  47.     virtual BOOL    Create(CITWindow* CITWd,CITContainer* parent);
  48.     virtual Object* NewObjectA(TagItem* tags);
  49.  
  50.   private:
  51.     void  setTag(int index,ULONG attr,ULONG val);
  52.  
  53.     TagItem* radioButtonTag;
  54.     CITList  labelList;
  55. };
  56.  
  57. enum
  58. {
  59.   RADIOBUTTONCLASS_FLAGBITUSED = GADGETCLASS_FLAGBITUSED
  60. };
  61.  
  62. #endif
  63.