Define wxICON_IS_BITMAP when this is indeed the case

This symbol is useful for testing if wxIcon can be just converted to
wxBitmap, as is the case in all ports except for wxMSW currently.
This commit is contained in:
Vadim Zeitlin 2021-10-21 18:14:01 +01:00
parent e126ddc11c
commit 5773a8736c
2 changed files with 9 additions and 0 deletions

View File

@ -401,6 +401,9 @@ more details.
defined when compiling code which uses wxWidgets as a DLL/shared library}
@itemdef{WXBUILDING,
defined when building wxWidgets itself, whether as a static or shared library}
@itemdef{wxICON_IS_BITMAP,
defined in the ports where wxIcon inherits from wxBitmap (all but
wxMSW currently)}
@endDefList
*/

View File

@ -25,6 +25,8 @@
#if defined(__WXMSW__)
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE
#include "wx/msw/icon.h"
#define wxICON_DIFFERENT_FROM_BITMAP
#elif defined(__WXMOTIF__)
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/motif/icon.h"
@ -58,6 +60,10 @@
#include "wx/generic/icon.h"
#endif
#ifndef wxICON_DIFFERENT_FROM_BITMAP
#define wxICON_IS_BITMAP
#endif
//-----------------------------------------------------------------------------
// wxVariant support
//-----------------------------------------------------------------------------