]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/checkbox.h
compilation fixes (I wonder how did you people ever compile it...)
[wxWidgets.git] / include / wx / os2 / checkbox.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: checkbox.h
3// Purpose: wxCheckBox class
37f214d5 4// Author: David Webster
0e320a79 5// Modified by:
37f214d5 6// Created: 10/13/99
0e320a79 7// RCS-ID: $Id$
37f214d5
DW
8// Copyright: (c) David Webster
9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CHECKBOX_H_
13#define _WX_CHECKBOX_H_
14
0e320a79
DW
15#include "wx/control.h"
16
17WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
18
19// Checkbox item (single checkbox)
20class WXDLLEXPORT wxBitmap;
210a651b 21class WXDLLEXPORT wxCheckBox : public wxCheckBoxBase
0e320a79 22{
0e320a79
DW
23 public:
24 inline wxCheckBox() { }
25 inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize, long style = 0,
57c4d796 28#if wxUSE_VALIDATORS
0e320a79 29 const wxValidator& validator = wxDefaultValidator,
57c4d796 30#endif
0e320a79
DW
31 const wxString& name = wxCheckBoxNameStr)
32 {
33 Create(parent, id, label, pos, size, style, validator, name);
34 }
35
36 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize, long style = 0,
57c4d796 39#if wxUSE_VALIDATORS
0e320a79 40 const wxValidator& validator = wxDefaultValidator,
57c4d796 41#endif
0e320a79 42 const wxString& name = wxCheckBoxNameStr);
37f214d5 43
0e320a79
DW
44 virtual void SetValue(bool);
45 virtual bool GetValue() const ;
37f214d5
DW
46
47 virtual bool OS2Command(WXUINT param, WXWORD id);
0e320a79
DW
48 virtual void SetLabel(const wxString& label);
49 virtual void Command(wxCommandEvent& event);
37f214d5
DW
50 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
51 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
52
53protected:
e78c4d50 54 virtual wxSize DoGetBestSize() const;
210a651b
DW
55private:
56 DECLARE_DYNAMIC_CLASS(wxCheckBox)
0e320a79
DW
57};
58
59class 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,
57c4d796 71#if wxUSE_VALIDATORS
0e320a79 72 const wxValidator& validator = wxDefaultValidator,
57c4d796 73#endif
0e320a79
DW
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,
57c4d796 82#if wxUSE_VALIDATORS
0e320a79 83 const wxValidator& validator = wxDefaultValidator,
57c4d796 84#endif
0e320a79 85 const wxString& name = wxCheckBoxNameStr);
37f214d5 86
0e320a79
DW
87 virtual void SetLabel(const wxBitmap& bitmap);
88private:
54da4255
DW
89 virtual void SetLabel(const wxString& string)
90 { wxCheckBox::SetLabel(string); };
0e320a79
DW
91};
92#endif
93 // _WX_CHECKBOX_H_