]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/checkbox.h
Applied patch [ 1325207 ] Fixes unicode build using Solaris with Sun's SunPro compiler
[wxWidgets.git] / include / wx / motif / checkbox.h
CommitLineData
9b6dbb09
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: checkbox.h
3// Purpose: wxCheckBox class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CHECKBOX_H_
13#define _WX_CHECKBOX_H_
14
9b6dbb09 15// Checkbox item (single checkbox)
18128cbb 16class WXDLLEXPORT wxCheckBox: public wxCheckBoxBase
9b6dbb09 17{
83df96d6
JS
18 DECLARE_DYNAMIC_CLASS(wxCheckBox)
19
20public:
08e5319b 21 inline wxCheckBox() { Init(); }
83df96d6
JS
22 inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize, long style = 0,
25 const wxValidator& validator = wxDefaultValidator,
26 const wxString& name = wxCheckBoxNameStr)
27 {
08e5319b
MB
28 Init();
29
83df96d6
JS
30 Create(parent, id, label, pos, size, style, validator, name);
31 }
32
33 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize, long style = 0,
36 const wxValidator& validator = wxDefaultValidator,
37 const wxString& name = wxCheckBoxNameStr);
38 virtual void SetValue(bool);
39 virtual bool GetValue() const ;
40 virtual void Command(wxCommandEvent& event);
41
42 // Implementation
83df96d6 43 virtual void ChangeBackgroundColour();
08e5319b
MB
44private:
45 // common part of all constructors
46 void Init()
47 {
48 m_evtType = wxEVT_COMMAND_CHECKBOX_CLICKED;
49 }
50
f8ab089a
MB
51 virtual void DoSet3StateValue(wxCheckBoxState state);
52
53 virtual wxCheckBoxState DoGet3StateValue() const;
54
08e5319b
MB
55 // public for the callback
56public:
57 // either exEVT_COMMAND_CHECKBOX_CLICKED or ..._TOGGLEBUTTON_CLICKED
58 wxEventType m_evtType;
9b6dbb09
JS
59};
60
9b6dbb09 61#endif
83df96d6 62// _WX_CHECKBOX_H_