radiobut.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/os2/radiobut.h
  3. // Purpose: wxRadioButton class
  4. // Author: David Webster
  5. // Modified by:
  6. // Created: 10/12/99
  7. // Copyright: (c) David Webster
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_RADIOBUT_H_
  11. #define _WX_RADIOBUT_H_
  12. #include "wx/control.h"
  13. class WXDLLIMPEXP_CORE wxRadioButton: public wxControl
  14. {
  15. public:
  16. inline wxRadioButton() { Init(); }
  17. inline wxRadioButton( wxWindow* pParent
  18. ,wxWindowID vId
  19. ,const wxString& rsLabel
  20. ,const wxPoint& rPos = wxDefaultPosition
  21. ,const wxSize& rSize = wxDefaultSize
  22. ,long lStyle = 0
  23. ,const wxValidator& rValidator = wxDefaultValidator
  24. ,const wxString& rsName = wxRadioButtonNameStr
  25. )
  26. {
  27. Init();
  28. Create( pParent
  29. ,vId
  30. ,rsLabel
  31. ,rPos
  32. ,rSize
  33. ,lStyle
  34. ,rValidator
  35. ,rsName
  36. );
  37. }
  38. bool Create( wxWindow* pParent
  39. ,wxWindowID vId
  40. ,const wxString& rsLabel
  41. ,const wxPoint& rPos = wxDefaultPosition
  42. ,const wxSize& rSize = wxDefaultSize
  43. ,long lStyle = 0
  44. ,const wxValidator& rValidator = wxDefaultValidator
  45. ,const wxString& rsName = wxRadioButtonNameStr
  46. );
  47. virtual void SetLabel(const wxString& rsLabel);
  48. virtual void SetValue(bool bVal);
  49. virtual bool GetValue(void) const ;
  50. bool OS2Command( WXUINT wParam
  51. ,WXWORD wId
  52. );
  53. void Command(wxCommandEvent& rEvent);
  54. virtual MRESULT OS2WindowProc( WXUINT uMsg
  55. ,WXWPARAM wParam
  56. ,WXLPARAM lParam
  57. );
  58. virtual void SetFocus(void);
  59. protected:
  60. virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
  61. virtual wxSize DoGetBestSize() const;
  62. private:
  63. void Init(void);
  64. bool m_bFocusJustSet;
  65. DECLARE_DYNAMIC_CLASS(wxRadioButton)
  66. }; // end of wxRadioButton
  67. #endif
  68. // _WX_RADIOBUT_H_