Creates a new icon.
-\func{}{wxIcon}{\param{char**}{ bits}}
-
-\func{}{wxIcon}{\param{const char**}{ bits}}
+\func{}{wxIcon}{\param{const char* const*}{ bits}}
Creates an icon from XPM data.
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);
int GetHeight() const;
WX_NSImage GetNSImage() const;
- bool CreateFromXpm(const char **bits);
+ bool CreateFromXpm(const char* const* bits);
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
#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 )
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
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.
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 ;
// 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
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);
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)
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,
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)
,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
{
return new wxIconRefData;
}
- void CreateIconFromXpm(const char **ppData);
+ void CreateIconFromXpm(const char* const* ppData);
private:
bool m_bIsXpm;
return new wxIconRefData(*wx_static_cast(const wxIconRefData *, data));
}
-bool wxIcon::CreateFromXpm(const char **xpm)
+bool wxIcon::CreateFromXpm(const char* const* xpm)
{
wxBitmap bitmap(xpm);
CopyFromBitmap(bitmap);
IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
-wxIcon::wxIcon( const char **bits, int WXUNUSED(width), int WXUNUSED(height) ) :
+wxIcon::wxIcon(const char* const* bits) :
wxBitmap( bits )
{
}
-wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) :
+#ifdef wxNEEDS_CHARPP
+wxIcon::wxIcon(char **bits) :
wxBitmap( bits )
{
}
+#endif
wxIcon::wxIcon() : wxBitmap()
{
#endif
}
-wxCursor::wxCursor(const char **bits)
+wxCursor::wxCursor(const char* const* bits)
{
(void) CreateFromXpm(bits);
}
-wxCursor::wxCursor(char **bits)
-{
- (void) CreateFromXpm((const char **)bits);
-}
-
wxGDIRefData *wxCursor::CreateGDIRefData() const
{
return new wxCursorRefData;
return new wxCursorRefData(*wx_static_cast(const wxCursorRefData *, data));
}
-bool wxCursor::CreateFromXpm(const char **bits)
+bool wxCursor::CreateFromXpm(const char* const* bits)
{
#if wxUSE_IMAGE
wxCHECK_MSG( bits != NULL, false, wxT("invalid cursor data") );
CopyFromBitmap( bmp ) ;
}
-wxIcon::wxIcon( const char **bits )
-{
- wxBitmap bmp( bits ) ;
- CopyFromBitmap( bmp ) ;
-}
-
-wxIcon::wxIcon( char **bits )
+wxIcon::wxIcon(const char* const* bits)
{
wxBitmap bmp( bits ) ;
CopyFromBitmap( bmp ) ;
(void) Create((void*) bits, wxBITMAP_TYPE_XBM_DATA, width, height, 1);
}
+#ifdef wxNEEDS_CHARPP
// Create from XPM data
wxIcon::wxIcon(char **data)
{
(void) Create((void*) data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
}
+#endif
-wxIcon::wxIcon(const char **data)
+wxIcon::wxIcon(const char* const* data)
{
(void) Create((void*) data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
}
#endif // __WXMICROWIN__
}
-void wxIcon::CreateIconFromXpm(const char **data)
+void wxIcon::CreateIconFromXpm(const char* const* data)
{
wxBitmap bmp(data);
CopyFromBitmap(bmp);
{
}
-void wxIcon::CreateIconFromXpm(
- const char** ppData
-)
+void wxIcon::CreateIconFromXpm(const char* const* ppData)
{
wxBitmap vBmp(ppData);