2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: checkbox.h
|
|
|
|
// Purpose: wxCheckBox class
|
|
|
|
// Author: Stefan Csomor
|
|
|
|
// Modified by:
|
|
|
|
// Created: 1998-01-01
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Stefan Csomor
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CHECKBOX_H_
|
|
|
|
#define _WX_CHECKBOX_H_
|
|
|
|
|
|
|
|
// Checkbox item (single checkbox)
|
|
|
|
class WXDLLEXPORT wxCheckBox : public wxCheckBoxBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxCheckBox() { }
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
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;
|
|
|
|
|
2004-04-13 01:28:25 -04:00
|
|
|
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
|
2004-03-23 12:35:05 -05:00
|
|
|
virtual void Command(wxCommandEvent& event);
|
|
|
|
|
2006-02-08 16:47:09 -05:00
|
|
|
protected:
|
|
|
|
void DoSet3StateValue(wxCheckBoxState val);
|
|
|
|
virtual wxCheckBoxState DoGet3StateValue() const;
|
|
|
|
|
2004-03-23 12:35:05 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
|
|
|
};
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
2004-03-23 12:35:05 -05:00
|
|
|
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
int checkWidth;
|
|
|
|
int checkHeight;
|
|
|
|
|
|
|
|
wxBitmapCheckBox()
|
|
|
|
: checkWidth(-1), checkHeight(-1)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCheckBoxNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
|
|
|
|
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 SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
|
|
|
virtual void SetLabel(const wxBitmap *bitmap);
|
|
|
|
virtual void SetLabel( const wxString & WXUNUSED(name) ) {}
|
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
// _WX_CHECKBOX_H_
|