complete rev55777 with some icon.h modifications which I missed in the first place
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e912ebe39f
commit
c48d0d37c2
@ -25,7 +25,7 @@ public:
|
||||
|
||||
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,
|
||||
wxIcon(const wxString& name, int flags = wxICON_DEFAULT_TYPE,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
wxIcon(const wxIconLocation& loc)
|
||||
{
|
||||
@ -33,10 +33,8 @@ public:
|
||||
}
|
||||
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; }
|
||||
|
@ -15,47 +15,51 @@
|
||||
#include "wx/iconloc.h"
|
||||
|
||||
|
||||
// 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)
|
||||
|
||||
|
||||
// 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(__WXPALMOS__)
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
|
||||
#include "wx/generic/icon.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE
|
||||
#include "wx/msw/icon.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
|
||||
#include "wx/motif/icon.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
|
||||
#include "wx/generic/icon.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
|
||||
#include "wx/generic/icon.h"
|
||||
#elif defined(__WXX11__)
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
|
||||
#include "wx/generic/icon.h"
|
||||
#elif defined(__WXMGL__)
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE
|
||||
#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
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICON_RESOURCE
|
||||
#include "wx/osx/icon.h"
|
||||
#else
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
|
||||
#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__)
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE
|
||||
#include "wx/os2/icon.h"
|
||||
#endif
|
||||
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
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);
|
||||
@ -42,15 +42,8 @@ public:
|
||||
|
||||
virtual ~wxIcon();
|
||||
|
||||
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
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
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
|
||||
);
|
||||
@ -61,7 +61,7 @@ public:
|
||||
virtual ~wxIcon();
|
||||
|
||||
bool LoadFile( const wxString& rName
|
||||
,wxBitmapType lFlags = wxBITMAP_TYPE_ICO_RESOURCE
|
||||
,wxBitmapType lFlags = wxICON_DEFAULT_TYPE
|
||||
,int nDesiredWidth = -1
|
||||
,int nDesiredHeight = -1
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user