]>
git.saurik.com Git - wxWidgets.git/blob - src/os2/checkbox.cpp
1 /////////////////////////////////////////////////////////////////////////////
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "checkbox.h"
16 #include "wx/checkbox.h"
18 #if !USE_SHARED_LIBRARY
19 IMPLEMENT_DYNAMIC_CLASS(wxCheckBox
, wxControl
)
20 IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox
, wxCheckBox
)
23 // Single check box item
24 bool wxCheckBox::Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
26 const wxSize
& size
, long style
,
27 const wxValidator
& validator
,
31 SetValidator(validator
);
32 m_windowStyle
= style
;
34 if (parent
) parent
->AddChild(this);
37 m_windowId
= NewControlId();
41 // TODO: create checkbox
46 void wxCheckBox::SetLabel(const wxString
& label
)
51 void wxCheckBox::SetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
56 void wxCheckBox::SetValue(bool val
)
61 bool wxCheckBox::GetValue() const
67 void wxCheckBox::Command (wxCommandEvent
& event
)
69 SetValue ((event
.GetInt() != 0));
70 ProcessCommand (event
);
74 bool wxBitmapCheckBox::Create(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*label
,
76 const wxSize
& size
, long style
,
77 const wxValidator
& validator
,
81 SetValidator(validator
);
82 m_windowStyle
= style
;
84 if (parent
) parent
->AddChild(this);
87 m_windowId
= NewControlId();
91 // TODO: Create the bitmap checkbox
96 void wxBitmapCheckBox::SetLabel(const wxBitmap
& bitmap
)
101 void wxBitmapCheckBox::SetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
106 void wxBitmapCheckBox::SetValue(bool val
)
111 bool wxBitmapCheckBox::GetValue() const