///////////////////////////////////////////////////////////////////////////////
// Name: dnd.cpp
// Purpose: wxDropTarget, wxDropSource, wxDataObject implementation
-// Author: AUTHOR
+// Author: David Webster
// Modified by:
-// Created: ??/??/98
+// Created: 10/21/99
// RCS-ID: $Id$
// Copyright: (c) 1998 AUTHOR
// Licence: wxWindows licence
#pragma implementation "dnd.h"
#endif
-#include "wx/dnd.h"
+#define INCL_PM
+#define INCL_DOS
+#include <os2.h>
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
+#include "wx/dnd.h"
+
+#if wxUSE_DRAG_AND_DROP
// ----------------------------------------------------------------------------
// global
// wxDropTarget
// ----------------------------------------------------------------------------
-wxDropTarget::wxDropTarget()
+wxDropTarget::wxDropTarget(
+ wxDataObject* pDataObject
+)
{
+ // TODO:
};
wxDropTarget::~wxDropTarget()
{
};
-// ----------------------------------------------------------------------------
-// wxTextDropTarget
-// ----------------------------------------------------------------------------
-
-bool wxTextDropTarget::OnDrop( long x, long y, const void *pData )
+void wxDropTarget::Register(
+ WXHWND hwnd
+)
{
- OnDropText( x, y, (const char*)pData );
- return TRUE;
+ //TODO:
};
-bool wxTextDropTarget::OnDropText( long x, long y, const char *psz )
+void wxDropTarget::Revoke(
+ WXHWND hwnd
+)
{
- printf( "Got dropped text: %s.\n", psz );
- printf( "At x: %d, y: %d.\n", (int)x, (int)y );
- return TRUE;
+ //TODO:
};
-size_t wxTextDropTarget::GetFormatCount() const
+wxDragResult wxDropTarget::OnDragOver(
+ wxCoord x
+, wxCoord y
+, wxDragResult vDef
+)
{
- return 1;
-}
-
-wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const
-{
- return wxDF_TEXT;
-}
-
-// ----------------------------------------------------------------------------
-// wxFileDropTarget
-// ----------------------------------------------------------------------------
+ //TODO:
+ return vDef;
+};
-bool wxFileDropTarget::OnDropFiles( long x, long y, size_t nFiles, const char * const WXUNUSED(aszFiles)[] )
+bool wxDropTarget::OnDrop(
+ wxCoord x
+, wxCoord y
+)
{
- printf( "Got %d dropped files.\n", (int)nFiles );
- printf( "At x: %d, y: %d.\n", (int)x, (int)y );
- return TRUE;
-}
+ //TODO:
+ return FALSE;
+};
-bool wxFileDropTarget::OnDrop(long x, long y, const void *WXUNUSED(pData) )
+wxDragResult wxDropTarget::OnData(
+ wxCoord x
+, wxCoord y
+, wxDragResult vResult
+)
{
- char *str = "/this/is/a/path.txt";
-
- return OnDropFiles(x, y, 1, &str );
-}
+ //TODO:
+ return (wxDragResult)0;
+};
-size_t wxFileDropTarget::GetFormatCount() const
+bool wxDropTarget::GetData()
{
- return 1;
-}
+ //TODO:
+ return FALSE;
+};
-wxDataFormat wxFileDropTarget::GetFormat(size_t WXUNUSED(n)) const
+bool wxDropTarget::IsAcceptable(
+ DRAGINFO* pInfo
+)
{
- return wxDF_FILENAME;
-}
+ //TODO:
+ return FALSE;
+};
//-------------------------------------------------------------------------
// wxDropSource
//-------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// drag request
-
-wxDropSource::wxDropSource( wxWindow *win )
+wxDropSource::wxDropSource(
+ wxWindow* pWin
+)
{
// TODO
- // m_window = win;
- m_data = NULL;
-
- // m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
- // m_goaheadCursor = wxCursor( wxCURSOR_HAND );
};
-wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
+wxDropSource::wxDropSource(
+ wxDataObject& rData
+, wxWindow* pWin
+)
{
// TODO
- // m_window = win;
- m_data = &data;
-
- // m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
- // m_goaheadCursor = wxCursor( wxCURSOR_HAND );
};
-void wxDropSource::SetData( wxDataObject &data )
+wxDropSource::~wxDropSource()
{
- m_data = &data;
+ // TODO
};
-wxDropSource::~wxDropSource(void)
+wxDragResult wxDropSource::DoDragDrop(
+ int WXUNUSED(flags)
+)
{
+ // TODO
+ return wxDragError;
};
-
-wxDragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
+
+void wxDropSource::Init()
{
// TODO
- return wxDragError;
};
+#endif //wxUSE_DRAG_AND_DROP