git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55779
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxIcon(const char* const* data) { CreateFromXpm(data); }
wxIcon(const char bits[], int width , int height );
wxIcon(const char* const* data) { CreateFromXpm(data); }
wxIcon(const char bits[], int width , int height );
- wxIcon(const wxString& name, int flags = wxBITMAP_TYPE_ICON_RESOURCE,
- int desiredWidth = -1, int desiredHeight = -1);
+ wxIcon(const wxString& name, int flags = wxICON_DEFAULT_TYPE,
+ int desiredWidth = -1, int desiredHeight = -1);
wxIcon(const wxIconLocation& loc)
{
LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ICON);
}
virtual ~wxIcon();
wxIcon(const wxIconLocation& loc)
{
LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ICON);
}
virtual ~wxIcon();
- bool LoadFile(const wxString& name, wxBitmapType flags /* = wxBITMAP_TYPE_ICON_RESOURCE */ ,
- int desiredWidth /* = -1 */ , int desiredHeight = -1);
- bool LoadFile(const wxString& name, wxBitmapType flags = wxBITMAP_TYPE_ICON_RESOURCE )
- { return LoadFile( name , flags , -1 , -1 ) ; }
+ bool LoadFile(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE,
+ int desiredWidth=-1, int desiredHeight=-1);
bool operator==(const wxIcon& icon) const
{ return m_refData == icon.m_refData; }
bool operator==(const wxIcon& icon) const
{ return m_refData == icon.m_refData; }
+// a more readable way to tell
+#define wxICON_SCREEN_DEPTH (-1)
+
+
// the wxICON_DEFAULT_TYPE (the wxIcon equivalent of wxBITMAP_DEFAULT_TYPE)
// constant defines the default argument value for wxIcon ctor and wxIcon::LoadFile()
// functions.
// the wxICON_DEFAULT_TYPE (the wxIcon equivalent of wxBITMAP_DEFAULT_TYPE)
// constant defines the default argument value for wxIcon ctor and wxIcon::LoadFile()
// functions.
-#if defined(__WXMSW__)
- #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE
-#elif defined(__WXMGL__)
- #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE
-#elif defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON
- #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICON_RESOURCE
-#else
- #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
-#endif
-
-// a more readable way to tell
-#define wxICON_SCREEN_DEPTH (-1)
#if defined(__WXPALMOS__)
#if defined(__WXPALMOS__)
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/generic/icon.h"
#elif defined(__WXMSW__)
#include "wx/generic/icon.h"
#elif defined(__WXMSW__)
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE
#include "wx/msw/icon.h"
#elif defined(__WXMOTIF__)
#include "wx/msw/icon.h"
#elif defined(__WXMOTIF__)
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/motif/icon.h"
#elif defined(__WXGTK20__)
#include "wx/motif/icon.h"
#elif defined(__WXGTK20__)
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/generic/icon.h"
#elif defined(__WXGTK__)
#include "wx/generic/icon.h"
#elif defined(__WXGTK__)
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/generic/icon.h"
#elif defined(__WXX11__)
#include "wx/generic/icon.h"
#elif defined(__WXX11__)
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/generic/icon.h"
#elif defined(__WXMGL__)
#include "wx/generic/icon.h"
#elif defined(__WXMGL__)
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE
#include "wx/generic/icon.h"
#elif defined(__WXDFB__)
#include "wx/generic/icon.h"
#elif defined(__WXDFB__)
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/generic/icon.h"
#elif defined(__WXMAC__)
#if wxOSX_USE_COCOA_OR_CARBON
#include "wx/generic/icon.h"
#elif defined(__WXMAC__)
#if wxOSX_USE_COCOA_OR_CARBON
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICON_RESOURCE
#include "wx/osx/icon.h"
#else
#include "wx/osx/icon.h"
#else
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/generic/icon.h"
#endif
#elif defined(__WXCOCOA__)
#include "wx/generic/icon.h"
#endif
#elif defined(__WXCOCOA__)
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICON_RESOURCE
#include "wx/cocoa/icon.h"
#elif defined(__WXPM__)
#include "wx/cocoa/icon.h"
#elif defined(__WXPM__)
+ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE
#include "wx/os2/icon.h"
#endif
#include "wx/os2/icon.h"
#endif
wxIcon(char **data);
#endif
wxIcon(char **data);
#endif
- wxIcon(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_XPM,
+ wxIcon(const wxString& name, wxBitmapType type = wxICON_DEFAULT_TYPE,
int desiredWidth = -1, int desiredHeight = -1)
{
LoadFile(name, type, desiredWidth, desiredHeight);
int desiredWidth = -1, int desiredHeight = -1)
{
LoadFile(name, type, desiredWidth, desiredHeight);
- bool LoadFile(const wxString& name, wxBitmapType type,
- int desiredWidth, int desiredHeight = -1);
-
- // unhide base class LoadFile()
- virtual bool LoadFile(const wxString& name,
- wxBitmapType type = wxBITMAP_TYPE_XPM)
- {
- return LoadFile(name, type, -1, -1);
- }
+ bool LoadFile(const wxString& name, wxBitmapType type = wxICON_DEFAULT_TYPE,
+ int desiredWidth = -1, int desiredHeight = -1);
// create from bitmap (which should have a mask unless it's monochrome):
// there shouldn't be any implicit bitmap -> icon conversion (i.e. no
// create from bitmap (which should have a mask unless it's monochrome):
// there shouldn't be any implicit bitmap -> icon conversion (i.e. no
wxIcon(char** ppData) { CreateIconFromXpm(wx_const_cast(const char* const*, ppData)); }
#endif
wxIcon( const wxString& rName
wxIcon(char** ppData) { CreateIconFromXpm(wx_const_cast(const char* const*, ppData)); }
#endif
wxIcon( const wxString& rName
- ,wxBitmapType lFlags = wxBITMAP_TYPE_ICO_RESOURCE
+ ,wxBitmapType lFlags = wxICON_DEFAULT_TYPE
,int nDesiredWidth = -1
,int nDesiredHeight = -1
);
,int nDesiredWidth = -1
,int nDesiredHeight = -1
);
virtual ~wxIcon();
bool LoadFile( const wxString& rName
virtual ~wxIcon();
bool LoadFile( const wxString& rName
- ,wxBitmapType lFlags = wxBITMAP_TYPE_ICO_RESOURCE
+ ,wxBitmapType lFlags = wxICON_DEFAULT_TYPE
,int nDesiredWidth = -1
,int nDesiredHeight = -1
);
,int nDesiredWidth = -1
,int nDesiredHeight = -1
);