]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/dnd.h
For wxMSW, split XPM handler into separate file (please add handler explicitly in...
[wxWidgets.git] / include / wx / gtk / dnd.h
index ba56769328e0b20203e48f87839888bc479c4395..f980749d13c40e7bb8d939e0a90c6ee6f78f8734 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "wx/defs.h"
 
-#ifdef wxUSE_DRAG_AND_DROP
+#if wxUSE_DRAG_AND_DROP
 
 #include "wx/object.h"
 #include "wx/string.h"
@@ -43,6 +43,7 @@ class wxWindow;
 class wxDropTarget;
 class wxTextDropTarget;
 class wxFileDropTarget;
+class wxPrivateDropTarget;
 
 class wxDropSource;
 
@@ -90,6 +91,36 @@ class wxTextDropTarget: public wxDropTarget
     virtual wxDataFormat GetFormat(size_t n) const;
 };
 
+//-------------------------------------------------------------------------
+// wxPrivateDropTarget
+//-------------------------------------------------------------------------
+
+class wxPrivateDropTarget: public wxDropTarget
+{
+public:
+
+  wxPrivateDropTarget();
+  
+  // you have to override OnDrop to get at the data
+    
+  // the string ID identifies the format of clipboard or DnD data. a word
+  // processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
+  // to the clipboard - the latter with the Id "WXWORD_FORMAT".
+    
+  void SetId( const wxString& id )
+      { m_id = id; }
+    
+  wxString GetId()
+      { return m_id; }
+
+private:
+
+  virtual size_t GetFormatCount() const;
+  virtual wxDataFormat GetFormat(size_t n) const;
+    
+  wxString   m_id;
+};
+
 // ----------------------------------------------------------------------------
 // A drop target which accepts files (dragged from File Manager or Explorer)
 // ----------------------------------------------------------------------------