Support for new native OS/2 tree control with drag-and-drop.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
#include <pmstddlg.h>
|
||||
#endif
|
||||
|
||||
class CIDropTarget;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDropSource
|
||||
//-------------------------------------------------------------------------
|
||||
@@ -41,41 +43,57 @@ public:
|
||||
|
||||
/* start drag action */
|
||||
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
|
||||
virtual bool GiveFeedback(wxDragResult eEffect);
|
||||
|
||||
protected:
|
||||
void Init(void);
|
||||
bool m_bLazyDrag;
|
||||
|
||||
DRAGIMAGE* m_pDragImage;
|
||||
DRAGINFO* m_pDragInfo;
|
||||
DRAGTRANSFER* m_pDragTransfer;
|
||||
};
|
||||
ULONG m_ulItems;
|
||||
PDRAGINFO m_pDragInfo;
|
||||
DRAGIMAGE m_vDragImage;
|
||||
PDRAGITEM m_pDragItem;
|
||||
wxWindow* m_pWindow;
|
||||
}; // end of CLASS wxDropSource
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDropTarget
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxDropTarget: public wxDropTargetBase
|
||||
class WXDLLEXPORT wxDropTarget : public wxDropTargetBase
|
||||
{
|
||||
public:
|
||||
wxDropTarget(wxDataObject *dataObject = (wxDataObject*)NULL);
|
||||
wxDropTarget(wxDataObject* pDataObject = (wxDataObject*)NULL);
|
||||
virtual ~wxDropTarget();
|
||||
|
||||
void Register(WXHWND hwnd);
|
||||
void Revoke(WXHWND hwnd);
|
||||
//
|
||||
// These functions are called when data is moved over position (x, y) and
|
||||
// may return either wxDragCopy, wxDragMove or wxDragNone depending on
|
||||
// what would happen if the data were dropped here.
|
||||
//
|
||||
// The last parameter is what would happen by default and is determined by
|
||||
// the platform-specific logic (for example, under Windows it's wxDragCopy
|
||||
// if Ctrl key is pressed and wxDragMove otherwise) except that it will
|
||||
// always be wxDragNone if the carried data is in an unsupported format.
|
||||
//
|
||||
// OnData must be implemented and other should be overridden by derived classes
|
||||
//
|
||||
virtual wxDragResult OnData( wxCoord vX
|
||||
,wxCoord vY
|
||||
,wxDragResult eResult
|
||||
);
|
||||
virtual bool OnDrop( wxCoord vX
|
||||
,wxCoord vY
|
||||
);
|
||||
bool IsAcceptedData(PDRAGINFO pDataSource) const;
|
||||
|
||||
virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
|
||||
virtual bool OnDrop(wxCoord x, wxCoord y);
|
||||
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult vResult);
|
||||
virtual bool GetData();
|
||||
|
||||
// implementation
|
||||
protected:
|
||||
virtual bool IsAcceptable(DRAGINFO* pInfo);
|
||||
virtual bool GetData(void);
|
||||
wxDataFormat GetSupportedFormat(PDRAGINFO pDataSource) const;
|
||||
void Release(void);
|
||||
|
||||
DRAGINFO* m_pDragInfo;
|
||||
DRAGTRANSFER* m_pDragTransfer;
|
||||
};
|
||||
private:
|
||||
CIDropTarget* m_pDropTarget;
|
||||
}; // end of CLASS wxDropTarget
|
||||
|
||||
#endif //__OS2DNDH__
|
||||
|
||||
|
Reference in New Issue
Block a user