/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/msw/ole/droptgt.h
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/msw/ole/droptgt.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (10 years, 10 months ago) by william
File MIME type: text/plain
File size: 2700 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: ole/droptgt.h
3 // Purpose: declaration of the wxDropTarget class
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 06.03.98
7 // RCS-ID: $Id: droptgt.h 35650 2005-09-23 12:56:45Z MR $
8 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_OLEDROPTGT_H
13 #define _WX_OLEDROPTGT_H
14
15 #if wxUSE_DRAG_AND_DROP
16
17 // ----------------------------------------------------------------------------
18 // forward declarations
19 // ----------------------------------------------------------------------------
20
21 class wxIDropTarget;
22 struct IDataObject;
23
24 // ----------------------------------------------------------------------------
25 // An instance of the class wxDropTarget may be associated with any wxWindow
26 // derived object via SetDropTarget() function. If this is done, the virtual
27 // methods of wxDropTarget are called when something is dropped on the window.
28 //
29 // Note that wxDropTarget is an abstract base class (ABC) and you should derive
30 // your own class from it implementing pure virtual function in order to use it
31 // (all of them, including protected ones which are called by the class itself)
32 // ----------------------------------------------------------------------------
33
34 class WXDLLEXPORT wxDropTarget : public wxDropTargetBase
35 {
36 public:
37 // ctor & dtor
38 wxDropTarget(wxDataObject *dataObject = NULL);
39 virtual ~wxDropTarget();
40
41 // normally called by wxWindow on window creation/destruction, but might be
42 // called `manually' as well. Register() returns true on success.
43 bool Register(WXHWND hwnd);
44 void Revoke(WXHWND hwnd);
45
46 // provide default implementation for base class pure virtuals
47 virtual bool OnDrop(wxCoord x, wxCoord y);
48 virtual bool GetData();
49
50 // implementation only from now on
51 // -------------------------------
52
53 // do we accept this kind of data?
54 bool IsAcceptedData(IDataObject *pIDataSource) const;
55
56 // give us the data source from IDropTarget::Drop() - this is later used by
57 // GetData() when it's called from inside OnData()
58 void SetDataSource(IDataObject *pIDataSource);
59
60 private:
61 // helper used by IsAcceptedData() and GetData()
62 wxDataFormat GetSupportedFormat(IDataObject *pIDataSource) const;
63
64 wxIDropTarget *m_pIDropTarget; // the pointer to our COM interface
65 IDataObject *m_pIDataSource; // the pointer to the source data object
66
67 DECLARE_NO_COPY_CLASS(wxDropTarget)
68 };
69
70 #endif //wxUSE_DRAG_AND_DROP
71
72 #endif //_WX_OLEDROPTGT_H

  ViewVC Help
Powered by ViewVC 1.1.22