///////////////////////////////////////////////////////////////////////////////
-// Name: mac/dataobj.cpp
+// Name: src/mac/classic/dataobj.cpp
// Purpose: implementation of wxDataObject class
// Author: Stefan Csomor
// Modified by:
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
// ============================================================================
// declarations
// ============================================================================
// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
- #pragma implementation "dataobj.h"
-#endif
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
#ifndef WX_PRECOMP
-#include "wx/intl.h"
+ #include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/defs.h"
-#include "wx/log.h"
#include "wx/dataobj.h"
#include "wx/mstream.h"
#include "wx/image.h"
// wxFileDataObject
// ----------------------------------------------------------------------------
-bool wxFileDataObject::GetDataHere(
- void* pBuf
-) const
+bool wxFileDataObject::GetDataHere( void* pBuf ) const
{
wxString sFilenames;
}
memcpy(pBuf, sFilenames.mbc_str(), sFilenames.Len() + 1);
- return TRUE;
+ return true;
}
size_t wxFileDataObject::GetDataSize() const
AddFile(wxString::FromAscii((char*)pBuf));
- return TRUE;
+ return true;
}
void wxFileDataObject::AddFile(
}
}
-void wxBitmapDataObject::Init()
-{
+void wxBitmapDataObject::Init()
+{
m_pictHandle = NULL ;
m_pictCreated = false ;
-}
+}
-void wxBitmapDataObject::Clear()
+void wxBitmapDataObject::Clear()
{
if ( m_pictCreated && m_pictHandle )
{
m_pictHandle = NULL ;
}
-bool wxBitmapDataObject::GetDataHere(
- void* pBuf
-) const
+bool wxBitmapDataObject::GetDataHere( void* pBuf ) const
{
if (!m_pictHandle)
{
wxFAIL_MSG(wxT("attempt to copy empty bitmap failed"));
- return FALSE;
+ return false;
}
memcpy(pBuf, *(Handle)m_pictHandle, GetHandleSize((Handle)m_pictHandle));
- return TRUE;
+ return true;
}
size_t wxBitmapDataObject::GetDataSize() const
m_pictHandle = picHandle ;
m_pictCreated = false ;
Rect frame = (**picHandle).picFrame ;
-
+
m_bitmap.SetPict( picHandle ) ;
m_bitmap.SetWidth( frame.right - frame.left ) ;
m_bitmap.SetHeight( frame.bottom - frame.top ) ;