]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/checkbox.h
don't try to build shared library on platforms not supporting it
[wxWidgets.git] / include / wx / msw / checkbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: checkbox.h
3 // Purpose: wxCheckBox class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CHECKBOX_H_
13 #define _WX_CHECKBOX_H_
14
15 #ifdef __GNUG__
16 #pragma interface "checkbox.h"
17 #endif
18
19 #include "wx/control.h"
20
21 WXDLLEXPORT_DATA(extern const wxChar*) wxCheckBoxNameStr;
22
23 // Checkbox item (single checkbox)
24 class WXDLLEXPORT wxBitmap;
25 class WXDLLEXPORT wxCheckBox : public wxControl
26 {
27 DECLARE_DYNAMIC_CLASS(wxCheckBox)
28
29 public:
30 wxCheckBox() { }
31 wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize, long style = 0,
34 const wxValidator& validator = wxDefaultValidator,
35 const wxString& name = wxCheckBoxNameStr)
36 {
37 Create(parent, id, label, pos, size, style, validator, name);
38 }
39
40 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize, long style = 0,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxCheckBoxNameStr);
45
46 virtual void SetValue(bool value);
47 virtual bool GetValue() const ;
48
49 virtual bool MSWCommand(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();
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 wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
68 wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
69 const wxPoint& pos = wxDefaultPosition,
70 const wxSize& size = wxDefaultSize, long style = 0,
71 const wxValidator& validator = wxDefaultValidator,
72 const wxString& name = wxCheckBoxNameStr)
73 {
74 Create(parent, id, label, pos, size, style, validator, name);
75 }
76
77 bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
78 const wxPoint& pos = wxDefaultPosition,
79 const wxSize& size = wxDefaultSize, long style = 0,
80 const wxValidator& validator = wxDefaultValidator,
81 const wxString& name = wxCheckBoxNameStr);
82
83 virtual void SetLabel(const wxBitmap& bitmap);
84 };
85 #endif
86 // _WX_CHECKBOX_H_