// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "cursor.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
//-----------------------------------------------------------------------------
-WX_DECLARE_HASH_MAP(int, wxCursor, wxIntegerHash, wxIntegerEqual, wxCursorsHash)
+WX_DECLARE_HASH_MAP(int, wxCursor, wxIntegerHash, wxIntegerEqual, wxCursorsHash);
static wxCursorsHash *gs_cursorsHash = NULL;
wxCursor::wxCursor(int 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);
switch (cursorId)
{
case wxCURSOR_ARROW: cursorname = "arrow.cur"; break;
+ case wxCURSOR_RIGHT_ARROW: cursorname = "rightarr.cur"; break;
case wxCURSOR_BULLSEYE: cursorname = "bullseye.cur"; break;
case wxCURSOR_CHAR: cursorname = "char.cur"; break;
case wxCURSOR_CROSS: cursorname = "cross.cur"; break;
class wxCursorModule : public wxModule
{
public:
- virtual bool OnInit()
- {
- gs_cursorsHash = new wxCursorsHash;
- return TRUE;
- }
+ virtual bool OnInit() { return TRUE; }
virtual void OnExit()
{