1 /////////////////////////////////////////////////////////////////////////////// 
   2 // Name:        wx/univ/radiobut.h 
   3 // Purpose:     wxRadioButton declaration 
   4 // Author:      Vadim Zeitlin 
   8 // Copyright:   (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) 
   9 // Licence:     wxWindows licence 
  10 /////////////////////////////////////////////////////////////////////////////// 
  12 #ifndef _WX_UNIV_RADIOBUT_H_ 
  13 #define _WX_UNIV_RADIOBUT_H_ 
  15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) 
  16     #pragma interface "univradiobut.h" 
  19 #include "wx/checkbox.h" 
  21 // ---------------------------------------------------------------------------- 
  23 // ---------------------------------------------------------------------------- 
  25 class WXDLLEXPORT wxRadioButton 
: public wxCheckBox
 
  29     wxRadioButton() { Init(); } 
  31     wxRadioButton(wxWindow 
*parent
, 
  33                   const wxString
& label
, 
  34                   const wxPoint
& pos 
= wxDefaultPosition
, 
  35                   const wxSize
& size 
= wxDefaultSize
, 
  37                   const wxValidator
& validator 
= wxDefaultValidator
, 
  38                   const wxString
& name 
= wxRadioButtonNameStr
) 
  42         Create(parent
, id
, label
, pos
, size
, style
, validator
, name
); 
  45     bool Create(wxWindow 
*parent
, 
  47                 const wxString
& label
, 
  48                 const wxPoint
& pos 
= wxDefaultPosition
, 
  49                 const wxSize
& size 
= wxDefaultSize
, 
  51                 const wxValidator
& validator 
= wxDefaultValidator
, 
  52                 const wxString
& name 
= wxRadioButtonNameStr
); 
  54     // override some base class methods 
  55     virtual void ChangeValue(bool value
); 
  58     // implement our own drawing 
  59     virtual void DoDraw(wxControlRenderer 
*renderer
); 
  61     // we use the radio button bitmaps for size calculation 
  62     virtual wxSize 
GetBitmapSize() const; 
  64     // the radio button can only be cleared using this method, not 
  65     // ChangeValue() above - and it is protected as it can only be called by 
  66     // another radiobutton 
  69     // called when the radio button becomes checked: we clear all the buttons 
  70     // in the same group with us here 
  71     virtual void OnCheck(); 
  73     // send event about radio button selection 
  74     virtual void SendEvent(); 
  77     DECLARE_DYNAMIC_CLASS(wxRadioButton
) 
  80 #endif // _WX_UNIV_RADIOBUT_H_