]>
Commit | Line | Data |
---|---|---|
5c6eb3a8 SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: checkbox.h | |
3 | // Purpose: wxCheckBox class | |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 1998-01-01 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Stefan Csomor | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_CHECKBOX_H_ | |
13 | #define _WX_CHECKBOX_H_ | |
14 | ||
15 | // Checkbox item (single checkbox) | |
16 | class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase | |
17 | { | |
18 | public: | |
19 | wxCheckBox() { } | |
20 | wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label, | |
21 | const wxPoint& pos = wxDefaultPosition, | |
22 | const wxSize& size = wxDefaultSize, long style = 0, | |
23 | const wxValidator& validator = wxDefaultValidator, | |
24 | const wxString& name = wxCheckBoxNameStr) | |
25 | { | |
26 | Create(parent, id, label, pos, size, style, validator, name); | |
27 | } | |
28 | ||
29 | bool Create(wxWindow *parent, wxWindowID id, const wxString& label, | |
30 | const wxPoint& pos = wxDefaultPosition, | |
31 | const wxSize& size = wxDefaultSize, long style = 0, | |
32 | const wxValidator& validator = wxDefaultValidator, | |
33 | const wxString& name = wxCheckBoxNameStr); | |
34 | virtual void SetValue(bool); | |
35 | virtual bool GetValue() const; | |
36 | ||
5c6eb3a8 SC |
37 | virtual void Command(wxCommandEvent& event); |
38 | ||
524c47aa SC |
39 | // osx specific event handling common for all osx-ports |
40 | ||
41 | virtual bool HandleClicked( double timestampsec ); | |
5c6eb3a8 SC |
42 | protected: |
43 | void DoSet3StateValue(wxCheckBoxState val); | |
44 | virtual wxCheckBoxState DoGet3StateValue() const; | |
45 | ||
46 | DECLARE_DYNAMIC_CLASS(wxCheckBox) | |
47 | }; | |
48 | ||
49 | class WXDLLIMPEXP_FWD_CORE wxBitmap; | |
50 | class WXDLLIMPEXP_CORE wxBitmapCheckBox: public wxCheckBox | |
51 | { | |
52 | public: | |
53 | int checkWidth; | |
54 | int checkHeight; | |
55 | ||
56 | wxBitmapCheckBox() | |
57 | : checkWidth(-1), checkHeight(-1) | |
58 | { } | |
59 | ||
60 | wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label, | |
61 | const wxPoint& pos = wxDefaultPosition, | |
62 | const wxSize& size = wxDefaultSize, long style = 0, | |
63 | const wxValidator& validator = wxDefaultValidator, | |
64 | const wxString& name = wxCheckBoxNameStr) | |
65 | { | |
66 | Create(parent, id, label, pos, size, style, validator, name); | |
67 | } | |
68 | ||
69 | bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap, | |
70 | const wxPoint& pos = wxDefaultPosition, | |
71 | const wxSize& size = wxDefaultSize, long style = 0, | |
72 | const wxValidator& validator = wxDefaultValidator, | |
73 | const wxString& name = wxCheckBoxNameStr); | |
74 | virtual void SetValue(bool); | |
75 | virtual bool GetValue() const; | |
76 | virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); | |
77 | virtual void SetLabel(const wxBitmap *bitmap); | |
78 | virtual void SetLabel( const wxString & WXUNUSED(name) ) {} | |
79 | ||
80 | DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox) | |
81 | }; | |
82 | #endif | |
83 | // _WX_CHECKBOX_H_ |