]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/checkbox.h
Lots of updates for color dialog and sliders
[wxWidgets.git] / include / wx / msw / checkbox.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/checkbox.h
3// Purpose: wxCheckBox class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
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// Checkbox item (single checkbox)
20class WXDLLEXPORT wxBitmap;
21class WXDLLEXPORT wxCheckBox : public wxCheckBoxBase
22{
23public:
24 wxCheckBox() { }
25 wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize, long style = 0,
28 const wxValidator& validator = wxDefaultValidator,
29 const wxString& name = wxCheckBoxNameStr)
30 {
31 Create(parent, id, label, pos, size, style, validator, name);
32 }
33
34 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize, long style = 0,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxCheckBoxNameStr);
39
40 virtual void SetValue(bool value);
41 virtual bool GetValue() const ;
42
43 virtual bool MSWCommand(WXUINT param, WXWORD id);
44 virtual void SetLabel(const wxString& label);
45 virtual void Command(wxCommandEvent& event);
46
47protected:
48 virtual wxSize DoGetBestSize() const;
49
50private:
51 DECLARE_DYNAMIC_CLASS(wxCheckBox)
52};
53
54class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
55{
56DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
57
58public:
59 int checkWidth ;
60 int checkHeight ;
61
62 wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
63 wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
64 const wxPoint& pos = wxDefaultPosition,
65 const wxSize& size = wxDefaultSize, long style = 0,
66 const wxValidator& validator = wxDefaultValidator,
67 const wxString& name = wxCheckBoxNameStr)
68 {
69 Create(parent, id, label, pos, size, style, validator, name);
70 }
71
72 bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
73 const wxPoint& pos = wxDefaultPosition,
74 const wxSize& size = wxDefaultSize, long style = 0,
75 const wxValidator& validator = wxDefaultValidator,
76 const wxString& name = wxCheckBoxNameStr);
77
78 virtual void SetLabel(const wxBitmap& bitmap);
79};
80
81#endif
82 // _WX_CHECKBOX_H_