]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/checkbox.h
Same as last one..
[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$
8// Copyright: (c) Julian Smart and Markus Holzem
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef __CHECKBOXH__
13#define __CHECKBOXH__
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) { }
31 inline wxCheckBox(wxWindow *parent, const wxWindowID id, const wxString& label,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize, const 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, const wxWindowID id, const wxString& label,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize, const long style = 0,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxCheckBoxNameStr);
45 virtual void SetValue(const bool);
46 virtual bool GetValue(void) const ;
47 virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
48 virtual bool MSWCommand(const WXUINT param, const WXWORD id);
49 virtual void SetLabel(const wxString& label);
50 virtual void Command(wxCommandEvent& event);
51 virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
52 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
53};
54
55class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
56{
57 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
58
59 public:
60 int checkWidth ;
61 int checkHeight ;
62
63 inline wxBitmapCheckBox(void) { checkWidth = -1; checkHeight = -1; }
64 inline wxBitmapCheckBox(wxWindow *parent, const wxWindowID id, const wxBitmap *label,
65 const wxPoint& pos = wxDefaultPosition,
66 const wxSize& size = wxDefaultSize, const long style = 0,
67 const wxValidator& validator = wxDefaultValidator,
68 const wxString& name = wxCheckBoxNameStr)
69 {
70 Create(parent, id, label, pos, size, style, validator, name);
71 }
72
73 bool Create(wxWindow *parent, const wxWindowID id, const wxBitmap *bitmap,
74 const wxPoint& pos = wxDefaultPosition,
75 const wxSize& size = wxDefaultSize, const long style = 0,
76 const wxValidator& validator = wxDefaultValidator,
77 const wxString& name = wxCheckBoxNameStr);
78 virtual void SetValue(const bool);
79 virtual bool GetValue(void) const ;
80 virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
81 virtual void SetLabel(const wxBitmap *bitmap);
82};
83#endif
84 // __CHECKBOXH__