]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/checkbox.h
_MSC_VER => __VISUALC__ change
[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
21WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
22
23// Checkbox item (single checkbox)
24class WXDLLEXPORT wxBitmap;
25class WXDLLEXPORT wxCheckBox: public wxControl
26{
27 DECLARE_DYNAMIC_CLASS(wxCheckBox)
28
29 public:
30 inline wxCheckBox(void) { }
debe6624 31 inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
2bda0e17 32 const wxPoint& pos = wxDefaultPosition,
debe6624 33 const wxSize& size = wxDefaultSize, long style = 0,
2bda0e17
KB
34 const wxValidator& validator = wxDefaultValidator,
35 const wxString& name = wxCheckBoxNameStr)
36 {
37 Create(parent, id, label, pos, size, style, validator, name);
38 }
39
debe6624 40 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
2bda0e17 41 const wxPoint& pos = wxDefaultPosition,
debe6624 42 const wxSize& size = wxDefaultSize, long style = 0,
2bda0e17
KB
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxCheckBoxNameStr);
debe6624 45 virtual void SetValue(bool);
2bda0e17 46 virtual bool GetValue(void) const ;
debe6624 47 virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
4fabb575
JS
48 void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
49 { wxWindow::SetSize(rect, sizeFlags); }
50 void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
51
debe6624 52 virtual bool MSWCommand(WXUINT param, WXWORD id);
2bda0e17
KB
53 virtual void SetLabel(const wxString& label);
54 virtual void Command(wxCommandEvent& event);
debe6624 55 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
2bda0e17
KB
56 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
57};
58
59class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
60{
61 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
62
63 public:
64 int checkWidth ;
65 int checkHeight ;
66
67 inline wxBitmapCheckBox(void) { checkWidth = -1; checkHeight = -1; }
debe6624 68 inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
2bda0e17 69 const wxPoint& pos = wxDefaultPosition,
debe6624 70 const wxSize& size = wxDefaultSize, long style = 0,
2bda0e17
KB
71 const wxValidator& validator = wxDefaultValidator,
72 const wxString& name = wxCheckBoxNameStr)
73 {
74 Create(parent, id, label, pos, size, style, validator, name);
75 }
76
debe6624 77 bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
2bda0e17 78 const wxPoint& pos = wxDefaultPosition,
debe6624 79 const wxSize& size = wxDefaultSize, long style = 0,
2bda0e17
KB
80 const wxValidator& validator = wxDefaultValidator,
81 const wxString& name = wxCheckBoxNameStr);
debe6624 82 virtual void SetValue(bool);
2bda0e17 83 virtual bool GetValue(void) const ;
debe6624 84 virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
4fabb575
JS
85 void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
86 { wxWindow::SetSize(rect, sizeFlags); }
87 void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
88
2bda0e17
KB
89 virtual void SetLabel(const wxBitmap *bitmap);
90};
91#endif
bbcdf8bc 92 // _WX_CHECKBOX_H_