]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/checkbox.h
Added function GetDefaultSize
[wxWidgets.git] / include / wx / os2 / checkbox.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: checkbox.h
3// Purpose: wxCheckBox class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
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#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() { }
31 inline 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 virtual void SetValue(bool);
46 virtual bool GetValue() const ;
47 virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
48 virtual void SetLabel(const wxString& label);
49 virtual void Command(wxCommandEvent& event);
50private:
51 void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
52};
53
54class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
55{
56 DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
57
58 public:
59 int checkWidth ;
60 int checkHeight ;
61
62 inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
63 inline 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 virtual void SetValue(bool);
78 virtual bool GetValue() const ;
79 virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
80 virtual void SetLabel(const wxBitmap& bitmap);
81private:
82 void SetSize(int width, int height) {wxWindow::SetSize(width, height);}
83 void SetLabel(const wxString& label) {wxCheckBox::SetLabel(label);}
84};
85#endif
86 // _WX_CHECKBOX_H_