]>
git.saurik.com Git - wxWidgets.git/blob - src/qt/checkbox.cpp
1 /////////////////////////////////////////////////////////////////////////////
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "checkbox.h"
16 #include "wx/checkbox.h"
18 IMPLEMENT_DYNAMIC_CLASS(wxCheckBox
, wxControl
)
19 IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox
, wxCheckBox
)
21 // Single check box item
22 bool wxCheckBox::Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
24 const wxSize
& size
, long style
,
25 const wxValidator
& validator
,
29 SetValidator(validator
);
30 m_windowStyle
= style
;
32 if (parent
) parent
->AddChild(this);
35 m_windowId
= NewControlId();
39 // TODO: create checkbox
44 void wxCheckBox::SetLabel(const wxString
& label
)
49 void wxCheckBox::SetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
54 void wxCheckBox::SetValue(bool val
)
59 bool wxCheckBox::GetValue() const
65 void wxCheckBox::Command (wxCommandEvent
& event
)
67 SetValue ((event
.GetInt() != 0));
68 ProcessCommand (event
);
72 bool wxBitmapCheckBox::Create(wxWindow
*parent
, wxWindowID id
, const wxBitmap
*label
,
74 const wxSize
& size
, long style
,
75 const wxValidator
& validator
,
79 SetValidator(validator
);
80 m_windowStyle
= style
;
82 if (parent
) parent
->AddChild(this);
85 m_windowId
= NewControlId();
89 // TODO: Create the bitmap checkbox
94 void wxBitmapCheckBox::SetLabel(const wxBitmap
*bitmap
)
99 void wxBitmapCheckBox::SetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
104 void wxBitmapCheckBox::SetValue(bool val
)
109 bool wxBitmapCheckBox::GetValue() const