1///////////////////////////////////////////////////////////////////////////// 2// Name: src/dfb/cursor.cpp 3// Purpose: wxCursor implementation 4// Author: Vaclav Slavik 5// Created: 2006-08-08 6// RCS-ID: $Id: cursor.cpp 42752 2006-10-30 19:26:48Z VZ $ 7// Copyright: (c) 2006 REA Elektronik GmbH 8// Licence: wxWindows licence 9///////////////////////////////////////////////////////////////////////////// 10 11// For compilers that support precompilation, includes "wx.h". 12#include "wx/wxprec.h" 13 14#ifdef __BORLANDC__ 15 #pragma hdrstop 16#endif 17 18#include "wx/cursor.h" 19#include "wx/bitmap.h" 20 21//----------------------------------------------------------------------------- 22// wxCursorRefData 23//----------------------------------------------------------------------------- 24 25class wxCursorRefData: public wxObjectRefData 26{ 27public: 28 wxCursorRefData(const wxBitmap& bmp = wxNullBitmap, int id = -1) 29 : m_id(id), m_bitmap(bmp) {} 30 31 int m_id; 32 wxBitmap m_bitmap; 33}; 34 35#define M_CURSOR_OF(c) ((wxCursorRefData*)((c).m_refData)) 36#define M_CURSOR M_CURSOR_OF(*this) 37 38//----------------------------------------------------------------------------- 39// wxCursor 40//----------------------------------------------------------------------------- 41 42IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxObject) 43 44wxCursor::wxCursor(int cursorId) 45{ 46#warning "FIXME -- implement the cursor as bitmaps (that's what DFB uses)" 47} 48 49wxCursor::wxCursor(const char WXUNUSED(bits)[], 50 int WXUNUSED(width), 51 int WXUNUSED(height), 52 int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY), 53 const char WXUNUSED(maskBits)[], 54 wxColour * WXUNUSED(fg), wxColour * WXUNUSED(bg) ) 55{ 56#warning "FIXME" 57} 58 59wxCursor::wxCursor(const wxString& cursor_file, 60 long flags, 61 int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY)) 62{ 63#warning "FIXME" 64} 65 66bool wxCursor::IsOk() const 67{ 68 return m_refData && M_CURSOR->m_bitmap.Ok(); 69} 70 71wxObjectRefData *wxCursor::CreateRefData() const 72{ 73 return new wxCursorRefData; 74} 75 76wxObjectRefData *wxCursor::CloneRefData(const wxObjectRefData *data) const 77{ 78 return new wxCursorRefData(*(wxCursorRefData *)data); 79} 80 81 82// ---------------------------------------------------------------------------- 83// Global cursor setting 84// ---------------------------------------------------------------------------- 85 86void wxSetCursor(const wxCursor& cursor) 87{ 88#warning "FIXME: implement" 89} 90 91 92 93//----------------------------------------------------------------------------- 94// busy cursor routines 95//----------------------------------------------------------------------------- 96 97#warning "FIXME: this should be common code" 98#if 0 99static wxCursor gs_savedCursor = wxNullCursor; 100static int gs_busyCount = 0; 101 102const wxCursor &wxBusyCursor::GetStoredCursor() 103{ 104 return gs_savedCursor; 105} 106 107const wxCursor wxBusyCursor::GetBusyCursor() 108{ 109 return gs_globalCursor; 110} 111#endif 112 113void wxEndBusyCursor() 114{ 115 #warning "FIXME - do this logic in common code?" 116} 117 118void wxBeginBusyCursor(const wxCursor *cursor) 119{ 120 #warning "FIXME" 121} 122 123bool wxIsBusy() 124{ 125 #warning "FIXME" 126 return false; 127} 128