X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c77c29207be61bd310a9d7299df985b151b0c177..c944775f72435d2c0493113e05445898ab8baf1b:/src/msw/cursor.cpp diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index 8705abeeea..5e0bb783f9 100644 --- a/src/msw/cursor.cpp +++ b/src/msw/cursor.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "cursor.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -28,19 +24,19 @@ #pragma hdrstop #endif +#include "wx/cursor.h" + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/app.h" #include "wx/bitmap.h" #include "wx/icon.h" - #include "wx/cursor.h" #include "wx/settings.h" #include "wx/intl.h" + #include "wx/image.h" + #include "wx/module.h" #endif -#include "wx/module.h" -#include "wx/image.h" - #include "wx/msw/private.h" #include "wx/msw/missing.h" // IDC_HAND @@ -221,7 +217,7 @@ wxCursor::wxCursor(const wxImage& image) m_refData = new wxCursorRefData(hcursor, true /* delete it later */); } -#endif +#endif // wxUSE_IMAGE wxCursor::wxCursor(const char WXUNUSED(bits)[], int WXUNUSED(width), @@ -256,12 +252,12 @@ wxCursor::wxCursor(const wxString& filename, switch ( kind ) { case wxBITMAP_TYPE_CUR_RESOURCE: - hcursor = ::LoadCursor(wxGetInstance(), filename); + hcursor = ::LoadCursor(wxGetInstance(), filename.fn_str()); break; #ifndef __WXWINCE__ case wxBITMAP_TYPE_CUR: - hcursor = ::LoadCursorFromFile(filename); + hcursor = ::LoadCursorFromFile(filename.fn_str()); break; #endif @@ -313,7 +309,7 @@ wxCursor::wxCursor(int idCursor) { false, _T("WXCURSOR_RIGHT_ARROW") }, // wxCURSOR_RIGHT_ARROW { false, _T("WXCURSOR_BULLSEYE") }, // wxCURSOR_BULLSEYE { true, IDC_ARROW }, // WXCURSOR_CHAR - + // Displays as an I-beam on XP, so use a cursor file // { true, IDC_CROSS }, // WXCURSOR_CROSS { false, _T("WXCURSOR_CROSS") }, // WXCURSOR_CROSS @@ -321,7 +317,7 @@ wxCursor::wxCursor(int idCursor) // See special handling below for wxCURSOR_HAND // { false, _T("WXCURSOR_HAND") }, // wxCURSOR_HAND { true, IDC_HAND }, // wxCURSOR_HAND - + { true, IDC_IBEAM }, // WXCURSOR_IBEAM { true, IDC_ARROW }, // WXCURSOR_LEFT_BUTTON { false, _T("WXCURSOR_MAGNIFIER") }, // wxCURSOR_MAGNIFIER @@ -365,7 +361,7 @@ wxCursor::wxCursor(int idCursor) hcursor = ::LoadCursor(wxGetInstance(), _T("WXCURSOR_HAND")); deleteLater = true; } - + if ( !hcursor ) { wxLogLastError(_T("LoadCursor")); @@ -386,16 +382,6 @@ wxCursor::~wxCursor() // other wxCursor functions // ---------------------------------------------------------------------------- -bool wxCursor::operator==(const wxCursor& cursor) const -{ - if ( !m_refData ) - return !cursor.m_refData; - - return cursor.m_refData && - ((wxCursorRefData *)m_refData)->m_hCursor == - ((wxCursorRefData *)cursor.m_refData)->m_hCursor; -} - wxGDIImageRefData *wxCursor::CreateData() const { return new wxCursorRefData; @@ -420,5 +406,3 @@ void wxSetCursor(const wxCursor& cursor) *gs_globalCursor = cursor; } } - -