1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: checkbox.h
|
|
|
|
// Purpose: wxCheckBox class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CHECKBOX_H_
|
|
|
|
#define _WX_CHECKBOX_H_
|
|
|
|
|
2003-08-09 12:38:21 +00:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1998-09-18 10:19:10 +00:00
|
|
|
#pragma interface "checkbox.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
// Checkbox item (single checkbox)
|
2002-07-28 20:50:37 +00:00
|
|
|
class WXDLLEXPORT wxCheckBox: public wxCheckBoxBase
|
1998-09-18 10:19:10 +00:00
|
|
|
{
|
2002-02-05 16:34:33 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
|
|
|
|
|
|
|
public:
|
2003-02-12 18:20:23 +00:00
|
|
|
inline wxCheckBox() { Init(); }
|
2002-02-05 16:34:33 +00: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 18:20:23 +00:00
|
|
|
Init();
|
|
|
|
|
2002-02-05 16:34:33 +00: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 18:20:23 +00:00
|
|
|
private:
|
|
|
|
// common part of all constructors
|
|
|
|
void Init()
|
|
|
|
{
|
|
|
|
m_evtType = wxEVT_COMMAND_CHECKBOX_CLICKED;
|
|
|
|
}
|
|
|
|
|
|
|
|
// public for the callback
|
|
|
|
public:
|
|
|
|
// either exEVT_COMMAND_CHECKBOX_CLICKED or ..._TOGGLEBUTTON_CLICKED
|
|
|
|
wxEventType m_evtType;
|
1998-09-18 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 16:34:33 +00:00
|
|
|
// _WX_CHECKBOX_H_
|