1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: checkbox.h
|
|
|
|
// Purpose: wxCheckBox class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CHECKBOX_H_
|
|
|
|
#define _WX_CHECKBOX_H_
|
|
|
|
|
|
|
|
// Checkbox item (single checkbox)
|
2002-07-28 16:50:37 -04:00
|
|
|
class WXDLLEXPORT wxCheckBox: public wxCheckBoxBase
|
1998-09-18 06:19:10 -04:00
|
|
|
{
|
2002-02-05 11:34:33 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
|
|
|
|
|
|
|
public:
|
2003-02-12 13:20:23 -05:00
|
|
|
inline wxCheckBox() { Init(); }
|
2002-02-05 11:34:33 -05:00
|
|
|
inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCheckBoxNameStr)
|
|
|
|
{
|
2003-02-12 13:20:23 -05:00
|
|
|
Init();
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
Create(parent, id, label, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCheckBoxNameStr);
|
|
|
|
virtual void SetValue(bool);
|
|
|
|
virtual bool GetValue() const ;
|
|
|
|
virtual void Command(wxCommandEvent& event);
|
|
|
|
|
|
|
|
// Implementation
|
|
|
|
virtual void ChangeBackgroundColour();
|
2003-02-12 13:20:23 -05:00
|
|
|
private:
|
|
|
|
// common part of all constructors
|
|
|
|
void Init()
|
|
|
|
{
|
|
|
|
m_evtType = wxEVT_COMMAND_CHECKBOX_CLICKED;
|
|
|
|
}
|
|
|
|
|
2004-06-05 17:01:06 -04:00
|
|
|
virtual void DoSet3StateValue(wxCheckBoxState state);
|
|
|
|
|
|
|
|
virtual wxCheckBoxState DoGet3StateValue() const;
|
|
|
|
|
2003-02-12 13:20:23 -05:00
|
|
|
// public for the callback
|
|
|
|
public:
|
|
|
|
// either exEVT_COMMAND_CHECKBOX_CLICKED or ..._TOGGLEBUTTON_CLICKED
|
|
|
|
wxEventType m_evtType;
|
1998-09-18 06:19:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 11:34:33 -05:00
|
|
|
// _WX_CHECKBOX_H_
|