wx/wxprec.h already includes wx/defs.h (with other minor cleaning).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-04-18 09:05:00 +00:00
parent ce3e37f1ec
commit 18f3decb46
28 changed files with 710 additions and 638 deletions

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: mac/dataobj.cpp
// Name: src/mac/classic/dataobj.cpp
// Purpose: implementation of wxDataObject class
// Author: Stefan Csomor
// Modified by:
@@ -9,6 +9,12 @@
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// ============================================================================
// declarations
// ============================================================================
@@ -17,13 +23,9 @@
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/intl.h"
#endif
#include "wx/defs.h"
#include "wx/log.h"
#include "wx/dataobj.h"
@@ -166,9 +168,7 @@ bool wxDataObject::IsSupportedFormat(
// wxFileDataObject
// ----------------------------------------------------------------------------
bool wxFileDataObject::GetDataHere(
void* pBuf
) const
bool wxFileDataObject::GetDataHere( void* pBuf ) const
{
wxString sFilenames;
@@ -179,7 +179,7 @@ bool wxFileDataObject::GetDataHere(
}
memcpy(pBuf, sFilenames.mbc_str(), sFilenames.Len() + 1);
return TRUE;
return true;
}
size_t wxFileDataObject::GetDataSize() const
@@ -204,7 +204,7 @@ bool wxFileDataObject::SetData(
AddFile(wxString::FromAscii((char*)pBuf));
return TRUE;
return true;
}
void wxFileDataObject::AddFile(
@@ -252,13 +252,13 @@ void wxBitmapDataObject::SetBitmap(
}
}
void wxBitmapDataObject::Init()
{
void wxBitmapDataObject::Init()
{
m_pictHandle = NULL ;
m_pictCreated = false ;
}
}
void wxBitmapDataObject::Clear()
void wxBitmapDataObject::Clear()
{
if ( m_pictCreated && m_pictHandle )
{
@@ -267,17 +267,15 @@ void wxBitmapDataObject::Clear()
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
@@ -296,7 +294,7 @@ bool wxBitmapDataObject::SetData(
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 ) ;