]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/checkbox.h
DC updates
[wxWidgets.git] / include / wx / msw / checkbox.h
CommitLineData
2bda0e17
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: checkbox.h
3// Purpose: wxCheckBox class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc
JS
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_CHECKBOX_H_
13#define _WX_CHECKBOX_H_
2bda0e17
KB
14
15#ifdef __GNUG__
16#pragma interface "checkbox.h"
17#endif
18
19#include "wx/control.h"
20
32c1cda2 21WXDLLEXPORT_DATA(extern const wxChar*) wxCheckBoxNameStr;
2bda0e17
KB
22
23// Checkbox item (single checkbox)
24class WXDLLEXPORT wxBitmap;
bfc6fde4 25class WXDLLEXPORT wxCheckBox : public wxControl
2bda0e17 26{
bfc6fde4
VZ
27DECLARE_DYNAMIC_CLASS(wxCheckBox)
28
29public:
30 wxCheckBox() { }
31 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
46 virtual void SetValue(bool value);
47 virtual bool GetValue() const ;
48
49 virtual bool MSWCommand(WXUINT param, WXWORD id);
50 virtual void SetLabel(const wxString& label);
51 virtual void Command(wxCommandEvent& event);
bfc6fde4
VZ
52
53protected:
f68586e5 54 virtual wxSize DoGetBestSize() const;
2bda0e17
KB
55};
56
57class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
58{
bfc6fde4
VZ
59DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
60
61public:
62 int checkWidth ;
63 int checkHeight ;
64
65 wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
66 wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
67 const wxPoint& pos = wxDefaultPosition,
68 const wxSize& size = wxDefaultSize, long style = 0,
69 const wxValidator& validator = wxDefaultValidator,
70 const wxString& name = wxCheckBoxNameStr)
71 {
72 Create(parent, id, label, pos, size, style, validator, name);
73 }
74
75 bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
76 const wxPoint& pos = wxDefaultPosition,
77 const wxSize& size = wxDefaultSize, long style = 0,
78 const wxValidator& validator = wxDefaultValidator,
79 const wxString& name = wxCheckBoxNameStr);
80
bfc6fde4 81 virtual void SetLabel(const wxBitmap& bitmap);
2bda0e17
KB
82};
83#endif
bbcdf8bc 84 // _WX_CHECKBOX_H_