X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e320a79f187558effb04d92020b470372bbe456..6e8a778af3880037abd0edc3cc19fa98bb8170ba:/src/os2/dnd.cpp diff --git a/src/os2/dnd.cpp b/src/os2/dnd.cpp index 32088eef0f..70d916d652 100644 --- a/src/os2/dnd.cpp +++ b/src/os2/dnd.cpp @@ -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 @@ -13,10 +13,15 @@ #pragma implementation "dnd.h" #endif -#include "wx/dnd.h" +#define INCL_PM +#define INCL_DOS +#include #include "wx/window.h" #include "wx/app.h" #include "wx/gdicmn.h" +#include "wx/dnd.h" + +#if wxUSE_DRAG_AND_DROP // ---------------------------------------------------------------------------- // global @@ -26,108 +31,109 @@ // 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