More Motif stuff, minor stubs correction
[wxWidgets.git] / include / wx / motif / checkbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: checkbox.h
3 // Purpose: wxCheckBox class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CHECKBOX_H_
13 #define _WX_CHECKBOX_H_
14
15 #ifdef __GNUG__
16 #pragma interface "checkbox.h"
17 #endif
18
19 #include "wx/control.h"
20
21 WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
22
23 // Checkbox item (single checkbox)
24 class WXDLLEXPORT wxBitmap;
25 class WXDLLEXPORT wxCheckBox: public wxControl
26 {
27 DECLARE_DYNAMIC_CLASS(wxCheckBox)
28
29 public:
30 inline wxCheckBox() { }
31 inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize, long style = 0,
34 const wxValidator& validator = wxDefaultValidator,
35 const wxString& name = wxCheckBoxNameStr)
36 {
37 Create(parent, id, label, pos, size, style, validator, name);
38 }
39
40 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize, long style = 0,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxCheckBoxNameStr);
45 virtual void SetValue(bool);
46 virtual bool GetValue() const ;
47 virtual void Command(wxCommandEvent& event);
48 };
49
50 class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
51 {
52 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
53
54 public:
55 int checkWidth ;
56 int checkHeight ;
57
58 inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
59 inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
60 const wxPoint& pos = wxDefaultPosition,
61 const wxSize& size = wxDefaultSize, long style = 0,
62 const wxValidator& validator = wxDefaultValidator,
63 const wxString& name = wxCheckBoxNameStr)
64 {
65 Create(parent, id, label, pos, size, style, validator, name);
66 }
67
68 bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
69 const wxPoint& pos = wxDefaultPosition,
70 const wxSize& size = wxDefaultSize, long style = 0,
71 const wxValidator& validator = wxDefaultValidator,
72 const wxString& name = wxCheckBoxNameStr);
73 virtual void SetValue(bool);
74 virtual bool GetValue() const ;
75 virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
76 virtual void SetLabel(const wxBitmap *bitmap);
77 };
78 #endif
79 // _WX_CHECKBOX_H_