| 1 | ///////////////////////////////////////////////////////////////////////////// |
| 2 | // Name: checkbox.cpp |
| 3 | // Purpose: wxCheckBox |
| 4 | // Author: AUTHOR |
| 5 | // Modified by: |
| 6 | // Created: 04/01/98 |
| 7 | // RCS-ID: $Id$ |
| 8 | // Copyright: (c) AUTHOR |
| 9 | // Licence: wxWindows licence |
| 10 | ///////////////////////////////////////////////////////////////////////////// |
| 11 | |
| 12 | #ifdef __GNUG__ |
| 13 | #pragma implementation "checkbox.h" |
| 14 | #endif |
| 15 | |
| 16 | #include "wx/checkbox.h" |
| 17 | |
| 18 | IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) |
| 19 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) |
| 20 | |
| 21 | // Single check box item |
| 22 | bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, |
| 23 | const wxPoint& pos, |
| 24 | const wxSize& size, long style, |
| 25 | const wxValidator& validator, |
| 26 | const wxString& name) |
| 27 | { |
| 28 | SetName(name); |
| 29 | SetValidator(validator); |
| 30 | m_windowStyle = style; |
| 31 | |
| 32 | if (parent) parent->AddChild(this); |
| 33 | |
| 34 | if ( id == -1 ) |
| 35 | m_windowId = NewControlId(); |
| 36 | else |
| 37 | m_windowId = id; |
| 38 | |
| 39 | // TODO: create checkbox |
| 40 | |
| 41 | return FALSE; |
| 42 | } |
| 43 | |
| 44 | void wxCheckBox::SetLabel(const wxString& label) |
| 45 | { |
| 46 | // TODO |
| 47 | } |
| 48 | |
| 49 | void wxCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags) |
| 50 | { |
| 51 | // TODO |
| 52 | } |
| 53 | |
| 54 | void wxCheckBox::SetValue(bool val) |
| 55 | { |
| 56 | // TODO |
| 57 | } |
| 58 | |
| 59 | bool wxCheckBox::GetValue() const |
| 60 | { |
| 61 | // TODO |
| 62 | return FALSE; |
| 63 | } |
| 64 | |
| 65 | void wxCheckBox::Command (wxCommandEvent & event) |
| 66 | { |
| 67 | SetValue ((event.GetInt() != 0)); |
| 68 | ProcessCommand (event); |
| 69 | } |
| 70 | |
| 71 | // Bitmap checkbox |
| 72 | bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label, |
| 73 | const wxPoint& pos, |
| 74 | const wxSize& size, long style, |
| 75 | const wxValidator& validator, |
| 76 | const wxString& name) |
| 77 | { |
| 78 | SetName(name); |
| 79 | SetValidator(validator); |
| 80 | m_windowStyle = style; |
| 81 | |
| 82 | if (parent) parent->AddChild(this); |
| 83 | |
| 84 | if ( id == -1 ) |
| 85 | m_windowId = NewControlId(); |
| 86 | else |
| 87 | m_windowId = id; |
| 88 | |
| 89 | // TODO: Create the bitmap checkbox |
| 90 | |
| 91 | return FALSE; |
| 92 | } |
| 93 | |
| 94 | void wxBitmapCheckBox::SetLabel(const wxBitmap *bitmap) |
| 95 | { |
| 96 | // TODO |
| 97 | } |
| 98 | |
| 99 | void wxBitmapCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags) |
| 100 | { |
| 101 | // TODO |
| 102 | } |
| 103 | |
| 104 | void wxBitmapCheckBox::SetValue(bool val) |
| 105 | { |
| 106 | // TODO |
| 107 | } |
| 108 | |
| 109 | bool wxBitmapCheckBox::GetValue() const |
| 110 | { |
| 111 | // TODOD |
| 112 | return FALSE; |
| 113 | } |
| 114 | |
| 115 | |