Get rid of platform-specific wxPanel classes

There is no need to have them as they were identical for all platforms.

This basically reverts 5b87bd6c0b (Split wxPanel in wxPanelBase and
platform-specific files., 2011-03-20) as, 10+ years later, it turns out
that we're not going to have more MSW-specific parts, but none of them.

No real changes.
This commit is contained in:
Vadim Zeitlin 2022-11-12 21:54:35 +01:00
parent 544855c5ea
commit 20571f07e2
11 changed files with 15 additions and 154 deletions

View file

@ -3126,7 +3126,6 @@ COND_TOOLKIT_MSW_GUI_HDR = \
wx/msw/ownerdrw.h \
wx/msw/ownerdrawnbutton.h \
wx/msw/palette.h \
wx/msw/panel.h \
wx/msw/pen.h \
wx/msw/printdlg.h \
wx/msw/printwin.h \
@ -3528,7 +3527,6 @@ COND_USE_GUI_1_WXUNIV_1_GUI_CORE_HEADERS = \
wx/univ/menu.h \
wx/univ/menuitem.h \
wx/univ/notebook.h \
wx/univ/panel.h \
wx/univ/radiobox.h \
wx/univ/radiobut.h \
wx/univ/renderer.h \
@ -3604,7 +3602,6 @@ COND_USE_GUI_1_ALL_GUI_HEADERS = \
wx/generic/msgdlgg.h \
wx/generic/numdlgg.h \
wx/generic/notebook.h \
wx/generic/panelg.h \
wx/generic/prntdlgg.h \
wx/generic/printps.h \
wx/generic/progdlgg.h \

View file

@ -1082,7 +1082,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/generic/msgdlgg.h
wx/generic/numdlgg.h
wx/generic/notebook.h
wx/generic/panelg.h
wx/generic/prntdlgg.h
wx/generic/printps.h
wx/generic/progdlgg.h
@ -1919,7 +1918,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/msw/ownerdrw.h
wx/msw/ownerdrawnbutton.h
wx/msw/palette.h
wx/msw/panel.h
wx/msw/pen.h
wx/msw/printdlg.h
wx/msw/printwin.h
@ -2498,7 +2496,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/univ/menu.h
wx/univ/menuitem.h
wx/univ/notebook.h
wx/univ/panel.h
wx/univ/radiobox.h
wx/univ/radiobut.h
wx/univ/renderer.h

View file

