]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/checkbox.h
Motif compilation 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 # if defined(__VISAGECPP__)
32 const wxValidator* validator = wxDefaultValidator,
33 # else
34 const wxValidator& validator = wxDefaultValidator,
35 # endif
36 #endif
37 const wxString& name = wxCheckBoxNameStr)
38 {
39 Create(parent, id, label, pos, size, style, validator, name);
40 }
41
42 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize, long style = 0,
45 #if wxUSE_VALIDATORS
46 # if defined(__VISAGECPP__)
47 const wxValidator* validator = wxDefaultValidator,
48 # else
49 const wxValidator& validator = wxDefaultValidator,
50 # endif
51 #endif
52 const wxString& name = wxCheckBoxNameStr);
53
54 virtual void SetValue(bool);
55 virtual bool GetValue() const ;
56
57 virtual bool OS2Command(WXUINT param, WXWORD id);
58 virtual void SetLabel(const wxString& label);
59 virtual void Command(wxCommandEvent& event);
60 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
61 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
62
63 protected:
64 virtual wxSize DoGetBestSize();
65 };
66
67 class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
68 {
69 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
70
71 public:
72 int checkWidth ;
73 int checkHeight ;
74
75 inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
76 inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
77 const wxPoint& pos = wxDefaultPosition,
78 const wxSize& size = wxDefaultSize, long style = 0,
79 #if wxUSE_VALIDATORS
80 # if defined(__VISAGECPP__)
81 const wxValidator* validator = wxDefaultValidator,
82 # else
83 const wxValidator& validator = wxDefaultValidator,
84 # endif
85 #endif
86 const wxString& name = wxCheckBoxNameStr)
87 {
88 Create(parent, id, label, pos, size, style, validator, name);
89 }
90
91 bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
92 const wxPoint& pos = wxDefaultPosition,
93 const wxSize& size = wxDefaultSize, long style = 0,
94 #if wxUSE_VALIDATORS
95 # if defined(__VISAGECPP__)
96 const wxValidator* validator = wxDefaultValidator,
97 # else
98 const wxValidator& validator = wxDefaultValidator,
99 # endif
100 #endif
101 const wxString& name = wxCheckBoxNameStr);
102
103 virtual void SetLabel(const wxBitmap& bitmap);
104 private:
105 virtual void SetLabel(const wxString& string)
106 { wxCheckBox::SetLabel(string); };
107 };
108 #endif
109 // _WX_CHECKBOX_H_