1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: checkbox.h
|
|
|
|
// Purpose: wxCheckBox class
|
1999-10-14 04:43:46 +00:00
|
|
|
// Author: David Webster
|
1999-07-29 05:11:30 +00:00
|
|
|
// Modified by:
|
1999-10-14 04:43:46 +00:00
|
|
|
// Created: 10/13/99
|
1999-07-29 05:11:30 +00:00
|
|
|
// RCS-ID: $Id$
|
1999-10-14 04:43:46 +00:00
|
|
|
// Copyright: (c) David Webster
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CHECKBOX_H_
|
|
|
|
#define _WX_CHECKBOX_H_
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
// Checkbox item (single checkbox)
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
2001-07-06 21:45:11 +00:00
|
|
|
class WXDLLEXPORT wxCheckBox : public wxCheckBoxBase
|
1999-07-29 05:11:30 +00:00
|
|
|
{
|
|
|
|
public:
|
2002-01-07 00:44:31 +00:00
|
|
|
inline wxCheckBox() { }
|
|
|
|
inline wxCheckBox( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxString& rsLabel
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = 0
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxCheckBoxNameStr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
Create( pParent
|
|
|
|
,vId
|
|
|
|
,rsLabel
|
|
|
|
,rPos
|
|
|
|
,rSize
|
|
|
|
,lStyle
|
|
|
|
,rValidator
|
|
|
|
,rsName
|
|
|
|
);
|
|
|
|
}
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2002-01-07 00:44:31 +00:00
|
|
|
bool Create( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxString& rsLabel
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = 0
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxCheckBoxNameStr
|
|
|
|
);
|
1999-10-14 04:43:46 +00:00
|
|
|
|
2002-01-07 00:44:31 +00:00
|
|
|
virtual void SetValue(bool bValue);
|
|
|
|
virtual bool GetValue(void) const ;
|
1999-10-14 04:43:46 +00:00
|
|
|
|
2002-01-07 00:44:31 +00:00
|
|
|
virtual bool OS2Command( WXUINT uParam
|
|
|
|
,WXWORD wId
|
|
|
|
);
|
|
|
|
virtual void SetLabel(const wxString& rsLabel);
|
|
|
|
virtual void Command(wxCommandEvent& rEvent);
|
1999-10-14 04:43:46 +00:00
|
|
|
|
|
|
|
protected:
|
2002-01-07 00:44:31 +00:00
|
|
|
virtual wxSize DoGetBestSize(void) const;
|
2001-07-06 21:45:11 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
1999-07-29 05:11:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2002-01-07 00:44:31 +00:00
|
|
|
inline wxBitmapCheckBox() { m_nCheckWidth = -1; m_nCheckHeight = -1; }
|
|
|
|
inline wxBitmapCheckBox( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxBitmap* pLabel
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = 0
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxCheckBoxNameStr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
Create( pParent
|
|
|
|
,vId
|
|
|
|
,pLabel
|
|
|
|
,rPos
|
|
|
|
,rSize
|
|
|
|
,lStyle
|
|
|
|
,rValidator
|
|
|
|
,rsName
|
|
|
|
);
|
|
|
|
}
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2002-01-07 00:44:31 +00:00
|
|
|
bool Create( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxBitmap* pLabel
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = 0
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxCheckBoxNameStr
|
|
|
|
);
|
|
|
|
|
|
|
|
virtual void SetLabel(const wxBitmap& rBitmap);
|
|
|
|
|
|
|
|
int m_nCheckWidth;
|
|
|
|
int m_nCheckHeight;
|
1999-10-14 04:43:46 +00:00
|
|
|
|
1999-07-29 05:11:30 +00:00
|
|
|
private:
|
2002-01-07 00:44:31 +00:00
|
|
|
|
|
|
|
virtual void SetLabel(const wxString& rsString)
|
|
|
|
{ wxCheckBox::SetLabel(rsString); };
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
|
1999-07-29 05:11:30 +00:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
// _WX_CHECKBOX_H_
|