1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: radiobut.h
|
|
|
|
// Purpose: wxRadioButton class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 19:52:45 -04:00
|
|
|
#ifndef _WX_RADIOBUT_H_
|
|
|
|
#define _WX_RADIOBUT_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "radiobut.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
1999-06-10 14:12:13 -04:00
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxRadioButtonNameStr;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
class WXDLLEXPORT wxRadioButton: public wxControl
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxRadioButton)
|
|
|
|
protected:
|
|
|
|
public:
|
|
|
|
inline wxRadioButton(void) {}
|
1998-07-04 11:17:59 -04:00
|
|
|
inline wxRadioButton(wxWindow *parent, wxWindowID id,
|
1998-05-20 10:12:05 -04:00
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
1998-07-04 11:17:59 -04:00
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
1998-05-20 10:12:05 -04:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxRadioButtonNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
|
1998-07-04 11:17:59 -04:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
1998-05-20 10:12:05 -04:00
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
1998-07-04 11:17:59 -04:00
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
1998-05-20 10:12:05 -04:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxRadioButtonNameStr);
|
|
|
|
|
|
|
|
virtual void SetLabel(const wxString& label);
|
1998-07-04 11:17:59 -04:00
|
|
|
virtual void SetValue(bool val);
|
1998-05-20 10:12:05 -04:00
|
|
|
virtual bool GetValue(void) const ;
|
|
|
|
|
1998-11-24 16:55:10 -05:00
|
|
|
bool MSWCommand(WXUINT param, WXWORD id);
|
2000-07-15 15:51:35 -04:00
|
|
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
|
|
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
|
|
|
1998-05-20 10:12:05 -04:00
|
|
|
void Command(wxCommandEvent& event);
|
|
|
|
};
|
|
|
|
|
|
|
|
// Not implemented
|
|
|
|
#if 0
|
|
|
|
class WXDLLEXPORT wxBitmap ;
|
|
|
|
|
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr;
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
|
|
|
|
protected:
|
|
|
|
wxBitmap *theButtonBitmap;
|
|
|
|
public:
|
|
|
|
inline wxBitmapRadioButton(void) { theButtonBitmap = NULL; }
|
1998-07-04 11:17:59 -04:00
|
|
|
inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
|
1998-05-20 10:12:05 -04:00
|
|
|
const wxBitmap *label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
1998-07-04 11:17:59 -04:00
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
1998-05-20 10:12:05 -04:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxBitmapRadioButtonNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
|
1998-07-04 11:17:59 -04:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
1998-05-20 10:12:05 -04:00
|
|
|
const wxBitmap *label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
1998-07-04 11:17:59 -04:00
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
1998-05-20 10:12:05 -04:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxBitmapRadioButtonNameStr);
|
|
|
|
|
|
|
|
virtual void SetLabel(const wxBitmap *label);
|
1998-07-04 11:17:59 -04:00
|
|
|
virtual void SetValue(bool val) ;
|
1998-05-20 10:12:05 -04:00
|
|
|
virtual bool GetValue(void) const ;
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
1998-08-07 19:52:45 -04:00
|
|
|
// _WX_RADIOBUT_H_
|