diff --git a/include/wx/gtk/cursor.h b/include/wx/gtk/cursor.h index 51d106d445..532070e92e 100644 --- a/include/wx/gtk/cursor.h +++ b/include/wx/gtk/cursor.h @@ -25,10 +25,10 @@ public: #endif #if wxUSE_IMAGE wxCursor( const wxImage & image ); +#endif // wxUSE_IMAGE wxCursor(const wxString& name, wxBitmapType type = wxCURSOR_DEFAULT_TYPE, int hotSpotX = 0, int hotSpotY = 0); -#endif wxCursor( const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1, const char maskBits[] = NULL, diff --git a/include/wx/msw/cursor.h b/include/wx/msw/cursor.h index 786d4bf2a8..a6b2bc9ed6 100644 --- a/include/wx/msw/cursor.h +++ b/include/wx/msw/cursor.h @@ -19,7 +19,9 @@ class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase public: // constructors wxCursor(); +#if wxUSE_IMAGE wxCursor(const wxImage& image); +#endif // wxUSE_IMAGE wxCursor(const wxString& name, wxBitmapType type = wxCURSOR_DEFAULT_TYPE, int hotSpotX = 0, int hotSpotY = 0); diff --git a/include/wx/osx/cursor.h b/include/wx/osx/cursor.h index ae3eb2463a..68353791d3 100644 --- a/include/wx/osx/cursor.h +++ b/include/wx/osx/cursor.h @@ -19,7 +19,9 @@ class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase public: wxCursor(); +#if wxUSE_IMAGE wxCursor(const wxImage & image) ; +#endif // wxUSE_IMAGE wxCursor(const wxString& name, wxBitmapType type = wxCURSOR_DEFAULT_TYPE, int hotSpotX = 0, int hotSpotY = 0); diff --git a/include/wx/qt/cursor.h b/include/wx/qt/cursor.h index 92f0a7bc8c..d1db57af39 100644 --- a/include/wx/qt/cursor.h +++ b/include/wx/qt/cursor.h @@ -22,10 +22,10 @@ public: #endif #if wxUSE_IMAGE wxCursor( const wxImage & image ); +#endif // wxUSE_IMAGE wxCursor(const wxString& name, wxBitmapType type = wxCURSOR_DEFAULT_TYPE, int hotSpotX = 0, int hotSpotY = 0); -#endif virtual wxPoint GetHotSpot() const wxOVERRIDE; QCursor &GetHandle() const; diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index 07fe835b85..63ceaead2b 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -72,7 +72,6 @@ wxCursor::wxCursor() { } -#if wxUSE_IMAGE wxCursor::wxCursor(const wxString& cursor_file, wxBitmapType type, int hotSpotX, int hotSpotY) @@ -88,13 +87,15 @@ wxCursor::wxCursor(const wxString& cursor_file, img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, hotSpotY); InitFromImage(img); +#endif // wxUSE_IMAGE } +#if wxUSE_IMAGE wxCursor::wxCursor(const wxImage& img) { InitFromImage(img); } -#endif +#endif // wxUSE_IMAGE wxCursor::wxCursor(const char bits[], int width, int height, int hotSpotX, int hotSpotY, diff --git a/src/osx/carbon/cursor.cpp b/src/osx/carbon/cursor.cpp index 7b83407bcb..cf8da1c8b8 100644 --- a/src/osx/carbon/cursor.cpp +++ b/src/osx/carbon/cursor.cpp @@ -225,12 +225,12 @@ wxCursor::wxCursor() { } +#if wxUSE_IMAGE wxCursor::wxCursor( const wxImage &image ) { -#if wxUSE_IMAGE CreateFromImage( image ) ; -#endif } +#endif // wxUSE_IMAGE wxGDIRefData *wxCursor::CreateGDIRefData() const { diff --git a/src/qt/cursor.cpp b/src/qt/cursor.cpp index 002fa63c08..84022a5f20 100644 --- a/src/qt/cursor.cpp +++ b/src/qt/cursor.cpp @@ -59,11 +59,11 @@ public: wxIMPLEMENT_DYNAMIC_CLASS(wxCursor, wxGDIObject); -#if wxUSE_IMAGE wxCursor::wxCursor(const wxString& cursor_file, wxBitmapType type, int hotSpotX, int hotSpotY) { +#if wxUSE_IMAGE wxImage img; if (!img.LoadFile(cursor_file, type)) return; @@ -75,13 +75,15 @@ wxCursor::wxCursor(const wxString& cursor_file, img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, hotSpotY); InitFromImage(img); +#endif // wxUSE_IMAGE } +#if wxUSE_IMAGE wxCursor::wxCursor(const wxImage& img) { InitFromImage(img); } -#endif +#endif // wxUSE_IMAGE wxPoint wxCursor::GetHotSpot() const {