Add wxCursor ctor from XPM data to all ports
This just uses the existing wxImage ctor from XPM data and wxCursor ctor from wxImage, but will allow the code creating cursors from XPM to still work even when wxImage ctor from XPM is made explicit. Add a trivial test just to check that the new ctor can be used.
This commit is contained in:
@@ -32,6 +32,7 @@ public:
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
wxCursor(const wxImage& image);
|
||||
wxCursor(const char* const* xpmData);
|
||||
#endif
|
||||
|
||||
wxCursor(wxStockCursor id) { InitFromStock(id); }
|
||||
@@ -52,6 +53,10 @@ protected:
|
||||
private:
|
||||
void InitFromStock(wxStockCursor);
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
void InitFromImage(const wxImage& image);
|
||||
#endif
|
||||
|
||||
void Create(const char bits[], int width, int height,
|
||||
int hotSpotX = -1, int hotSpotY = -1,
|
||||
const char maskBits[] = NULL);
|
||||
|
Reference in New Issue
Block a user