1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-07-25 10:31:55 -04:00
|
|
|
// Name: wx/motif/checkbox.h
|
1998-09-18 06:19:10 -04:00
|
|
|
// Purpose: wxCheckBox class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2006-07-25 10:31:55 -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)
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxCheckBox: public wxCheckBoxBase
|
1998-09-18 06:19:10 -04:00
|
|
|
{
|
2002-02-05 11:34:33 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
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);
|
|
|
|
}
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
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);
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
// 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_
|