projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Include wx/gauge.h according to precompiled headers of wx/wx.h (with other minor...
[wxWidgets.git]
/
src
/
mac
/
classic
/
bitmap.cpp
diff --git
a/src/mac/classic/bitmap.cpp
b/src/mac/classic/bitmap.cpp
index 6cbaa9d9b76178bd55967c581059beb46677d666..54cc8bba0193f87f806c229c5116b2933ae16756 100644
(file)
--- a/
src/mac/classic/bitmap.cpp
+++ b/
src/mac/classic/bitmap.cpp
@@
-1,5
+1,5
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: bitmap.cpp
+// Name:
src/mac/classic/
bitmap.cpp
// Purpose: wxBitmap
// Author: Stefan Csomor
// Modified by:
// Purpose: wxBitmap
// Author: Stefan Csomor
// Modified by:
@@
-9,15
+9,19
@@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "bitmap.h"
-#endif
+#include "wx/wxprec.h"
-#include "wx/defs.h"
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
#include "wx/bitmap.h"
#include "wx/bitmap.h"
-#include "wx/icon.h"
-#include "wx/log.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+ #include "wx/icon.h"
+#endif
+
#include "wx/image.h"
#include "wx/xpmdecod.h"
#include "wx/image.h"
#include "wx/xpmdecod.h"
@@
-168,7
+172,7
@@
OSErr SetupCIconHandlePixMap( CIconHandle icon , short depth , Rect *bounds , C
else
newColors = nil;
else
newColors = nil;
- /* If no errors occured, return a handle to the new off-screen PixMap */
+ /* If no errors occur
r
ed, return a handle to the new off-screen PixMap */
if (error != noErr)
{
if (newColors != nil)
if (error != noErr)
{
if (newColors != nil)
@@
-357,7
+361,7
@@
wxBitmapRefData::wxBitmapRefData()
: m_width(0)
, m_height(0)
, m_depth(0)
: m_width(0)
, m_height(0)
, m_depth(0)
- , m_ok(
FALSE
)
+ , m_ok(
false
)
, m_numColors(0)
, m_quality(0)
{
, m_numColors(0)
, m_quality(0)
{
@@
-512,12
+516,12
@@
wxBitmap::wxBitmap(const wxString& filename, wxBitmapType type)
bool wxBitmap::CreateFromXpm(const char **bits)
{
bool wxBitmap::CreateFromXpm(const char **bits)
{
- wxCHECK_MSG( bits != NULL,
FALSE, wxT("invalid bitmap data") )
+ wxCHECK_MSG( bits != NULL,
false, wxT("invalid bitmap data") );
wxXPMDecoder decoder;
wxImage img = decoder.ReadData(bits);
wxXPMDecoder decoder;
wxImage img = decoder.ReadData(bits);
- wxCHECK_MSG( img.Ok(),
FALSE, wxT("invalid bitmap data") )
+ wxCHECK_MSG( img.Ok(),
false, wxT("invalid bitmap data") );
*this = wxBitmap(img);
*this = wxBitmap(img);
- return
TRUE
;
+ return
true
;
}
wxBitmap::wxBitmap(const char **bits)
}
wxBitmap::wxBitmap(const char **bits)
@@
-714,7
+718,7
@@
bool wxBitmap::Create(void *data, wxBitmapType type, int width, int height, int
if ( handler == NULL ) {
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
if ( handler == NULL ) {
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
- return
FALSE
;
+ return
false
;
}
return handler->Create(this, data, type, width, height, depth);
}
return handler->Create(this, data, type, width, height, depth);
@@
-722,8
+726,8
@@
bool wxBitmap::Create(void *data, wxBitmapType type, int width, int height, int
wxBitmap::wxBitmap(const wxImage& image, int depth)
{
wxBitmap::wxBitmap(const wxImage& image, int depth)
{
- wxCHECK_RET( image.Ok(), wxT("invalid image") )
- wxCHECK_RET( depth == -1, wxT("invalid bitmap depth") )
+ wxCHECK_RET( image.Ok(), wxT("invalid image") )
;
+ wxCHECK_RET( depth == -1, wxT("invalid bitmap depth") )
;
m_refData = new wxBitmapRefData();
m_refData = new wxBitmapRefData();
@@
-1166,7
+1170,7
@@
bool wxMask::Create(const wxBitmap& bitmap)
UnlockPixels( GetGWorldPixMap( (GWorldPtr) m_maskBitmap) );
UnlockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP()) );
UnlockPixels( GetGWorldPixMap( (GWorldPtr) m_maskBitmap) );
UnlockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP()) );
- return
FALSE
;
+ return
false
;
}
// Create a mask from a bitmap and a palette index indicating
}
// Create a mask from a bitmap and a palette index indicating
@@
-1175,7
+1179,7
@@
bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex)
{
// TODO
wxCHECK_MSG( 0, false, wxT("wxMask::Create not yet implemented"));
{
// TODO
wxCHECK_MSG( 0, false, wxT("wxMask::Create not yet implemented"));
- return
FALSE
;
+ return
false
;
}
// Create a mask from a bitmap and a colour indicating
}
// Create a mask from a bitmap and a colour indicating
@@
-1230,7
+1234,7
@@
bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
UnlockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP() ) ) ;
SetGWorld( origPort , origDevice ) ;
UnlockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP() ) ) ;
SetGWorld( origPort , origDevice ) ;
- return
TRUE
;
+ return
true
;
}
bool wxMask::PointMasked(int x, int y)
}
bool wxMask::PointMasked(int x, int y)
@@
-1264,18
+1268,18
@@
wxBitmapHandler::~wxBitmapHandler()
bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth)
{
bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth)
{
- return
FALSE
;
+ return
false
;
}
bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth, int desiredHeight)
{
}
bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth, int desiredHeight)
{
- return
FALSE
;
+ return
false
;
}
bool wxBitmapHandler::SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette)
{
}
bool wxBitmapHandler::SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette)
{
- return
FALSE
;
+ return
false
;
}
/*
}
/*
@@
-1321,9
+1325,9
@@
bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, lo
M_BITMAPHANDLERDATA->m_numColors = theInfo.uniqueColors ;
// M_BITMAPHANDLERDATA->m_bitmapPalette;
// M_BITMAPHANDLERDATA->m_quality;
M_BITMAPHANDLERDATA->m_numColors = theInfo.uniqueColors ;
// M_BITMAPHANDLERDATA->m_bitmapPalette;
// M_BITMAPHANDLERDATA->m_quality;
- return
TRUE
;
+ return
true
;
}
}
- return
FALSE
;
+ return
false
;
}
void wxBitmap::InitStandardHandlers()
}
void wxBitmap::InitStandardHandlers()
@@
-1433,4
+1437,3
@@
void wxBitmap::UseAlpha()
// mask in UngetRawData()
M_BITMAPDATA->m_hasAlpha = true;
}
// mask in UngetRawData()
M_BITMAPDATA->m_hasAlpha = true;
}
-