Added wxPrivateDropTarget

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-01-14 00:24:03 +00:00
parent bba6f3bd3c
commit ab8884aca6
9 changed files with 440 additions and 231 deletions

View File

@@ -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)
// ----------------------------------------------------------------------------