-#elif defined(__WXMOTIF__)
- #include "wx/motif/dataobj2.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk/dataobj2.h"
-#endif
+
+ // wxURLDataObject defined in msw/ole/dataobj2.h
+#else // !__WXMSW__
+ #if defined(__WXGTK20__)
+ #include "wx/gtk/dataobj2.h"
+ #elif defined(__WXGTK__)
+ #include "wx/gtk1/dataobj2.h"
+ #elif defined(__WXX11__)
+ #include "wx/x11/dataobj2.h"
+ #elif defined(__WXMOTIF__)
+ #include "wx/motif/dataobj2.h"
+ #elif defined(__WXMAC__)
+ #include "wx/mac/dataobj2.h"
+ #elif defined(__WXCOCOA__)
+ #include "wx/cocoa/dataobj2.h"
+ #elif defined(__WXPM__)
+ #include "wx/os2/dataobj2.h"
+ #endif
+
+ // wxURLDataObject is simply wxTextDataObject with a different name
+ class WXDLLEXPORT wxURLDataObject : public wxTextDataObject
+ {
+ public:
+ wxString GetURL() const { return GetText(); }
+ void SetURL(const wxString& url) { SetText(url); }
+ };
+#endif // __WXMSW__/!__WXMSW__
+
+#endif // wxUSE_DATAOBJ