]>
Commit | Line | Data |
---|---|---|
0e320a79 | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/os2/checkbox.h |
0e320a79 | 3 | // Purpose: wxCheckBox class |
37f214d5 | 4 | // Author: David Webster |
0e320a79 | 5 | // Modified by: |
37f214d5 | 6 | // Created: 10/13/99 |
37f214d5 | 7 | // Copyright: (c) David Webster |
65571936 | 8 | // Licence: wxWindows licence |
0e320a79 DW |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef _WX_CHECKBOX_H_ | |
12 | #define _WX_CHECKBOX_H_ | |
13 | ||
0e320a79 | 14 | #include "wx/control.h" |
0e320a79 DW |
15 | |
16 | // Checkbox item (single checkbox) | |
b5dbe15d | 17 | class WXDLLIMPEXP_FWD_CORE wxBitmap; |
53a2db12 | 18 | class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase |
0e320a79 | 19 | { |
0e320a79 | 20 | public: |
3011bf2b DW |
21 | inline wxCheckBox() { } |
22 | inline wxCheckBox( wxWindow* pParent | |
23 | ,wxWindowID vId | |
24 | ,const wxString& rsLabel | |
25 | ,const wxPoint& rPos = wxDefaultPosition | |
26 | ,const wxSize& rSize = wxDefaultSize | |
27 | ,long lStyle = 0 | |
3011bf2b | 28 | ,const wxValidator& rValidator = wxDefaultValidator |
3011bf2b DW |
29 | ,const wxString& rsName = wxCheckBoxNameStr |
30 | ) | |
31 | { | |
32 | Create( pParent | |
33 | ,vId | |
34 | ,rsLabel | |
35 | ,rPos | |
36 | ,rSize | |
37 | ,lStyle | |
3011bf2b | 38 | ,rValidator |
3011bf2b DW |
39 | ,rsName |
40 | ); | |
41 | } | |
0e320a79 | 42 | |
3011bf2b DW |
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 | |
3011bf2b | 49 | ,const wxValidator& rValidator = wxDefaultValidator |
3011bf2b DW |
50 | ,const wxString& rsName = wxCheckBoxNameStr |
51 | ); | |
37f214d5 | 52 | |
3011bf2b DW |
53 | virtual void SetValue(bool bValue); |
54 | virtual bool GetValue(void) const ; | |
37f214d5 | 55 | |
3011bf2b DW |
56 | virtual bool OS2Command( WXUINT uParam |
57 | ,WXWORD wId | |
58 | ); | |
59 | virtual void SetLabel(const wxString& rsLabel); | |
60 | virtual void Command(wxCommandEvent& rEvent); | |
37f214d5 DW |
61 | |
62 | protected: | |
3011bf2b | 63 | virtual wxSize DoGetBestSize(void) const; |
210a651b DW |
64 | private: |
65 | DECLARE_DYNAMIC_CLASS(wxCheckBox) | |
0e320a79 DW |
66 | }; |
67 | ||
53a2db12 | 68 | class WXDLLIMPEXP_CORE wxBitmapCheckBox: public wxCheckBox |
0e320a79 | 69 | { |
0e320a79 | 70 | public: |
0e320a79 | 71 | |
3011bf2b DW |
72 | inline wxBitmapCheckBox() { m_nCheckWidth = -1; m_nCheckHeight = -1; } |
73 | inline wxBitmapCheckBox( wxWindow* pParent | |
74 | ,wxWindowID vId | |
75 | ,const wxBitmap* pLabel | |
76 | ,const wxPoint& rPos = wxDefaultPosition | |
77 | ,const wxSize& rSize = wxDefaultSize | |
78 | ,long lStyle = 0 | |
3011bf2b | 79 | ,const wxValidator& rValidator = wxDefaultValidator |
3011bf2b DW |
80 | ,const wxString& rsName = wxCheckBoxNameStr |
81 | ) | |
82 | { | |
83 | Create( pParent | |
84 | ,vId | |
85 | ,pLabel | |
86 | ,rPos | |
87 | ,rSize | |
88 | ,lStyle | |
89 | ,rValidator | |
90 | ,rsName | |
91 | ); | |
92 | } | |
0e320a79 | 93 | |
3011bf2b DW |
94 | bool Create( wxWindow* pParent |
95 | ,wxWindowID vId | |
96 | ,const wxBitmap* pLabel | |
97 | ,const wxPoint& rPos = wxDefaultPosition | |
98 | ,const wxSize& rSize = wxDefaultSize | |
99 | ,long lStyle = 0 | |
3011bf2b | 100 | ,const wxValidator& rValidator = wxDefaultValidator |
3011bf2b DW |
101 | ,const wxString& rsName = wxCheckBoxNameStr |
102 | ); | |
103 | ||
104 | virtual void SetLabel(const wxBitmap& rBitmap); | |
105 | ||
106 | int m_nCheckWidth; | |
107 | int m_nCheckHeight; | |
37f214d5 | 108 | |
0e320a79 | 109 | private: |
3011bf2b DW |
110 | |
111 | virtual void SetLabel(const wxString& rsString) | |
6dd0883d | 112 | { wxCheckBox::SetLabel(rsString); } |
3011bf2b | 113 | DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox) |
0e320a79 DW |
114 | }; |
115 | #endif | |
116 | // _WX_CHECKBOX_H_ |