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
|
2001-06-26 16:59:19 -04:00
|
|
|
// 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__
|
2002-01-17 18:54:14 -05:00
|
|
|
#pragma interface "radiobut.h"
|
1998-05-20 10:12:05 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxRadioButton: public wxControl
|
|
|
|
{
|
2002-01-17 18:54:14 -05:00
|
|
|
public:
|
|
|
|
// ctors and creation functions
|
|
|
|
wxRadioButton() { Init(); }
|
|
|
|
|
|
|
|
wxRadioButton(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 = wxRadioButtonNameStr)
|
|
|
|
{
|
|
|
|
Init();
|
|
|
|
|
|
|
|
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 = wxRadioButtonNameStr);
|
|
|
|
|
|
|
|
// implement the radio button interface
|
|
|
|
virtual void SetValue(bool value);
|
|
|
|
virtual bool GetValue() const;
|
|
|
|
|
|
|
|
// implementation only from now on
|
|
|
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
|
|
|
virtual void Command(wxCommandEvent& event);
|
2002-07-05 10:09:31 -04:00
|
|
|
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
2002-01-17 18:54:14 -05:00
|
|
|
|
|
|
|
virtual void SetFocus();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual wxSize DoGetBestSize() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
// see the comments in SetFocus()
|
|
|
|
bool m_focusJustSet;
|
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxRadioButton)
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1998-08-07 19:52:45 -04:00
|
|
|
// _WX_RADIOBUT_H_
|