]>
Commit | Line | Data |
---|---|---|
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 | ||
11 | #ifndef _WX_RADIOBUT_H_ | |
12 | #define _WX_RADIOBUT_H_ | |
13 | ||
14 | #include "wx/control.h" | |
15 | ||
16 | class WXDLLIMPEXP_CORE wxRadioButton: public wxControl | |
17 | { | |
18 | public: | |
19 | inline wxRadioButton() { Init(); } | |
20 | inline wxRadioButton( wxWindow* pParent | |
21 | ,wxWindowID vId | |
22 | ,const wxString& rsLabel | |
23 | ,const wxPoint& rPos = wxDefaultPosition | |
24 | ,const wxSize& rSize = wxDefaultSize | |
25 | ,long lStyle = 0 | |
26 | ,const wxValidator& rValidator = wxDefaultValidator | |
27 | ,const wxString& rsName = wxRadioButtonNameStr | |
28 | ) | |
29 | { | |
30 | Init(); | |
31 | ||
32 | Create( pParent | |
33 | ,vId | |
34 | ,rsLabel | |
35 | ,rPos | |
36 | ,rSize | |
37 | ,lStyle | |
38 | ,rValidator | |
39 | ,rsName | |
40 | ); | |
41 | } | |
42 | ||
43 | bool Create( wxWindow* pParent | |
44 | ,wxWindowID vId | |
45 | ,const wxString& rsLabel | |
46 | ,const wxPoint& rPos = wxDefaultPosition | |
47 | ,const wxSize& rSize = wxDefaultSize | |
48 | ,long lStyle = 0 | |
49 | ,const wxValidator& rValidator = wxDefaultValidator | |
50 | ,const wxString& rsName = wxRadioButtonNameStr | |
51 | ); | |
52 | ||
53 | virtual void SetLabel(const wxString& rsLabel); | |
54 | virtual void SetValue(bool bVal); | |
55 | virtual bool GetValue(void) const ; | |
56 | ||
57 | bool OS2Command( WXUINT wParam | |
58 | ,WXWORD wId | |
59 | ); | |
60 | void Command(wxCommandEvent& rEvent); | |
61 | virtual MRESULT OS2WindowProc( WXUINT uMsg | |
62 | ,WXWPARAM wParam | |
63 | ,WXLPARAM lParam | |
64 | ); | |
65 | virtual void SetFocus(void); | |
66 | ||
67 | protected: | |
68 | virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } | |
69 | virtual wxSize DoGetBestSize() const; | |
70 | ||
71 | private: | |
72 | void Init(void); | |
73 | ||
74 | bool m_bFocusJustSet; | |
75 | ||
76 | DECLARE_DYNAMIC_CLASS(wxRadioButton) | |
77 | }; // end of wxRadioButton | |
78 | ||
79 | #endif | |
80 | // _WX_RADIOBUT_H_ |