]> git.saurik.com Git - wxWidgets.git/commitdiff
Better backward compatibility and deprecation markup for interface deprecated in...
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 30 Mar 2006 14:04:17 +0000 (14:04 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 30 Mar 2006 14:04:17 +0000 (14:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

20 files changed:
include/wx/datetime.h
include/wx/docview.h
include/wx/event.h
include/wx/filefn.h
include/wx/fontdlg.h
include/wx/gdicmn.h
include/wx/generic/dragimgg.h
include/wx/generic/fontdlgg.h
include/wx/generic/listctrl.h
include/wx/gtk/fontdlg.h
include/wx/gtk1/fontdlg.h
include/wx/msw/fontdlg.h
include/wx/os2/fontdlg.h
include/wx/palmos/fontdlg.h
samples/dialogs/dialogs.cpp
src/common/datetime.cpp
src/common/event.cpp
src/common/gdicmn.cpp
src/common/sizer.cpp
src/generic/dragimgg.cpp

index 962d0396b3228dadbb1fec0d2b321f5a4fdb3236..18f0829a09af440ee8e31c58aa8f067b42b5f30e 100644 (file)
@@ -704,6 +704,7 @@ public:
                                      Month month = Inv_Month,
                                      int year = Inv_Year);
 
+#if WXWIN_COMPATIBILITY_2_6
         // sets the date to the given day of the given week in the year,
         // returns true on success and false if given date doesn't exist (e.g.
         // numWeek is > 53)
@@ -716,6 +717,7 @@ public:
     wxDEPRECATED( wxDateTime GetWeek(wxDateTime_t numWeek,
                                      WeekDay weekday = Mon,
                                      WeekFlags flags = Monday_First) const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
         // returns the date corresponding to the given week day of the given
         // week (in ISO notation) of the specified year
index 13e875ceac1188539d0e346e05e099453e32bdeb..36a9bd114e6fed09851383a4fd51d2610c5a9403 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        docview.h
+// Name:        wx/docview.h
 // Purpose:     Doc/View classes
 // Author:      Julian Smart
 // Modified by:
@@ -424,8 +424,10 @@ public:
     // Get the current document manager
     static wxDocManager* GetDocumentManager() { return sm_docManager; }
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, use GetHistoryFilesCount() instead
     wxDEPRECATED( size_t GetNoHistoryFiles() const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     long              m_flags;
@@ -443,10 +445,12 @@ protected:
     DECLARE_NO_COPY_CLASS(wxDocManager)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
 inline size_t wxDocManager::GetNoHistoryFiles() const
 {
     return GetHistoryFilesCount();
 }
+#endif // WXWIN_COMPATIBILITY_2_6
 
 // ----------------------------------------------------------------------------
 // A default child frame
@@ -580,8 +584,10 @@ public:
 
     const wxList& GetMenus() const { return m_fileMenus; }
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, use GetCount() instead
     wxDEPRECATED( size_t GetNoHistoryFiles() const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     // Last n files
@@ -601,10 +607,12 @@ private:
     DECLARE_NO_COPY_CLASS(wxFileHistory)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
 inline size_t wxFileHistory::GetNoHistoryFiles() const
 {
     return m_fileHistoryN;
 }
+#endif // WXWIN_COMPATIBILITY_2_6
 
 #if wxUSE_STD_IOSTREAM
 // For compatibility with existing file formats:
index be29607ecb3d9010324a7e288200355d106acf17..7087fa5002d06024f1f9c55dc5445b0e75897426 100644 (file)
@@ -1007,8 +1007,10 @@ public:
     // Get Y position
     wxCoord GetY() const { return m_y; }
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, Use GetKeyCode instead.
     wxDEPRECATED( long KeyCode() const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
     virtual wxEvent *Clone() const { return new wxKeyEvent(*this); }
 
@@ -2921,10 +2923,12 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
     EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) \
     EVT_COMMAND_SCROLL_CHANGED(winid, func)
 
-// compatibility macros for the old name, to be deprecated in 2.8
-#define wxEVT_SCROLL_ENDSCROLL wxEVT_SCROLL_CHANGED
-#define EVT_COMMAND_SCROLL_ENDSCROLL EVT_COMMAND_SCROLL_CHANGED
-#define EVT_SCROLL_ENDSCROLL EVT_SCROLL_CHANGED
+#if WXWIN_COMPATIBILITY_2_6
+    // compatibility macros for the old name, deprecated in 2.8
+    #define wxEVT_SCROLL_ENDSCROLL wxEVT_SCROLL_CHANGED
+    #define EVT_COMMAND_SCROLL_ENDSCROLL EVT_COMMAND_SCROLL_CHANGED
+    #define EVT_SCROLL_ENDSCROLL EVT_SCROLL_CHANGED
+#endif // WXWIN_COMPATIBILITY_2_6
 
 // Convenience macros for commonly-used commands
 #define EVT_CHECKBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHECKBOX_CLICKED, winid, wxCommandEventHandler(func))
@@ -3022,4 +3026,3 @@ WXDLLIMPEXP_CORE wxWindow* wxFindFocusDescendant(wxWindow* ancestor);
 #endif // wxUSE_GUI
 
 #endif // _WX_EVENT_H__
-
index d38c8ac2852ee90127957dd4bc439b6d8a23ea17..4189de1bf108966cff69854f5d41db45f39b9f10 100644 (file)
@@ -463,15 +463,14 @@ WXDLLIMPEXP_BASE bool wxRmdir(const wxString& dir, int flags = 0);
 WXDLLIMPEXP_BASE wxFileKind wxGetFileKind(int fd);
 WXDLLIMPEXP_BASE wxFileKind wxGetFileKind(FILE *fp);
 
+#if WXWIN_COMPATIBILITY_2_6
 // compatibility defines, don't use in new code
-// consider removal droping 2.4 compatibility
-// #if WXWIN_COMPATIBILITY_2_4
 wxDEPRECATED( inline bool wxPathExists(const wxChar *pszPathName) );
 inline bool wxPathExists(const wxChar *pszPathName)
 {
     return wxDirExists(pszPathName);
 }
-// #endif //WXWIN_COMPATIBILITY_2_4
+#endif //WXWIN_COMPATIBILITY_2_6
 
 // ----------------------------------------------------------------------------
 // separators in file names
index 778dbd3a25a7938b694473ae03dce400bb26d279..da2fba946d41f7b896619d5526edf1b4c48fda42 100644 (file)
@@ -43,12 +43,12 @@ public:
     const wxFontData& GetFontData() const { return m_fontData; }
     wxFontData& GetFontData() { return m_fontData; }
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated interface, for compatibility only, don't use
-    wxFontDialogBase(wxWindow *parent, const wxFontData *data)
-        { m_parent = parent; InitFontData(data); }
+    wxDEPRECATED( wxFontDialogBase(wxWindow *parent, const wxFontData *data) );
 
-    bool Create(wxWindow *parent, const wxFontData *data)
-        { InitFontData(data); return Create(parent); }
+    wxDEPRECATED( bool Create(wxWindow *parent, const wxFontData *data) );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     virtual bool DoCreate(wxWindow *parent) { m_parent = parent; return true; }
@@ -61,6 +61,15 @@ protected:
     DECLARE_NO_COPY_CLASS(wxFontDialogBase)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
+    // deprecated interface, for compatibility only, don't use
+inline wxFontDialogBase::wxFontDialogBase(wxWindow *parent, const wxFontData *data)
+{ m_parent = parent; InitFontData(data); }
+
+inline bool wxFontDialogBase::Create(wxWindow *parent, const wxFontData *data)
+{ InitFontData(data); return Create(parent); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 // ----------------------------------------------------------------------------
 // platform-specific wxFontDialog implementation
 // ----------------------------------------------------------------------------
index b6faf8900d20448dea9e64ee4375a89102db7605..f823993b03a36a6535e70121edc024b0b0ac0b4e 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        gdicmn.h
+// Name:        wx/gdicmn.h
 // Purpose:     Common GDI classes, types and declarations
 // Author:      Julian Smart
 // Modified by:
@@ -503,8 +503,10 @@ public:
     // add a new colour to the database
     void AddColour(const wxString& name, const wxColour& colour);
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, use Find() instead
     wxDEPRECATED( wxColour *FindColour(const wxString& name) );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 
 #ifdef __WXPM__
index 6cfcee1bd37617cace7628159bc0edba5b690771..72dde38d4d8cf92e56fbbc888d0f6536bd64f6da 100644 (file)
@@ -100,13 +100,6 @@ public:
         Create(cursor);
     }
 
-    // Deprecated version of the above
-    wxGenericDragImage(const wxCursor& cursor, const wxPoint& cursorHotspot)
-    {
-        Init();
-        Create(cursor, cursorHotspot);
-    }
-
     wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor = wxNullCursor)
     {
         Init();
@@ -114,14 +107,6 @@ public:
         Create(image, cursor);
     }
 
-    // Deprecated version of the above
-    wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot)
-    {
-        Init();
-
-        Create(image, cursor, cursorHotspot);
-    }
-
     wxGenericDragImage(const wxIcon& image, const wxCursor& cursor = wxNullCursor)
     {
         Init();
@@ -129,14 +114,6 @@ public:
         Create(image, cursor);
     }
 
-    // Deprecated version of the above
-    wxGenericDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot)
-    {
-        Init();
-
-        Create(image, cursor, cursorHotspot);
-    }
-
     wxGenericDragImage(const wxString& str, const wxCursor& cursor = wxNullCursor)
     {
         Init();
@@ -144,13 +121,17 @@ public:
         Create(str, cursor);
     }
 
-    // Deprecated version of the above
-    wxGenericDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot)
-    {
-        Init();
-
-        Create(str, cursor, cursorHotspot);
-    }
+#if WXWIN_COMPATIBILITY_2_6
+    // don't use in new code, use versions without hot spot parameter
+    wxDEPRECATED( wxGenericDragImage(const wxCursor& cursor, const wxPoint& cursorHotspot) );
+    wxDEPRECATED( wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+    wxDEPRECATED( wxGenericDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+    wxDEPRECATED( wxGenericDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+    wxDEPRECATED( bool Create(const wxCursor& cursor, const wxPoint& cursorHotspot) );
+    wxDEPRECATED( bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+    wxDEPRECATED( bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+    wxDEPRECATED( bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 #if wxUSE_TREECTRL
     wxGenericDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id)
@@ -184,35 +165,15 @@ public:
 
     // Create a drag image with a virtual image (need to override DoDrawImage, GetImageRect)
     bool Create(const wxCursor& cursor = wxNullCursor);
-    bool Create(const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
-    {
-        wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
-        return Create(cursor);
-    }
 
     // Create a drag image from a bitmap and optional cursor
     bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor);
-    bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
-    {
-        wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
-        return Create(image, cursor);
-    }
 
     // Create a drag image from an icon and optional cursor
     bool Create(const wxIcon& image, const wxCursor& cursor = wxNullCursor);
-    bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
-    {
-        wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
-        return Create(image, cursor);
-    }
 
     // Create a drag image from a string and optional cursor
     bool Create(const wxString& str, const wxCursor& cursor = wxNullCursor);
-    bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
-    {
-        wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
-        return Create(str, cursor);
-    }
 
 #if wxUSE_TREECTRL
     // Create a drag image for the given tree control item
@@ -263,7 +224,7 @@ public:
     // Instead, paint the drag image's backing bitmap to be correct, and leave the window
     // to be updated only when dragging the objects away (thus giving a smoother appearance).
     virtual bool UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC,
-        const wxRect& sourceRect, const wxRect& destRect) const;
+                                         const wxRect& sourceRect, const wxRect& destRect) const;
 
     // Erase and redraw simultaneously if possible
     virtual bool RedrawImage(const wxPoint& oldPos, const wxPoint& newPos, bool eraseOld, bool drawNew);
index e1a81c3d1a4c8ff61f6fded10491ae3d93b9db20..485b99fdd3a1492bc9287f127162200feeeff3e5 100644 (file)
@@ -54,9 +54,10 @@ public:
 
     virtual int ShowModal();
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, for backwards compatibility only
-    wxGenericFontDialog(wxWindow *parent, const wxFontData *data)
-        : wxFontDialogBase(parent, data) { Init(); }
+    wxDEPRECATED( wxGenericFontDialog(wxWindow *parent, const wxFontData *data) );
+#endif // WXWIN_COMPATIBILITY_2_6
 
     // Internal functions
     void OnCloseWindow(wxCloseEvent& event);
@@ -108,4 +109,10 @@ WXDLLEXPORT int wxFontFamilyStringToInt(wxChar *family);
 WXDLLEXPORT int wxFontWeightStringToInt(wxChar *weight);
 WXDLLEXPORT int wxFontStyleStringToInt(wxChar *style);
 
+#if WXWIN_COMPATIBILITY_2_6
+    // deprecated, for backwards compatibility only
+inline wxGenericFontDialog::wxGenericFontDialog(wxWindow *parent, const wxFontData *data)
+                           :wxFontDialogBase(parent) { Init(); InitFontData(data); Create(parent); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 #endif // _WX_GENERIC_FONTDLGG_H
index 9d80b4f30813238b0b73405d9d9df0d61c05b327..a35bc0e7a570c5be91deabbd415f7d13f5bec966 100644 (file)
@@ -177,9 +177,10 @@ public:
     void RefreshItem(long item);
     void RefreshItems(long itemFrom, long itemTo);
 
+#if WXWIN_COMPATIBILITY_2_6
     // obsolete, don't use
     wxDEPRECATED( int GetItemSpacing( bool isSmall ) const );
-
+#endif // WXWIN_COMPATIBILITY_2_6
 
     virtual wxVisualAttributes GetDefaultAttributes() const
     {
@@ -244,7 +245,7 @@ protected:
     virtual wxString OnGetItemText(long item, long column) const;
 
     // return the icon for the given item. In report view, OnGetItemImage will
-    // only be called for the first column. See OnGetItemColumnImage for 
+    // only be called for the first column. See OnGetItemColumnImage for
     // details.
     virtual int OnGetItemImage(long item) const;
 
index 9f3e37f2ecc474156c1645a0d14cd905ba307418..e1ec055711214d1c88f7fec57ed289d2090c3281 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        fontdlgg.h
+// Name:        wx/gtk/fontdlgg.h
 // Purpose:     wxFontDialog
 // Author:      Robert Roebling
 // Created:
@@ -29,9 +29,10 @@ public:
     // implementation only
     void SetChosenFont(const char *name);
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated interface, don't use
-    wxFontDialog(wxWindow *parent, const wxFontData *data)
-        : wxFontDialogBase(parent, data) { Create(parent, data); }
+    wxDEPRECATED( wxFontDialog(wxWindow *parent, const wxFontData *data) );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     // create the GTK dialog
@@ -41,4 +42,10 @@ private:
     DECLARE_DYNAMIC_CLASS(wxFontDialog)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
+    // deprecated interface, don't use
+inline wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData *data)
+        : wxFontDialogBase(parent) { InitFontData(data); Create(parent); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 #endif
index 3a9366edcec083facb39aef75e1a0ff3cf1ba4be..aebdeb52d3312a6b4df73434529f6dca0e706f45 100644 (file)
@@ -29,9 +29,10 @@ public:
     // implementation only
     void SetChosenFont(const char *name);
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated interface, don't use
-    wxFontDialog(wxWindow *parent, const wxFontData *data)
-        : wxFontDialogBase(parent, data) { Create(parent, data); }
+    wxDEPRECATED( wxFontDialog(wxWindow *parent, const wxFontData *data) );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     // create the GTK dialog
@@ -41,4 +42,10 @@ private:
     DECLARE_DYNAMIC_CLASS(wxFontDialog)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
+    // deprecated interface, don't use
+inline wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData *data)
+        : wxFontDialogBase(parent) { InitFontData(data); Create(parent); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 #endif
index 24d11c853559a795967980154f5cd9b213080590..92d6078b4525cfaef41dfb24e3c4bef4c7f6c0d6 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        fontdlg.h
+// Name:        wx/msw/fontdlg.h
 // Purpose:     wxFontDialog class
 // Author:      Julian Smart
 // Modified by:
@@ -27,14 +27,20 @@ public:
 
     virtual int ShowModal();
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated interface, don't use
-    wxFontDialog(wxWindow *parent, const wxFontData *data)
-        : wxFontDialogBase(parent, data) { Create(parent, data); }
+    wxDEPRECATED( wxFontDialog(wxWindow *parent, const wxFontData *data) );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxFontDialog)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
+    // deprecated interface, don't use
+inline wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData *data)
+        : wxFontDialogBase(parent) { InitFontData(data); Create(parent); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 #endif
     // _WX_MSW_FONTDLG_H_
-
index 4dff23ca4b07043c963629b5f112751977759c38..27031b6fcf53ed26d13dd8a4343f26183c8769fc 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        fontdlg.h
+// Name:        wx/os2/fontdlg.h
 // Purpose:     wxFontDialog class. Use generic version if no
 //              platform-specific implementation.
 // Author:      David Webster
@@ -39,24 +39,22 @@ public:
 
     virtual int ShowModal();
 
+#if WXWIN_COMPATIBILITY_2_6
     //
     // Deprecated interface, don't use
     //
-    wxFontDialog( wxWindow*         pParent
-                 ,const wxFontData* pData
-                )
-                : wxFontDialogBase( pParent
-                                   ,pData
-                                  )
-    {
-        Create( pParent
-               ,pData
-              );
-    }
+    wxDEPRECATED( wxFontDialog( wxWindow* pParent, const wxFontData* pData ) );
+#endif // WXWIN_COMPATIBILITY_2_6
+
 protected:
     DECLARE_DYNAMIC_CLASS(wxFontDialog)
 }; // end of CLASS wxFontDialog
 
+#if WXWIN_COMPATIBILITY_2_6
+    // deprecated interface, don't use
+inline wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData *data)
+        : wxFontDialogBase(parent) { InitFontData(data); Create(parent); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 #endif
     // _WX_FONTDLG_H_
-
index 4ed8628878025891a864f182333c087fa9e10045..7fb66d71e563c87a2bdf1740c20ccb727d3f1086 100644 (file)
@@ -27,14 +27,9 @@ public:
 
     virtual int ShowModal();
 
-    // deprecated interface, don't use
-    wxFontDialog(wxWindow *parent, const wxFontData *data)
-        : wxFontDialogBase(parent, data) { Create(parent, data); }
-
 protected:
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxFontDialog)
 };
 
 #endif
     // _WX_PALMOS_FONTDLG_H_
-
index 55bc4b3f2844aefeb27b2486427a7e45f1f0c9ec..035c2e1557b66f19533f3a98fb47e4d210a1cfeb 100644 (file)
@@ -504,7 +504,7 @@ void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) )
     data.SetInitialFont(wxGetApp().m_canvasFont);
     data.SetColour(wxGetApp().m_canvasTextColour);
 
