// Created: 2003/08/11
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
-// Licence: wxWidgets licence
+// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
+
+#include "wx/icon.h"
+
#ifndef WX_PRECOMP
- #include "wx/icon.h"
#endif //WX_PRECOMP
+
#include "wx/bitmap.h"
#include "wx/cocoa/autorelease.h"
wxIconRefData::wxIconRefData()
{
- m_ok = FALSE;
+ m_ok = false;
m_width = 0;
m_height = 0;
m_depth = 0;
M_ICONDATA->m_numColors = 0;
M_ICONDATA->m_quality = 0;
- return FALSE;
+ return false;
}
void wxIcon::CopyFromBitmap(const wxBitmap& bitmap)
return nil;
return M_ICONDATA->m_cocoaNSImage;
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: iconbndl.cpp
+// Name: src/common/iconbndl.cpp
// Purpose: wxIconBundle
// Author: Mattia Barbon
// Created: 23.03.2002
#pragma hdrstop
#endif
+#include "wx/iconbndl.h"
+
#ifndef WX_PRECOMP
#include "wx/settings.h"
#include "wx/icon.h"
#include "wx/image.h"
#endif
-#include "wx/iconbndl.h"
#include "wx/arrimpl.cpp"
WX_DEFINE_OBJARRAY(wxIconArray)
/////////////////////////////////////////////////////////////////////////////
-// Name: icon.cpp
+// Name: src/mac/classic/icon.cpp
// Purpose: wxIcon class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#include "wx/wxprec.h"
+
#include "wx/icon.h"
IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
{
}
-wxIcon::wxIcon(const char bits[], int width, int height) :
- wxBitmap(bits, width, height)
+wxIcon::wxIcon(const char bits[], int width, int height)
+ :wxBitmap(bits, width, height)
{
-
}
wxIcon::wxIcon( const char **bits ) :
int desiredWidth, int desiredHeight)
{
UnRef();
-
+
m_refData = new wxBitmapRefData;
-
+
wxBitmapHandler *handler = FindHandler((wxBitmapType)type);
-
+
if ( handler )
return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight);
else
- return FALSE;
+ return false;
}
void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
Str255 theName ;
OSType theType ;
wxMacStringToPascal( name , theName ) ;
-
+
Handle resHandle = GetNamedResource( 'cicn' , theName ) ;
if ( resHandle != 0L )
{
M_BITMAPHANDLERDATA->m_hIcon = theIcon ;
M_BITMAPHANDLERDATA->m_width = 32 ;
M_BITMAPHANDLERDATA->m_height = 32 ;
-
+
M_BITMAPHANDLERDATA->m_depth = 8 ;
M_BITMAPHANDLERDATA->m_ok = true ;
M_BITMAPHANDLERDATA->m_numColors = 256 ;
M_BITMAPHANDLERDATA->m_bitmapType = kMacBitmapTypeIcon ;
- return TRUE ;
+ return true;
}
}
- return FALSE ;
+ return false;
}