]> git.saurik.com Git - wxWidgets.git/blob - src/dfb/cursor.cpp
don't call LogLastRepeatIfNeeded() from dtor, it's too late to do it there anyhow...
[wxWidgets.git] / src / dfb / cursor.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/dfb/cursor.cpp
3 // Purpose: wxCursor implementation
4 // Author: Vaclav Slavik
5 // Created: 2006-08-08
6 // RCS-ID: $Id$
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
25 class wxCursorRefData : public wxGDIRefData
26 {
27 public:
28 wxCursorRefData(const wxBitmap& bmp = wxNullBitmap, int id = -1)
29 : m_id(id), m_bitmap(bmp) {}
30
31 virtual bool IsOk() const { return m_bitmap.IsOk(); }
32
33 int m_id;
34 wxBitmap m_bitmap;
35 };
36
37 #define M_CURSOR_OF(c) ((wxCursorRefData*)((c).m_refData))
38 #define M_CURSOR M_CURSOR_OF(*this)
39
40 //-----------------------------------------------------------------------------
41 // wxCursor
42 //-----------------------------------------------------------------------------
43
44 IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxObject)
45
46 wxCursor::wxCursor(int cursorId)
47 {
48 #warning "FIXME -- implement the cursor as bitmaps (that's what DFB uses)"
49 }
50
51 wxCursor::wxCursor(const char WXUNUSED(bits)[],
52 int WXUNUSED(width),
53 int WXUNUSED(height),
54 int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY),
55 const char WXUNUSED(maskBits)[],
56 wxColour * WXUNUSED(fg), wxColour * WXUNUSED(bg) )
57 {
58 #warning "FIXME"
59 }
60
61 wxCursor::wxCursor(const wxString& cursor_file,
62 long flags,
63 int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY))
64 {
65 #warning "FIXME"
66 }
67
68 wxGDIRefData *wxCursor::CreateGDIRefData() const
69 {
70 return new wxCursorRefData;
71 }
72
73 wxGDIRefData *wxCursor::CloneGDIRefData(const wxGDIRefData *data) const
74 {
75 return new wxCursorRefData(*(wxCursorRefData *)data);
76 }
77
78
79 // ----------------------------------------------------------------------------
80 // Global cursor setting
81 // ----------------------------------------------------------------------------
82
83 void wxSetCursor(const wxCursor& cursor)
84 {
85 #warning "FIXME: implement"
86 }
87
88
89
90 //-----------------------------------------------------------------------------
91 // busy cursor routines
92 //-----------------------------------------------------------------------------
93
94 #warning "FIXME: this should be common code"
95 #if 0
96 static wxCursor gs_savedCursor = wxNullCursor;
97 static int gs_busyCount = 0;
98
99 const wxCursor &wxBusyCursor::GetStoredCursor()
100 {
101 return gs_savedCursor;
102 }
103
104 const wxCursor wxBusyCursor::GetBusyCursor()
105 {
106 return gs_globalCursor;
107 }
108 #endif
109
110 void wxEndBusyCursor()
111 {
112 #warning "FIXME - do this logic in common code?"
113 }
114
115 void wxBeginBusyCursor(const wxCursor *cursor)
116 {
117 #warning "FIXME"
118 }
119
120 bool wxIsBusy()
121 {
122 #warning "FIXME"
123 return false;
124 }