]> git.saurik.com Git - wxWidgets.git/blob - src/dfb/cursor.cpp
Fix ribbon documentation warnings.
[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 // Copyright: (c) 2006 REA Elektronik GmbH
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
12
13 #ifdef __BORLANDC__
14 #pragma hdrstop
15 #endif
16
17 #include "wx/cursor.h"
18 #include "wx/bitmap.h"
19
20 //-----------------------------------------------------------------------------
21 // wxCursorRefData
22 //-----------------------------------------------------------------------------
23
24 class wxCursorRefData : public wxGDIRefData
25 {
26 public:
27 wxCursorRefData(const wxBitmap& bmp = wxNullBitmap, int id = -1)
28 : m_id(id), m_bitmap(bmp) {}
29
30 virtual bool IsOk() const { return m_bitmap.IsOk(); }
31
32 // Create a deep copy of this object.
33 wxCursorRefData *Clone() const
34 {
35 wxBitmap bitmapCopy(m_bitmap);
36 bitmapCopy.UnShare();
37
38 return new wxCursorRefData(bitmapCopy, m_id);
39 }
40
41 int m_id;
42 wxBitmap m_bitmap;
43 };
44
45 #define M_CURSOR_OF(c) ((wxCursorRefData*)((c).m_refData))
46 #define M_CURSOR M_CURSOR_OF(*this)
47
48 //-----------------------------------------------------------------------------
49 // wxCursor
50 //-----------------------------------------------------------------------------
51
52 IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxObject)
53
54 void wxCursor::InitFromStock(wxStockCursor cursorId)
55 {
56 #warning "FIXME -- implement the cursor as bitmaps (that's what DFB uses)"
57 }
58
59 wxCursor::wxCursor(const wxString& cursor_file,
60 wxBitmapType type,
61 int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY))
62 {
63 #warning "FIXME"
64 }
65
66 wxGDIRefData *wxCursor::CreateGDIRefData() const
67 {
68 return new wxCursorRefData;
69 }
70
71 wxGDIRefData *wxCursor::CloneGDIRefData(const wxGDIRefData *data) const
72 {
73 return static_cast<const wxCursorRefData *>(data)->Clone();
74 }
75
76
77 // ----------------------------------------------------------------------------
78 // Global cursor setting
79 // ----------------------------------------------------------------------------
80
81 void wxSetCursor(const wxCursor& cursor)
82 {
83 #warning "FIXME: implement"
84 }
85
86
87
88 //-----------------------------------------------------------------------------
89 // busy cursor routines
90 //-----------------------------------------------------------------------------
91
92 #warning "FIXME: this should be common code"
93 #if 0
94 static wxCursor gs_savedCursor = wxNullCursor;
95 static int gs_busyCount = 0;
96
97 const wxCursor &wxBusyCursor::GetStoredCursor()
98 {
99 return gs_savedCursor;
100 }
101
102 const wxCursor wxBusyCursor::GetBusyCursor()
103 {
104 return gs_globalCursor;
105 }
106 #endif
107
108 void wxEndBusyCursor()
109 {
110 #warning "FIXME - do this logic in common code?"
111 }
112
113 void wxBeginBusyCursor(const wxCursor *cursor)
114 {
115 #warning "FIXME"
116 }
117
118 bool wxIsBusy()
119 {
120 #warning "FIXME"
121 return false;
122 }