First implementation

This commit is contained in:
Stefan Csomor
2020-09-17 22:35:22 +02:00
parent dcdcbbe078
commit 92ea83f00b
8 changed files with 46 additions and 7 deletions

View File

@@ -13,7 +13,7 @@
// wxRadioButton // wxRadioButton
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxRadioButton: public wxControl class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase<wxControl>
{ {
public: public:
wxRadioButton() { } wxRadioButton() { }

View File

@@ -13,7 +13,7 @@
// wxRadioButton // wxRadioButton
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxRadioButton: public wxControl class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase<wxControl>
{ {
public: public:
wxRadioButton() { } wxRadioButton() { }

View File

@@ -11,7 +11,7 @@
#ifndef _WX_RADIOBUT_H_ #ifndef _WX_RADIOBUT_H_
#define _WX_RADIOBUT_H_ #define _WX_RADIOBUT_H_
class WXDLLIMPEXP_CORE wxRadioButton: public wxControl class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase<wxControl>
{ {
wxDECLARE_DYNAMIC_CLASS(wxRadioButton); wxDECLARE_DYNAMIC_CLASS(wxRadioButton);
public: public:

View File

@@ -13,7 +13,7 @@
#include "wx/msw/ownerdrawnbutton.h" #include "wx/msw/ownerdrawnbutton.h"
class WXDLLIMPEXP_CORE wxRadioButton : public wxMSWOwnerDrawnButton<wxControl> class WXDLLIMPEXP_CORE wxRadioButton : public public wxRadioButtonBase<wxMSWOwnerDrawnButton<wxControl>>
{ {
public: public:
// ctors and creation functions // ctors and creation functions

View File

@@ -11,7 +11,7 @@
#ifndef _WX_RADIOBUT_H_ #ifndef _WX_RADIOBUT_H_
#define _WX_RADIOBUT_H_ #define _WX_RADIOBUT_H_
class WXDLLIMPEXP_CORE wxRadioButton: public wxControl class WXDLLIMPEXP_CORE wxRadioButton: public wxRadioButtonBase<wxControl>
{ {
wxDECLARE_DYNAMIC_CLASS(wxRadioButton); wxDECLARE_DYNAMIC_CLASS(wxRadioButton);

View File

@@ -10,7 +10,7 @@
class QRadioButton; class QRadioButton;
class WXDLLIMPEXP_CORE wxRadioButton : public wxControl class WXDLLIMPEXP_CORE wxRadioButton : public wxRadioButtonBase<wxControl>
{ {
public: public:
wxRadioButton(); wxRadioButton();

View File

@@ -32,6 +32,45 @@
#include "wx/control.h" #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 W>
class WXDLLIMPEXP_CORE wxRadioButtonBase : public W
{
public:
typedef W BaseWindowClass;
wxRadioButtonBase() { }
wxRadioButton* GetFirstInGroup() const
{
return wxGetFirstButtonInGroup( static_cast<wxRadioButton*>(this));
}
wxRadioButton* GetLastInGroup() const
{
return wxGetLastButtonInGroup( static_cast<wxRadioButton*>(this));
}
wxRadioButton* GetPreviousInGroup() const
{
return wxGetPreviousButtonInGroup( static_cast<wxRadioButton*>(this));
}
wxRadioButton* GetNextInGroup() const
{
return wxGetNextButtonInGroup( static_cast<wxRadioButton*>(this));
}
private:
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxRadioButtonBase, W);
};
extern WXDLLIMPEXP_DATA_CORE(const char) wxRadioButtonNameStr[]; extern WXDLLIMPEXP_DATA_CORE(const char) wxRadioButtonNameStr[];
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)

View File

@@ -17,7 +17,7 @@
// wxRadioButton // wxRadioButton
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxRadioButton : public wxCheckBox class WXDLLIMPEXP_CORE wxRadioButton : public wxRadioButtonBase<wxCheckBox>
{ {
public: public:
// constructors // constructors