-    wxGenericFontDialog *dialog = new wxGenericFontDialog(this, &data);
+    wxGenericFontDialog *dialog = new wxGenericFontDialog(this, data);
     if (dialog->ShowModal() == wxID_OK)
     {
         wxFontData retData = dialog->GetFontData();
index 31d6a2ad18daa22473c94303eb9cc89731cb2bc5..5f7f6931e296a30a0c903ea0d4822c5c6a1ec3cb 100644 (file)
@@ -1811,6 +1811,7 @@ wxDateTime::SetToWeekOfYear(int year, wxDateTime_t numWeek, WeekDay wd)
     return dt;
 }
 
+#if WXWIN_COMPATIBILITY_2_6
 // use a separate function to avoid warnings about using deprecated
 // SetToTheWeek in GetWeek below
 static wxDateTime
@@ -1848,6 +1849,7 @@ wxDateTime wxDateTime::GetWeek(wxDateTime_t numWeek,
 {
     return ::SetToTheWeek(GetYear(), numWeek, weekday, flags);
 }
+#endif // WXWIN_COMPATIBILITY_2_6
 
 wxDateTime& wxDateTime::SetToLastMonthDay(Month month,
                                           int year)
index e0ea296ae23ed5b35c9f551fb9a15de0925335bb..a4f85d7d61a962a5de7843cb4f4eb4fadfddbb54 100644 (file)
@@ -736,10 +736,12 @@ wxKeyEvent::wxKeyEvent(const wxKeyEvent& evt)
 #endif
 }
 
