make XPM data pointer parameter fully const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -23,8 +23,7 @@ class WXDLLEXPORT wxIcon : public wxGDIObject
|
||||
public:
|
||||
wxIcon();
|
||||
|
||||
wxIcon(const char **data) { CreateFromXpm(data); }
|
||||
wxIcon(char **data) { CreateFromXpm((const char**)data); }
|
||||
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);
|
||||
@@ -52,7 +51,7 @@ public:
|
||||
int GetHeight() const;
|
||||
|
||||
WX_NSImage GetNSImage() const;
|
||||
bool CreateFromXpm(const char **bits);
|
||||
bool CreateFromXpm(const char* const* bits);
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
|
@@ -158,16 +158,16 @@ enum wxStockCursor
|
||||
#define wxICON(X) wxIcon(wxT(#X))
|
||||
#elif defined(__WXMGL__)
|
||||
// Initialize from an included XPM
|
||||
#define wxICON(X) wxIcon( (const char**) X##_xpm )
|
||||
#define wxICON(X) wxIcon( X##_xpm )
|
||||
#elif defined(__WXDFB__)
|
||||
// Initialize from an included XPM
|
||||
#define wxICON(X) wxIcon( (const char**) X##_xpm )
|
||||
#define wxICON(X) wxIcon( X##_xpm )
|
||||
#elif defined(__WXGTK__)
|
||||
// Initialize from an included XPM
|
||||
#define wxICON(X) wxIcon( (const char**) X##_xpm )
|
||||
#define wxICON(X) wxIcon( X##_xpm )
|
||||
#elif defined(__WXMAC__)
|
||||
// Initialize from an included XPM
|
||||
#define wxICON(X) wxIcon( (const char**) X##_xpm )
|
||||
#define wxICON(X) wxIcon( X##_xpm )
|
||||
#elif defined(__WXMOTIF__)
|
||||
// Initialize from an included XPM
|
||||
#define wxICON(X) wxIcon( X##_xpm )
|
||||
@@ -193,7 +193,7 @@ enum wxStockCursor
|
||||
defined(__WXDFB__) || \
|
||||
defined(__WXCOCOA__)
|
||||
// Initialize from an included XPM
|
||||
#define wxBITMAP(name) wxBitmap( (const char**) name##_xpm )
|
||||
#define wxBITMAP(name) wxBitmap(name##_xpm)
|
||||
#else // other platforms
|
||||
#define wxBITMAP(name) wxBitmap(name##_xpm, wxBITMAP_TYPE_XPM)
|
||||
#endif // platform
|
||||
|
@@ -27,8 +27,10 @@ class WXDLLIMPEXP_CORE wxIcon: public wxBitmap
|
||||
public:
|
||||
wxIcon();
|
||||
|
||||
wxIcon( const char **bits, int width=-1, int height=-1 );
|
||||
wxIcon( char **bits, int width=-1, int height=-1 );
|
||||
wxIcon(const char* const* bits);
|
||||
#ifdef wxNEEDS_CHARPP
|
||||
wxIcon(char **bits);
|
||||
#endif
|
||||
|
||||
// For compatibility with wxMSW where desired size is sometimes required to
|
||||
// distinguish between multiple icons in a resource.
|
||||
|
@@ -25,15 +25,14 @@ public:
|
||||
const char maskBits[] = NULL);
|
||||
|
||||
wxCursor(const wxImage & image) ;
|
||||
wxCursor(const char **bits) ;
|
||||
wxCursor(char **bits) ;
|
||||
wxCursor(const char* const* bits);
|
||||
wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_MACCURSOR_RESOURCE,
|
||||
int hotSpotX = 0, int hotSpotY = 0);
|
||||
|
||||
wxCursor(int cursor_type);
|
||||
virtual ~wxCursor();
|
||||
|
||||
bool CreateFromXpm(const char **bits) ;
|
||||
bool CreateFromXpm(const char* const* bits);
|
||||
|
||||
void MacInstall() const ;
|
||||
|
||||
|
@@ -39,7 +39,7 @@ class WXDLLIMPEXP_FWD_CORE wxDropSource;
|
||||
// the icon 'name' from an XPM file under GTK, but will expand to something
|
||||
// else under MSW. If you don't use it, you will have to use #ifdef in the
|
||||
// application code.
|
||||
#define wxDROP_ICON(X) wxCursor( (const char**) X##_xpm )
|
||||
#define wxDROP_ICON(X) wxCursor(X##_xpm)
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDropTarget
|
||||
|
@@ -20,8 +20,7 @@ class WXDLLEXPORT wxIcon : public wxGDIObject
|
||||
public:
|
||||
wxIcon();
|
||||
|
||||
wxIcon(const char **data);
|
||||
wxIcon(char **data);
|
||||
wxIcon(const char* const* 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);
|
||||
|
@@ -24,8 +24,10 @@ public:
|
||||
wxIcon(const char bits[], int width, int height);
|
||||
|
||||
// Initialize with XPM data
|
||||
wxIcon(const char **data);
|
||||
wxIcon(const char* const* data);
|
||||
#ifdef wxNEEDS_CHARPP
|
||||
wxIcon(char **data);
|
||||
#endif
|
||||
|
||||
wxIcon(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_XPM,
|
||||
int desiredWidth = -1, int desiredHeight = -1)
|
||||
|
@@ -48,10 +48,10 @@ public:
|
||||
wxIcon(const char bits[], int width, int height);
|
||||
|
||||
// from XPM data
|
||||
wxIcon(const char **data) { CreateIconFromXpm(data); }
|
||||
|
||||
wxIcon(char **data) { CreateIconFromXpm((const char **)data); }
|
||||
|
||||
wxIcon(const char* const* data) { CreateIconFromXpm(data); }
|
||||
#ifdef wxNEEDS_CHARPP
|
||||
wxIcon(char **data) { CreateIconFromXpm(wx_const_cast(const char* const*, data)); }
|
||||
#endif
|
||||
// from resource/file
|
||||
wxIcon(const wxString& name,
|
||||
long type = wxBITMAP_TYPE_ICO_RESOURCE,
|
||||
@@ -85,7 +85,7 @@ protected:
|
||||
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
||||
|
||||
// create from XPM data
|
||||
void CreateIconFromXpm(const char **data);
|
||||
void CreateIconFromXpm(const char* const* data);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxIcon)
|
||||
|
@@ -44,8 +44,10 @@ public:
|
||||
,int nWidth
|
||||
,int nHeight
|
||||
);
|
||||
inline wxIcon(const char** ppData) { CreateIconFromXpm(ppData); }
|
||||
inline wxIcon(char** ppData) { CreateIconFromXpm((const char**)ppData); }
|
||||
wxIcon(const char* const* ppData) { CreateIconFromXpm(ppData); }
|
||||
#ifdef wxNEEDS_CHARPP
|
||||
wxIcon(char** ppData) { CreateIconFromXpm(wx_const_cast(const char* const*, ppData)); }
|
||||
#endif
|
||||
wxIcon( const wxString& rName
|
||||
,long lFlags = wxBITMAP_TYPE_ICO_RESOURCE
|
||||
,int nDesiredWidth = -1
|
||||
@@ -77,7 +79,7 @@ protected:
|
||||
{
|
||||
return new wxIconRefData;
|
||||
}
|
||||
void CreateIconFromXpm(const char **ppData);
|
||||
void CreateIconFromXpm(const char* const* ppData);
|
||||
|
||||
private:
|
||||
bool m_bIsXpm;
|
||||
|
Reference in New Issue
Block a user