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
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CHECKBOX_H_
|
|
|
|
#define _WX_CHECKBOX_H_
|
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1998-09-18 06:19:10 -04:00
|
|
|
#pragma interface "checkbox.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/control.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;
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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_
|