]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/checkbox.h
removed unsecure wxTmpnam() function (patch by Francesco Montorsi)
[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 8// Copyright: (c) David Webster
65571936 9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CHECKBOX_H_
13#define _WX_CHECKBOX_H_
14
0e320a79 15#include "wx/control.h"
0e320a79
DW
16
17// Checkbox item (single checkbox)
18class WXDLLEXPORT wxBitmap;
210a651b 19class WXDLLEXPORT wxCheckBox : public wxCheckBoxBase
0e320a79 20{
0e320a79 21 public:
3011bf2b
DW
22 inline wxCheckBox() { }
23 inline wxCheckBox( wxWindow* pParent
24 ,wxWindowID vId
25 ,const wxString& rsLabel
26 ,const wxPoint& rPos = wxDefaultPosition
27 ,const wxSize& rSize = wxDefaultSize
28 ,long lStyle = 0
3011bf2b 29 ,const wxValidator& rValidator = wxDefaultValidator
3011bf2b
DW
30 ,const wxString& rsName = wxCheckBoxNameStr
31 )
32 {
33 Create( pParent
34 ,vId
35 ,rsLabel
36 ,rPos
37 ,rSize
38 ,lStyle
3011bf2b 39 ,rValidator
3011bf2b
DW
40 ,rsName
41 );
42 }
0e320a79 43
3011bf2b
DW
44 bool Create( wxWindow* pParent
45 ,wxWindowID vId
46 ,const wxString& rsLabel
47 ,const wxPoint& rPos = wxDefaultPosition
48 ,const wxSize& rSize = wxDefaultSize
49 ,long lStyle = 0
3011bf2b 50 ,const wxValidator& rValidator = wxDefaultValidator
3011bf2b
DW
51 ,const wxString& rsName = wxCheckBoxNameStr
52 );
37f214d5 53
3011bf2b
DW
54 virtual void SetValue(bool bValue);
55 virtual bool GetValue(void) const ;
37f214d5 56
3011bf2b
DW
57 virtual bool OS2Command( WXUINT uParam
58 ,WXWORD wId
59 );
60 virtual void SetLabel(const wxString& rsLabel);
61 virtual void Command(wxCommandEvent& rEvent);
37f214d5
DW
62
63protected:
3011bf2b 64 virtual wxSize DoGetBestSize(void) const;
210a651b
DW
65private:
66 DECLARE_DYNAMIC_CLASS(wxCheckBox)
0e320a79
DW
67};
68
69class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
70{
0e320a79 71 public:
0e320a79 72
3011bf2b
DW
73 inline wxBitmapCheckBox() { m_nCheckWidth = -1; m_nCheckHeight = -1; }
74 inline wxBitmapCheckBox( wxWindow* pParent
75 ,wxWindowID vId
76 ,const wxBitmap* pLabel
77 ,const wxPoint& rPos = wxDefaultPosition
78 ,const wxSize& rSize = wxDefaultSize
79 ,long lStyle = 0
3011bf2b 80 ,const wxValidator& rValidator = wxDefaultValidator
3011bf2b
DW
81 ,const wxString& rsName = wxCheckBoxNameStr
82 )
83 {
84 Create( pParent
85 ,vId
86 ,pLabel
87 ,rPos
88 ,rSize
89 ,lStyle
90 ,rValidator
91 ,rsName
92 );
93 }
0e320a79 94
3011bf2b
DW
95 bool Create( wxWindow* pParent
96 ,wxWindowID vId
97 ,const wxBitmap* pLabel
98 ,const wxPoint& rPos = wxDefaultPosition
99 ,const wxSize& rSize = wxDefaultSize
100 ,long lStyle = 0
3011bf2b 101 ,const wxValidator& rValidator = wxDefaultValidator
3011bf2b
DW
102 ,const wxString& rsName = wxCheckBoxNameStr
103 );
104
105 virtual void SetLabel(const wxBitmap& rBitmap);
106
107 int m_nCheckWidth;
108 int m_nCheckHeight;
37f214d5 109
0e320a79 110private:
3011bf2b
DW
111
112 virtual void SetLabel(const wxString& rsString)
113 { wxCheckBox::SetLabel(rsString); };
114 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
0e320a79
DW
115};
116#endif
117 // _WX_CHECKBOX_H_