home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2233.zip / wxOS2-2_3_3.zip / wxWindows-2.3.3 / include / wx / os2 / radiobut.h < prev    next >
C/C++ Source or Header  |  2002-07-09  |  3KB  |  87 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name:        radiobut.h
  3. // Purpose:     wxRadioButton class
  4. // Author:      David Webster
  5. // Modified by:
  6. // Created:     10/12/99
  7. // RCS-ID:      $Id: RADIOBUT.H,v 1.10 2002/07/09 05:03:04 DW Exp $
  8. // Copyright:   (c) David Webster
  9. // Licence:     wxWindows licence
  10. /////////////////////////////////////////////////////////////////////////////
  11.  
  12. #ifndef _WX_RADIOBUT_H_
  13. #define _WX_RADIOBUT_H_
  14.  
  15. #include "wx/control.h"
  16.  
  17. class WXDLLEXPORT wxRadioButton: public wxControl
  18. {
  19. public:
  20.     inline wxRadioButton() { Init(); }
  21.     inline wxRadioButton( wxWindow*          pParent
  22.                          ,wxWindowID         vId
  23.                          ,const wxString&    rsLabel
  24.                          ,const wxPoint&     rPos = wxDefaultPosition
  25.                          ,const wxSize&      rSize = wxDefaultSize
  26.                          ,long               lStyle = 0
  27. #if wxUSE_VALIDATORS
  28.                          ,const wxValidator& rValidator = wxDefaultValidator
  29. #endif
  30.                          ,const wxString&    rsName = wxRadioButtonNameStr
  31.                          )
  32.     {
  33.         Init();
  34.  
  35.         Create( pParent
  36.                ,vId
  37.                ,rsLabel
  38.                ,rPos
  39.                ,rSize
  40.                ,lStyle
  41. #if wxUSE_VALIDATORS
  42.                ,rValidator
  43. #endif
  44.                ,rsName
  45.               );
  46.     }
  47.  
  48.     bool Create( wxWindow* pParent
  49.                 ,wxWindowID         vId
  50.                 ,const wxString&    rsLabel
  51.                 ,const wxPoint&     rPos = wxDefaultPosition
  52.                 ,const wxSize&      rSize = wxDefaultSize
  53.                 ,long               lStyle = 0
  54. #if wxUSE_VALIDATORS
  55.                 ,const wxValidator& rValidator = wxDefaultValidator
  56. #endif
  57.                 ,const wxString&    rsName = wxRadioButtonNameStr
  58.                );
  59.  
  60.     virtual void SetLabel(const wxString& rsLabel);
  61.     virtual void SetValue(bool bVal);
  62.     virtual bool GetValue(void) const ;
  63.  
  64.     bool            OS2Command( WXUINT wParam
  65.                                ,WXWORD wId
  66.                               );
  67.     void            Command(wxCommandEvent& rEvent);
  68.     virtual MRESULT OS2WindowProc( WXUINT   uMsg
  69.                                   ,WXWPARAM wParam
  70.                                   ,WXLPARAM lParam
  71.                                  );
  72.     virtual void    SetFocus(void);
  73.  
  74. protected:
  75.     virtual wxSize DoGetBestSize() const;
  76.  
  77. private:
  78.     void Init(void);
  79.  
  80.     bool                            m_bFocusJustSet;
  81.  
  82.     DECLARE_DYNAMIC_CLASS(wxRadioButton)
  83. }; // end of wxRadioButton
  84.  
  85. #endif
  86.     // _WX_RADIOBUT_H_
  87.