+#if WXWIN_COMPATIBILITY_2_6
 long wxKeyEvent::KeyCode() const
 {
     return m_keyCode;
 }
+#endif // WXWIN_COMPATIBILITY_2_6
 
 wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win)
 {
index f2f3c71420ffade7fdc34a6952690e6c77f5b9a2..e2c0f65521c817487f1903418b10becb759d0565 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        gdicmn.cpp
+// Name:        src/common/gdicmn.cpp
 // Purpose:     Common GDI classes
 // Author:      Julian Smart
 // Modified by:
@@ -488,6 +488,7 @@ wxString wxColourDatabase::FindName(const wxColour& colour) const
 // deprecated wxColourDatabase methods
 // ----------------------------------------------------------------------------
 
+#if WXWIN_COMPATIBILITY_2_6
 wxColour *wxColourDatabase::FindColour(const wxString& name)
 {
     // This function is deprecated, use Find() instead.
@@ -516,6 +517,7 @@ wxColour *wxColourDatabase::FindColour(const wxString& name)
 
     return new wxColour(s_col);
 }
+#endif // WXWIN_COMPATIBILITY_2_6
 
 // ============================================================================
 // stock objects
@@ -950,4 +952,3 @@ wxResourceCache::~wxResourceCache ()
         node = node->GetNext ();
     }
 }
