X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c78e7c70271608b076b1dbed201b1204e6898d4..b1683d38998df9b7a03486ec11bfc46833de91c5:/src/qt/icon.cpp?ds=sidebyside diff --git a/src/qt/icon.cpp b/src/qt/icon.cpp index 7ab4484537..6deee7dbdc 100644 --- a/src/qt/icon.cpp +++ b/src/qt/icon.cpp @@ -1,10 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// // Name: icon.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem +// Purpose: wxIcon class +// Author: AUTHOR +// Modified by: +// Created: ??/??/98 +// RCS-ID: $Id$ +// Copyright: (c) AUTHOR // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -14,14 +15,56 @@ #include "wx/icon.h" -//----------------------------------------------------------------------------- -// wxIcon -//----------------------------------------------------------------------------- +#if !USE_SHARED_LIBRARIES +IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) +#endif + +/* + * Icons + */ + + +wxIconRefData::wxIconRefData() +{ + // TODO: init icon handle +} -IMPLEMENT_DYNAMIC_CLASS(wxIcon,wxBitmap) +wxIconRefData::~wxIconRefData() +{ + // TODO: destroy icon handle +} + +wxIcon::wxIcon() +{ +} -wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) : - wxBitmap( bits ) +wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height)) { -}; - +} + +wxIcon::wxIcon(const wxString& icon_file, long flags, + int desiredWidth, int desiredHeight) + +{ + LoadFile(icon_file, flags, desiredWidth, desiredHeight); +} + +wxIcon::~wxIcon() +{ +} + +bool wxIcon::LoadFile(const wxString& filename, long type, + int desiredWidth, int desiredHeight) +{ + UnRef(); + + m_refData = new wxIconRefData; + + wxBitmapHandler *handler = FindHandler(type); + + if ( handler ) + return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight); + else + return FALSE; +} +