diff --git a/include/wx/gtk/radiobut.h b/include/wx/gtk/radiobut.h index 785530a98e..8a19a022dd 100644 --- a/include/wx/gtk/radiobut.h +++ b/include/wx/gtk/radiobut.h @@ -13,7 +13,7 @@ // wxRadioButton //----------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase +class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase { public: wxRadioButton() { } diff --git a/include/wx/gtk1/radiobut.h b/include/wx/gtk1/radiobut.h index 662b681d74..d467f7100c 100644 --- a/include/wx/gtk1/radiobut.h +++ b/include/wx/gtk1/radiobut.h @@ -13,7 +13,7 @@ // wxRadioButton //----------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase +class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase { public: wxRadioButton() { } diff --git a/include/wx/motif/radiobut.h b/include/wx/motif/radiobut.h index 5759f01162..0233364946 100644 --- a/include/wx/motif/radiobut.h +++ b/include/wx/motif/radiobut.h @@ -11,7 +11,7 @@ #ifndef _WX_RADIOBUT_H_ #define _WX_RADIOBUT_H_ -class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase +class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase { wxDECLARE_DYNAMIC_CLASS(wxRadioButton); public: diff --git a/include/wx/msw/radiobut.h b/include/wx/msw/radiobut.h index 41103ed3b9..765f6bcc8f 100644 --- a/include/wx/msw/radiobut.h +++ b/include/wx/msw/radiobut.h @@ -13,7 +13,7 @@ #include "wx/msw/ownerdrawnbutton.h" -class WXDLLIMPEXP_CORE wxRadioButton : public wxRadioButtonBase< wxMSWOwnerDrawnButton > +class WXDLLIMPEXP_CORE wxRadioButton : public wxMSWOwnerDrawnButton { public: // ctors and creation functions diff --git a/include/wx/osx/radiobut.h b/include/wx/osx/radiobut.h index b6bcb8ada3..3934f839f8 100644 --- a/include/wx/osx/radiobut.h +++ b/include/wx/osx/radiobut.h @@ -11,7 +11,7 @@ #ifndef _WX_RADIOBUT_H_ #define _WX_RADIOBUT_H_ -class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase +class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase { wxDECLARE_DYNAMIC_CLASS(wxRadioButton); diff --git a/include/wx/qt/radiobut.h b/include/wx/qt/radiobut.h index da00d190cf..145b97a4ea 100644 --- a/include/wx/qt/radiobut.h +++ b/include/wx/qt/radiobut.h @@ -10,7 +10,7 @@ class QRadioButton; -class WXDLLIMPEXP_CORE wxRadioButton : public wxRadioButtonBase +class WXDLLIMPEXP_CORE wxRadioButton : public wxRadioButtonBase { public: wxRadioButton(); diff --git a/include/wx/radiobut.h b/include/wx/radiobut.h index a4d78656bc..90217847a5 100644 --- a/include/wx/radiobut.h +++ b/include/wx/radiobut.h @@ -27,14 +27,21 @@ namespace wxPrivate WXDLLIMPEXP_CORE wxRadioButton* wxGetLastButtonInGroup(const wxRadioButton *btn); } // namespace wxPrivate -// Unlike most of the other wxXXXBase classes, this one needs to be a template -// as wxRadioButton derives from different classes in different ports. -template -class wxRadioButtonBase : public W +// TODO: In wxUniv, wxRadioButton must derive from wxCheckBox as it reuses +// much of its code. This should be fixed by refactoring wxCheckBox to allow +// this class to reuse its functionality without inheriting from it, but for +// now use this hack to allow the existing code to compile. +#ifdef __WXUNIVERSAL__ + #include "wx/checkbox.h" + + typedef wxCheckBox wxRadioButtonBaseBase; +#else + typedef wxControl wxRadioButtonBaseBase; +#endif + +class WXDLLIMPEXP_CORE wxRadioButtonBase : public wxRadioButtonBaseBase { public: - typedef W BaseWindowClass; - wxRadioButtonBase() { } // Methods to be implemented by the derived classes: @@ -64,7 +71,7 @@ public: } private: - wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxRadioButtonBase, W); + wxDECLARE_NO_COPY_CLASS(wxRadioButtonBase); }; extern WXDLLIMPEXP_DATA_CORE(const char) wxRadioButtonNameStr[]; diff --git a/include/wx/univ/radiobut.h b/include/wx/univ/radiobut.h index ab81a71c5a..711e0a676c 100644 --- a/include/wx/univ/radiobut.h +++ b/include/wx/univ/radiobut.h @@ -11,13 +11,11 @@ #ifndef _WX_UNIV_RADIOBUT_H_ #define _WX_UNIV_RADIOBUT_H_ -#include "wx/checkbox.h" - // ---------------------------------------------------------------------------- // wxRadioButton // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxRadioButton : public wxRadioButtonBase +class WXDLLIMPEXP_CORE wxRadioButton : public wxRadioButtonBase { public: // constructors