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