]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/checkbox.h
warning fix
[wxWidgets.git] / include / wx / os2 / checkbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: checkbox.h
3 // Purpose: wxCheckBox class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/13/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CHECKBOX_H_
13 #define _WX_CHECKBOX_H_
14
15 #include "wx/control.h"
16
17 WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
18
19 // Checkbox item (single checkbox)
20 class WXDLLEXPORT wxBitmap;
21 class WXDLLEXPORT wxCheckBox: public wxControl
22 {
23 DECLARE_DYNAMIC_CLASS(wxCheckBox)
24
25 public:
26 inline wxCheckBox() { }
27 inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize, long style = 0,
30 #if wxUSE_VALIDATORS
31 const wxValidator& validator = wxDefaultValidator,
32 #endif
33 const wxString& name = wxCheckBoxNameStr)
34 {
35 Create(parent, id, label, pos, size, style, validator, name);
36 }
37
38 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize, long style = 0,
41 #if wxUSE_VALIDATORS
42 const wxValidator& validator = wxDefaultValidator,
43 #endif
44 const wxString& name = wxCheckBoxNameStr);
45
46 virtual void SetValue(bool);
47 virtual bool GetValue() const ;
48
49 virtual bool OS2Command(WXUINT param, WXWORD id);
50 virtual void SetLabel(const wxString& label);
51 virtual void Command(wxCommandEvent& event);
52 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
53 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
54
55 protected:
56 virtual wxSize DoGetBestSize() const;
57 };
58
59 class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
60 {
61 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
62
63 public:
64 int checkWidth ;
65 int checkHeight ;
66
67 inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
68 inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
69 const wxPoint& pos = wxDefaultPosition,
70 const wxSize& size = wxDefaultSize, long style = 0,
71 #if wxUSE_VALIDATORS
72 const wxValidator& validator = wxDefaultValidator,
73 #endif
74 const wxString& name = wxCheckBoxNameStr)
75 {
76 Create(parent, id, label, pos, size, style, validator, name);
77 }
78
79 bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
80 const wxPoint& pos = wxDefaultPosition,
81 const wxSize& size = wxDefaultSize, long style = 0,
82 #if wxUSE_VALIDATORS
83 const wxValidator& validator = wxDefaultValidator,
84 #endif
85 const wxString& name = wxCheckBoxNameStr);
86
87 virtual void SetLabel(const wxBitmap& bitmap);
88 private:
89 virtual void SetLabel(const wxString& string)
90 { wxCheckBox::SetLabel(string); };
91 };
92 #endif
93 // _WX_CHECKBOX_H_