X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55ccdb93e4ae4b606a4068cb37492c1ec3ed77a6..04fa04d8067d235ab45b5bc05b65f0679634b541:/src/mgl/cursor.cpp diff --git a/src/mgl/cursor.cpp b/src/mgl/cursor.cpp index 5b9c7899d1..8832eff0e7 100644 --- a/src/mgl/cursor.cpp +++ b/src/mgl/cursor.cpp @@ -43,7 +43,7 @@ class wxCursorRefData: public wxObjectRefData wxCursorRefData::wxCursorRefData() { - m_cursor = (MGLCursor*) NULL; + m_cursor = NULL; } wxCursorRefData::~wxCursorRefData() @@ -65,14 +65,14 @@ wxCursor::wxCursor() { } -wxCursor::wxCursor(int cursorId) +void wxCursor::InitFromStock(wxStockCursor cursorId) { if ( !gs_cursorsHash ) gs_cursorsHash = new wxCursorsHash; if ( gs_cursorsHash->find(cursorId) != gs_cursorsHash->end() ) { - wxLogTrace(_T("mglcursor"), _T("cursor id %i fetched from cache"), cursorId); + wxLogTrace(wxT("mglcursor"), wxT("cursor id %i fetched from cache"), cursorId); *this = (*gs_cursorsHash)[cursorId]; return; } @@ -135,26 +135,16 @@ wxCursor::wxCursor(int cursorId) else { (*gs_cursorsHash)[cursorId] = *this; - wxLogTrace(_T("mglcursor"), _T("cursor id %i added to cache (%s)"), + wxLogTrace(wxT("mglcursor"), wxT("cursor id %i added to cache (%s)"), cursorId, cursorname); } } -wxCursor::wxCursor(const char WXUNUSED(bits)[], - int WXUNUSED(width), - int WXUNUSED(height), - int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY), - const char WXUNUSED(maskBits)[], - wxColour * WXUNUSED(fg), wxColour * WXUNUSED(bg) ) -{ - //FIXME_MGL -} - wxCursor::wxCursor(const wxString& cursor_file, - long flags, + wxBitmapType type, int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY)) { - if ( flags == wxBITMAP_TYPE_CUR || flags == wxBITMAP_TYPE_CUR_RESOURCE ) + if ( type == wxBITMAP_TYPE_CUR || type == wxBITMAP_TYPE_CUR_RESOURCE ) { m_refData = new wxCursorRefData(); M_CURSORDATA->m_cursor = new MGLCursor(cursor_file.mb_str()); @@ -175,11 +165,6 @@ wxCursor::~wxCursor() // wxObject unrefs data } -bool wxCursor::IsOk() const -{ - return (m_refData != NULL); -} - MGLCursor *wxCursor::GetMGLCursor() const { return M_CURSORDATA->m_cursor; @@ -195,7 +180,7 @@ static wxCursor gs_globalCursor = wxNullCursor; void wxSetCursor(const wxCursor& cursor) { - if ( cursor.Ok() ) + if ( cursor.IsOk() ) { if ( g_winMng ) MGL_wmSetGlobalCursor(g_winMng, *cursor.GetMGLCursor()); @@ -240,11 +225,11 @@ void wxBeginBusyCursor(const wxCursor *cursor) { if ( gs_busyCount++ > 0 ) return; - wxASSERT_MSG( !gs_savedCursor.Ok(), + wxASSERT_MSG( !gs_savedCursor.IsOk(), wxT("forgot to call wxEndBusyCursor, will leak memory") ); gs_savedCursor = gs_globalCursor; - if ( cursor->Ok() ) + if ( cursor->IsOk() ) wxSetCursor(*cursor); else wxSetCursor(wxCursor(wxCURSOR_WAIT));