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