Files
wxWidgets/src/motif/icon.cpp
Vadim Zeitlin 3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00

68 lines
1.6 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: src/motif/icon.cpp
// Purpose: wxIcon class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/icon.h"
IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
// ============================================================================
// Icons
// ============================================================================
wxIcon::wxIcon()
{
}
// Create from XBM data
wxIcon::wxIcon(const char bits[], int width, int height)
{
(void) Create((void*) bits, wxBITMAP_TYPE_XBM_DATA, width, height, 1);
}
#ifdef wxNEEDS_CHARPP
// Create from XPM data
wxIcon::wxIcon(char **data)
{
(void) Create((void*) data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
}
#endif
wxIcon::wxIcon(const char* const* data)
{
(void) Create((void*) data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
}
void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
{
wxIcon *icon = (wxIcon*)(&bmp);
*this = *icon;
}
wxIcon::~wxIcon()
{
}
bool wxIcon::LoadFile(const wxString& filename, wxBitmapType type,
int desiredWidth, int desiredHeight)
{
UnRef();
wxBitmapHandler *handler = FindHandler(type);
if ( handler )
return handler->LoadFile(this, filename, type,
desiredWidth, desiredHeight);
else
return false;
}