diff --git a/include/wx/gtk/radiobut.h b/include/wx/gtk/radiobut.h index cf6492a623..b85f8ea723 100644 --- a/include/wx/gtk/radiobut.h +++ b/include/wx/gtk/radiobut.h @@ -13,7 +13,7 @@ // wxRadioButton //----------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxRadioButton: public wxControl +class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase { public: wxRadioButton() { } diff --git a/include/wx/gtk1/radiobut.h b/include/wx/gtk1/radiobut.h index d958079729..662b681d74 100644 --- a/include/wx/gtk1/radiobut.h +++ b/include/wx/gtk1/radiobut.h @@ -13,7 +13,7 @@ // wxRadioButton //----------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxRadioButton: public wxControl +class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase { public: wxRadioButton() { } diff --git a/include/wx/motif/radiobut.h b/include/wx/motif/radiobut.h index 43414438a7..5759f01162 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 wxControl +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 a568316edf..0554881601 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 wxMSWOwnerDrawnButton +class WXDLLIMPEXP_CORE wxRadioButton : public public wxRadioButtonBase> { public: // ctors and creation functions diff --git a/include/wx/osx/radiobut.h b/include/wx/osx/radiobut.h index e968d80acd..cf74f14d89 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 wxControl +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 5a1ab5ad14..1502173105 100644 --- a/include/wx/qt/radiobut.h +++ b/include/wx/qt/radiobut.h @@ -10,7 +10,7 @@ class QRadioButton; -class WXDLLIMPEXP_CORE wxRadioButton : public wxControl +class WXDLLIMPEXP_CORE wxRadioButton : public wxRadioButtonBase { public: wxRadioButton(); diff --git a/include/wx/radiobut.h b/include/wx/radiobut.h index 11f466cdbe..dec331af73 100644 --- a/include/wx/radiobut.h +++ b/include/wx/radiobut.h @@ -32,6 +32,45 @@ #include "wx/control.h" +class WXDLLIMPEXP_FWD_CORE wxRadioButton; + +wxRadioButton* wxGetNextButtonInGroup(wxRadioButton *btn); +wxRadioButton* wxGetPreviousButtonInGroup(wxRadioButton *btn); +wxRadioButton* wxGetFirstButtonInGroup(wxRadioButton *btn); +wxRadioButton* wxGetLastButtonInGroup(wxRadioButton *btn); + +template +class WXDLLIMPEXP_CORE wxRadioButtonBase : public W +{ +public: + typedef W BaseWindowClass; + + wxRadioButtonBase() { } + + wxRadioButton* GetFirstInGroup() const + { + return wxGetFirstButtonInGroup( static_cast(this)); + } + + wxRadioButton* GetLastInGroup() const + { + return wxGetLastButtonInGroup( static_cast(this)); + } + + wxRadioButton* GetPreviousInGroup() const + { + return wxGetPreviousButtonInGroup( static_cast(this)); + } + + wxRadioButton* GetNextInGroup() const + { + return wxGetNextButtonInGroup( static_cast(this)); + } + +private: + wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxRadioButtonBase, W); +}; + extern WXDLLIMPEXP_DATA_CORE(const char) wxRadioButtonNameStr[]; #if defined(__WXUNIVERSAL__) diff --git a/include/wx/univ/radiobut.h b/include/wx/univ/radiobut.h index ae16aa25ce..0b6580a2ab 100644 --- a/include/wx/univ/radiobut.h +++ b/include/wx/univ/radiobut.h @@ -17,7 +17,7 @@ // wxRadioButton // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxRadioButton : public wxCheckBox +class WXDLLIMPEXP_CORE wxRadioButton : public wxRadioButtonBase { public: // constructors