]>
Commit | Line | Data |
---|---|---|
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$ | |
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 | WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr; | |
18 | ||
19 | class WXDLLEXPORT wxRadioButton: public wxControl | |
20 | { | |
21 | public: | |
22 | inline wxRadioButton() {} | |
23 | inline wxRadioButton( wxWindow* pParent | |
24 | ,wxWindowID vId | |
25 | ,const wxString& rsLabel | |
26 | ,const wxPoint& rPos = wxDefaultPosition | |
27 | ,const wxSize& rSize = wxDefaultSize | |
28 | ,long lStyle = 0 | |
29 | #if wxUSE_VALIDATORS | |
30 | ,const wxValidator& rValidator = wxDefaultValidator | |
31 | #endif | |
32 | ,const wxString& rsName = wxRadioButtonNameStr | |
33 | ) | |
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 | virtual void SetLabel(const wxString& rsLabel); | |
60 | virtual void SetValue(bool bVal); | |
61 | virtual bool GetValue(void) const ; | |
62 | ||
63 | bool OS2Command( WXUINT wParam | |
64 | ,WXWORD wId | |
65 | ); | |
66 | void Command(wxCommandEvent& rEvent); | |
67 | private: | |
68 | DECLARE_DYNAMIC_CLASS(wxRadioButton) | |
69 | }; // end of wxRadioButton | |
70 | ||
71 | #endif | |
72 | // _WX_RADIOBUT_H_ |