]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dragimgg.cpp
fixed setting selection when there are NULL pages in the tree
[wxWidgets.git] / src / generic / dragimgg.cpp
index 06912f3064d9a0265ac24c56cc362d3c342b1fbc..b40140c453e6da513a7d19e132e65d277c9aa98c 100644 (file)
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
 #if wxUSE_DRAGIMAGE
 
 #ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/window.h"
-#include "wx/frame.h"
-#include "wx/dcclient.h"
-#include "wx/dcscreen.h"
-#include "wx/dcmemory.h"
-#include "wx/settings.h"
+    #include <stdio.h>
+    #include "wx/window.h"
+    #include "wx/frame.h"
+    #include "wx/dcclient.h"
+    #include "wx/dcscreen.h"
+    #include "wx/dcmemory.h"
+    #include "wx/settings.h"
+    #include "wx/intl.h"
+    #include "wx/log.h"
 #endif
 
-#include "wx/log.h"
-#include "wx/intl.h"
-
 #define wxUSE_IMAGE_IN_DRAGIMAGE 1
 
 #if wxUSE_IMAGE_IN_DRAGIMAGE
@@ -79,6 +78,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
 ////////////////////////////////////////////////////////////////////////////
 
@@ -123,7 +171,7 @@ bool wxGenericDragImage::Create(const wxString& str, const wxCursor& cursor)
 {
     wxFont font(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 
-    long w, h;
+    long w = 0, h = 0;
     wxScreenDC dc;
     dc.SetFont(font);
     dc.GetTextExtent(str, & w, & h);