1999-01-01 11:05:26 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: checkbox.h
|
|
|
|
// Purpose: wxCheckBox class
|
2003-02-28 16:54:04 -05:00
|
|
|
// Author: Stefan Csomor
|
1999-01-01 11:05:26 -05:00
|
|
|
// Modified by:
|
2003-02-28 16:54:04 -05:00
|
|
|
// Created: 1998-01-01
|
1999-01-01 11:05:26 -05:00
|
|
|
// RCS-ID: $Id$
|
2003-02-28 16:54:04 -05:00
|
|
|
// Copyright: (c) Stefan Csomor
|
2002-05-06 07:40:16 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-01-01 11:05:26 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CHECKBOX_H_
|
|
|
|
#define _WX_CHECKBOX_H_
|
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1999-01-01 11:05:26 -05:00
|
|
|
#pragma interface "checkbox.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Checkbox item (single checkbox)
|
2002-05-06 07:40:16 -04:00
|
|
|
class WXDLLEXPORT wxCheckBox : public wxCheckBoxBase
|
1999-01-01 11:05:26 -05:00
|
|
|
{
|
2002-05-06 07:40:16 -04:00
|
|
|
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);
|
|
|
|
}
|
1999-01-01 11:05:26 -05:00
|
|
|
|
2002-05-06 07:40:16 -04: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;
|
2003-09-27 20:23:08 -04:00
|
|
|
|
|
|
|
void DoSet3StateValue(wxCheckBoxState val);
|
|
|
|
virtual wxCheckBoxState DoGet3StateValue() const;
|
|
|
|
|
2003-06-07 16:29:57 -04:00
|
|
|
virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown );
|
2002-05-06 07:40:16 -04:00
|
|
|
virtual void Command(wxCommandEvent& event);
|
1999-01-01 11:05:26 -05:00
|
|
|
|
2002-05-06 07:40:16 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
1999-01-01 11:05:26 -05:00
|
|
|
};
|
|
|
|
|
2002-05-06 07:40:16 -04:00
|
|
|
class WXDLLEXPORT wxBitmap;
|
1999-01-01 11:05:26 -05:00
|
|
|
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
|
|
|
{
|
2002-05-03 15:41:22 -04:00
|
|
|
public:
|
2002-05-06 07:40:16 -04:00
|
|
|
int checkWidth;
|
|
|
|
int checkHeight;
|
1999-01-01 11:05:26 -05:00
|
|
|
|
2002-05-03 15:41:22 -04:00
|
|
|
wxBitmapCheckBox()
|
|
|
|
: checkWidth(-1), checkHeight(-1)
|
|
|
|
{ }
|
1999-01-01 11:05:26 -05:00
|
|
|
|
2002-05-06 07:40:16 -04:00
|
|
|
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)
|
1999-01-01 11:05:26 -05:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
// _WX_CHECKBOX_H_
|