@ -985,7 +985,6 @@ set(GUI_CMN_HDR
wx/generic/msgdlgg.h
wx/generic/numdlgg.h
wx/generic/notebook.h
wx/generic/panelg.h
wx/generic/prntdlgg.h
wx/generic/printps.h
wx/generic/progdlgg.h
@ -1809,7 +1808,6 @@ set(MSW_HDR
wx/msw/ownerdrw.h
wx/msw/ownerdrawnbutton.h
wx/msw/palette.h
wx/msw/panel.h
wx/msw/pen.h
wx/msw/printdlg.h
wx/msw/printwin.h
@ -2365,7 +2363,6 @@ set(UNIV_HDR
wx/univ/menu.h
wx/univ/menuitem.h
wx/univ/notebook.h
wx/univ/panel.h
wx/univ/radiobox.h
wx/univ/radiobut.h
wx/univ/renderer.h

View file

@ -1072,7 +1072,6 @@ GUI_CMN_HDR =
wx/generic/notebook.h
wx/generic/notifmsg.h
wx/generic/numdlgg.h
wx/generic/panelg.h
wx/generic/printps.h
wx/generic/prntdlgg.h
wx/generic/progdlgg.h
@ -1808,7 +1807,6 @@ MSW_HDR =
wx/msw/ownerdrawnbutton.h
wx/msw/ownerdrw.h
wx/msw/palette.h
wx/msw/panel.h
wx/msw/pen.h
wx/msw/printdlg.h
wx/msw/printwin.h
@ -2347,7 +2345,6 @@ UNIV_HDR =
wx/univ/menu.h
wx/univ/menuitem.h
wx/univ/notebook.h
wx/univ/panel.h
wx/univ/radiobox.h
wx/univ/radiobut.h
wx/univ/renderer.h

View file

@ -1181,7 +1181,6 @@
<ClInclude Include="..\..\include\wx\msw\ownerdrw.h" />
<ClInclude Include="..\..\include\wx\msw\ownerdrawnbutton.h" />
<ClInclude Include="..\..\include\wx\msw\palette.h" />
<ClInclude Include="..\..\include\wx\msw\panel.h" />
<ClInclude Include="..\..\include\wx\msw\pen.h" />
<ClInclude Include="..\..\include\wx\msw\popupwin.h" />
<ClInclude Include="..\..\include\wx\msw\printdlg.h" />
@ -1232,7 +1231,6 @@
<ClInclude Include="..\..\include\wx\generic\msgdlgg.h" />
<ClInclude Include="..\..\include\wx\generic\notebook.h" />
<ClInclude Include="..\..\include\wx\generic\numdlgg.h" />
<ClInclude Include="..\..\include\wx\generic\panelg.h" />
<ClInclude Include="..\..\include\wx\generic\printps.h" />
<ClInclude Include="..\..\include\wx\generic\prntdlgg.h" />
<ClInclude Include="..\..\include\wx\generic\progdlgg.h" />

View file

@ -1477,9 +1477,6 @@
<ClInclude Include="..\..\include\wx\generic\numdlgg.h">
<Filter>Generic Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\wx\generic\panelg.h">
<Filter>Generic Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\wx\generic\printps.h">
<Filter>Generic Headers</Filter>
</ClInclude>
@ -1906,9 +1903,6 @@
<ClInclude Include="..\..\include\wx\msw\palette.h">
<Filter>MSW Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\wx\msw\panel.h">
<Filter>MSW Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\wx\msw\pen.h">
<Filter>MSW Headers</Filter>
</ClInclude>

View file

@ -1,36 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/generic/panelg.h
// Purpose: wxPanel: a container for child controls
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GENERIC_PANELG_H_
#define _WX_GENERIC_PANELG_H_
#include "wx/bitmap.h"
class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase
{
public:
wxPanel() { }
// Constructor
wxPanel(wxWindow *parent,
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
const wxString& name = wxASCII_STR(wxPanelNameStr))
{
Create(parent, winid, pos, size, style, name);
}
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel);
};
#endif // _WX_GENERIC_PANELG_H_

View file

@ -1,38 +0,0 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/panel.h
// Purpose: wxMSW-specific wxPanel class.
// Author: Vadim Zeitlin
// Created: 2011-03-18
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PANEL_H_
#define _WX_MSW_PANEL_H_
class WXDLLIMPEXP_FWD_CORE wxBrush;
// ----------------------------------------------------------------------------
// wxPanel
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase
{
public:
wxPanel() { }
wxPanel(wxWindow *parent,
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
const wxString& name = wxASCII_STR(wxPanelNameStr))
{
Create(parent, winid, pos, size, style, name);
}
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel);
};
#endif // _WX_MSW_PANEL_H_

View file

@ -25,20 +25,20 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxPanelNameStr[];
// wxPanel contains other controls and implements TAB traversal between them
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPanelBase : public wxNavigationEnabled<wxWindow>
class WXDLLIMPEXP_CORE wxPanel : public wxNavigationEnabled<wxWindow>
{
public:
wxPanelBase() { }
wxPanel() { }
// Derived classes should also provide this constructor:
/*
wxPanelBase(wxWindow *parent,
wxPanel(wxWindow *parent,
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
const wxString& name = wxASCII_STR(wxPanelNameStr));
*/
const wxString& name = wxASCII_STR(wxPanelNameStr))
{
Create(parent, winid, pos, size, style, name);
}
// Pseudo ctor
bool Create(wxWindow *parent,
@ -55,16 +55,7 @@ public:
virtual void InitDialog() override;
private:
wxDECLARE_NO_COPY_CLASS(wxPanelBase);
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel);
};
#if defined(__WXUNIVERSAL__)
#include "wx/univ/panel.h"
#elif defined(__WXMSW__)
#include "wx/msw/panel.h"
#else
#define wxHAS_GENERIC_PANEL
#include "wx/generic/panelg.h"
#endif
#endif // _WX_PANELH_BASE_

View file

@ -1,36 +0,0 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/univ/panel.h
// Purpose: wxUniversal-specific wxPanel class.
// Author: Vadim Zeitlin
// Created: 2011-03-18
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_UNIV_PANEL_H_
#define _WX_UNIV_PANEL_H_
// ----------------------------------------------------------------------------
// wxPanel
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase
{
public:
wxPanel() { }
wxPanel(wxWindow *parent,
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
const wxString& name = wxASCII_STR(wxPanelNameStr))
{
Create(parent, winid, pos, size, style, name);
}
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel);
};
#endif // _WX_UNIV_PANEL_H_

View file

@ -86,14 +86,14 @@ wxCONSTRUCTOR_6( wxPanel, wxWindow*, Parent, wxWindowID, Id, \
// ============================================================================
// ----------------------------------------------------------------------------
// wxPanelBase creation
// wxPanel creation
// ----------------------------------------------------------------------------
bool wxPanelBase::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
bool wxPanel::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
if ( !wxWindow::Create(parent, id, pos, size, style, name) )
return false;
@ -104,7 +104,7 @@ bool wxPanelBase::Create(wxWindow *parent, wxWindowID id,
return true;
}
void wxPanelBase::InitDialog()
void wxPanel::InitDialog()
{
wxInitDialogEvent event(GetId());
event.SetEventObject(this);