]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/checkbox.h
wxStrnicmp() function is not defined under windows, so I've provided a workaround...
[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;
21class 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 const wxValidator& validator = wxDefaultValidator,
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,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxCheckBoxNameStr);
37f214d5 41
0e320a79
DW
42 virtual void SetValue(bool);
43 virtual bool GetValue() const ;
37f214d5
DW
44
45 virtual bool OS2Command(WXUINT param, WXWORD id);
0e320a79
DW
46 virtual void SetLabel(const wxString& label);
47 virtual void Command(wxCommandEvent& event);
37f214d5
DW
48 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
49 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
50
51protected:
52 virtual wxSize DoGetBestSize();
0e320a79
DW
53};
54
55class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
56{
57 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
58
59 public:
60 int checkWidth ;
61 int checkHeight ;
62
63 inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
64 inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
65 const wxPoint& pos = wxDefaultPosition,
66 const wxSize& size = wxDefaultSize, long style = 0,
67 const wxValidator& validator = wxDefaultValidator,
68 const wxString& name = wxCheckBoxNameStr)
69 {
70 Create(parent, id, label, pos, size, style, validator, name);
71 }
72
73 bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
74 const wxPoint& pos = wxDefaultPosition,
75 const wxSize& size = wxDefaultSize, long style = 0,
76 const wxValidator& validator = wxDefaultValidator,
77 const wxString& name = wxCheckBoxNameStr);
37f214d5 78
0e320a79
DW
79 virtual void SetLabel(const wxBitmap& bitmap);
80private:
54da4255
DW
81 virtual void SetLabel(const wxString& string)
82 { wxCheckBox::SetLabel(string); };
0e320a79
DW
83};
84#endif
85 // _WX_CHECKBOX_H_