]> git.saurik.com Git - wxWidgets.git/commitdiff
Deprecate old style wxPanel ctor taking separate coordinates.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 20 Mar 2011 00:00:42 +0000 (00:00 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 20 Mar 2011 00:00:42 +0000 (00:00 +0000)
wxPanel had a ctor in very old (wx 1.x-compatible?) style which was marked as
"old" and not documented but not officially deprecated. Do deprecate it now in
view of removing it in later releases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/panelg.h
include/wx/msw/panel.h
include/wx/univ/panel.h

index 3c815485f218bc4ab94f31c12ae800ada53d4149..9376b27adf0cedfecf0ff1d8b15cd2f8a72dc6be 100644 (file)
@@ -17,26 +17,28 @@ class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase
 public:
     wxPanel() { }
 
-    // Old-style constructor (no default values for coordinates to avoid
-    // ambiguity with the new one)
+    // Constructor
     wxPanel(wxWindow *parent,
-            int x, int y, int width, int height,
+            wxWindowID winid = wxID_ANY,
+            const wxPoint& pos = wxDefaultPosition,
+            const wxSize& size = wxDefaultSize,
             long style = wxTAB_TRAVERSAL | wxNO_BORDER,
             const wxString& name = wxPanelNameStr)
     {
-        Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name);
+        Create(parent, winid, pos, size, style, name);
     }
 
-    // Constructor
+#ifdef WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED_CONSTRUCTOR(
     wxPanel(wxWindow *parent,
-            wxWindowID winid = wxID_ANY,
-            const wxPoint& pos = wxDefaultPosition,
-            const wxSize& size = wxDefaultSize,
+            int x, int y, int width, int height,
             long style = wxTAB_TRAVERSAL | wxNO_BORDER,
             const wxString& name = wxPanelNameStr)
     {
-        Create(parent, winid, pos, size, style, name);
+        Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name);
     }
+    )
+#endif // WXWIN_COMPATIBILITY_2_8
 
 private:
     wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel);
index 3e24bd822379abfdfbd732be208b07cbe2d48504..a0617200782c5596c744665ac25ecb4a67af4bf3 100644 (file)
@@ -20,14 +20,6 @@ class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase
 public:
     wxPanel() { }
 
-    wxPanel(wxWindow *parent,
-            int x, int y, int width, int height,
-            long style = wxTAB_TRAVERSAL | wxNO_BORDER,
-            const wxString& name = wxPanelNameStr)
-    {
-        Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name);
-    }
-
     wxPanel(wxWindow *parent,
             wxWindowID winid = wxID_ANY,
             const wxPoint& pos = wxDefaultPosition,
@@ -43,6 +35,19 @@ public:
     // show through the child panels.
     virtual bool HasTransparentBackground();
 
+
+#ifdef WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED_CONSTRUCTOR(
+    wxPanel(wxWindow *parent,
+            int x, int y, int width, int height,
+            long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+            const wxString& name = wxPanelNameStr)
+    {
+        Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name);
+    }
+    )
+#endif // WXWIN_COMPATIBILITY_2_8
+
 private:
     wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel);
 };
index 5217bcbcd891342bcd2c5df7fa17efb36be14e36..19f0d52dc051ee0989222aef828cf7acc62df92c 100644 (file)
@@ -20,14 +20,6 @@ class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase
 public:
     wxPanel() { }
 
-    wxPanel(wxWindow *parent,
-            int x, int y, int width, int height,
-            long style = wxTAB_TRAVERSAL | wxNO_BORDER,
-            const wxString& name = wxPanelNameStr)
-    {
-        Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name);
-    }
-
     wxPanel(wxWindow *parent,
             wxWindowID winid = wxID_ANY,
             const wxPoint& pos = wxDefaultPosition,
@@ -40,6 +32,18 @@ public:
 
     virtual bool IsCanvasWindow() const { return true; }
 
+#ifdef WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED_CONSTRUCTOR(
+    wxPanel(wxWindow *parent,
+            int x, int y, int width, int height,
+            long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+            const wxString& name = wxPanelNameStr)
+    {
+        Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name);
+    }
+    )
+#endif // WXWIN_COMPATIBILITY_2_8
+
 private:
     wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel);
 };