]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dnd.cpp
fixed bug/assert failure when refreshing items in non report mode
[wxWidgets.git] / src / os2 / dnd.cpp
index 32088eef0f6deea25207f69117d2fdeb92a3f6da..70d916d6528af2565d4fcb688aec4e35a6d76a2a 100644 (file)
@@ -1,9 +1,9 @@
 ///////////////////////////////////////////////////////////////////////////////
 // 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(
+  bool                              WXUNUSED(bAllowMove)
+)
 {
+    // TODO
+    return wxDragError;
 };
-   
-wxDragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
+
+void wxDropSource::Init()
 {
     // TODO
-    return wxDragError;
 };
 
+#endif //wxUSE_DRAG_AND_DROP