00001 //--------------------------------------------------------------------------- 00002 /// \file CATRadioButton.h 00003 /// \brief Radio button (grouped) 00004 /// \ingroup CATGUI 00005 /// 00006 /// Copyright (c) 2003-2008 by Michael Ellison. 00007 /// See COPYING.txt for the \ref gaslicense License (MIT License). 00008 /// 00009 // $Author: mikeellison $ 00010 // $Date: 2008-01-24 06:27:32 -0600 (Thu, 24 Jan 2008) $ 00011 // $Revision: $ 00012 // $NoKeywords: $ 00013 // 00014 //--------------------------------------------------------------------------- 00015 #ifndef _GGRadioButton_H_ 00016 #define _GGRadioButton_H_ 00017 00018 #include "CATSwitch.h" 00019 00020 const int kGGMAXRADIOBUTTONS = 256; 00021 00022 class CATRadioButton; 00023 00024 /// \class CATRadioButton CATRadioButton.h 00025 /// \brief Radio button (grouped) 00026 /// \ingroup CATGUI 00027 class CATRadioButton : public CATSwitch 00028 { 00029 public: 00030 CATRadioButton( const CATString& element, 00031 const CATString& rootDir); 00032 00033 virtual ~CATRadioButton(); 00034 00035 virtual CATResult Load( CATPROGRESSCB progressCB = 0, 00036 void* progressParam= 0, 00037 CATFloat32 progMin = 0.0f, 00038 CATFloat32 progMax = 1.0f); 00039 00040 /// ParseAttributes() parses the known attributes for an object. 00041 virtual CATResult ParseAttributes(); 00042 00043 virtual void Draw(CATImage* image, const CATRect& dirtyRect); 00044 00045 virtual void OnMouseClick(); 00046 #ifdef _WIN32 00047 virtual CATUInt32 GetAccessRole() {return CAT_ROLE_SYSTEM_RADIOBUTTON;} 00048 #endif //_WIN32 00049 00050 protected: 00051 CATFloat32 fRadioValue; 00052 }; 00053 00054 #endif // _GGRadioButton_H_ 00055 00056