-
index b250c0c04853a12bad57b0bcc61498cd08771e0b..ea63c184c9367d294cb00b5a82ee432daefe3b83 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        sizer.cpp
+// Name:        src/common/sizer.cpp
 // Purpose:     provide new wxSizer class for layout
 // Author:      Robert Roebling and Robin Dunn, contributions by
 //              Dirk Holtwick, Ron Lee
@@ -473,6 +473,7 @@ bool wxSizerItem::IsShown() const
     return false;
 }
 
+#if WXWIN_COMPATIBILITY_2_6
 void wxSizerItem::SetOption( int option )
 {
     SetProportion( option );
@@ -482,6 +483,7 @@ int wxSizerItem::GetOption() const
 {
     return GetProportion();
 }
+#endif // WXWIN_COMPATIBILITY_2_6
 
 
 //---------------------------------------------------------------------------
@@ -503,10 +505,12 @@ wxSizerItem* wxSizer::Insert( size_t index, wxSizerItem *item )
     return item;
 }
 
+#if WXWIN_COMPATIBILITY_2_6
 bool wxSizer::Remove( wxWindow *window )
 {
     return Detach( window );
 }
+#endif // WXWIN_COMPATIBILITY_2_6
 
 bool wxSizer::Remove( wxSizer *sizer )
 {
index fd104aad66361fae2fb81d6e402991f039f06cb4..31c91dc092fd85309ceaeb5972cd4b9b4f0d1cc4 100644 (file)
@@ -79,6 +79,55 @@ void wxGenericDragImage::Init()
     m_pBackingBitmap = (wxBitmap*) NULL;
 }
 
+#if WXWIN_COMPATIBILITY_2_6
+wxGenericDragImage::wxGenericDragImage(const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
+{
+    Init();
+    Create(cursor);
+}
+
+wxGenericDragImage::wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
+{
+    Init();
+
+    Create(image, cursor);
+}
+
+wxGenericDragImage::wxGenericDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
+{
+    Init();
+
+    Create(image, cursor);
+}
+
+wxGenericDragImage::wxGenericDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
+{
+    Init();
+
+    Create(str, cursor);
+}
+
+bool wxGenericDragImage::Create(const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
+{
+    return Create(cursor);
+}
+
+bool wxGenericDragImage::Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
+{
+    return Create(image, cursor);
+}
+
+bool wxGenericDragImage::Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
+{
+    return Create(image, cursor);
+}
+
+bool wxGenericDragImage::Create(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
+{
+    return Create(str, cursor);
+}
+#endif // WXWIN_COMPATIBILITY_2_6
+
 // Attributes
 ////////////////////////////////////////////////////////////////////////////