]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/checkbox.h
added wxEVT_SCROLL_CHANGED as synonym for wxEVT_SCROLL_ENDSCROLL
[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
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
9b6dbb09
JS
16#pragma interface "checkbox.h"
17#endif
18
9b6dbb09 19// Checkbox item (single checkbox)
18128cbb 20class WXDLLEXPORT wxCheckBox: public wxCheckBoxBase
9b6dbb09 21{
83df96d6
JS
22 DECLARE_DYNAMIC_CLASS(wxCheckBox)
23
24public:
08e5319b 25 inline wxCheckBox() { Init(); }
83df96d6
JS
26 inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize, long style = 0,
29 const wxValidator& validator = wxDefaultValidator,
30 const wxString& name = wxCheckBoxNameStr)
31 {
08e5319b
MB
32 Init();
33
83df96d6
JS
34 Create(parent, id, label, pos, size, style, validator, name);
35 }
36
37 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize, long style = 0,
40 const wxValidator& validator = wxDefaultValidator,
41 const wxString& name = wxCheckBoxNameStr);
42 virtual void SetValue(bool);
43 virtual bool GetValue() const ;
44 virtual void Command(wxCommandEvent& event);
45
46 // Implementation
83df96d6 47 virtual void ChangeBackgroundColour();
08e5319b
MB
48private:
49 // common part of all constructors
50 void Init()
51 {
52 m_evtType = wxEVT_COMMAND_CHECKBOX_CLICKED;
53 }
54
f8ab089a
MB
55 virtual void DoSet3StateValue(wxCheckBoxState state);
56
57 virtual wxCheckBoxState DoGet3StateValue() const;
58
08e5319b
MB
59 // public for the callback
60public:
61 // either exEVT_COMMAND_CHECKBOX_CLICKED or ..._TOGGLEBUTTON_CLICKED
62 wxEventType m_evtType;
9b6dbb09
JS
63};
64
9b6dbb09 65#endif
83df96d6 66// _WX_CHECKBOX_H_