]> git.saurik.com Git - wxWidgets.git/blob - src/dfb/cursor.cpp
In wxNotebook::Create setTabViewType based off of wxNB_TOP/LEFT/RIGHT/BOTTOM flags...
[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 wxObjectRefData
26 {
27 public:
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
42 IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxObject)
43
44 wxCursor::wxCursor(int cursorId)
45 {
46 #warning "FIXME -- implement the cursor as bitmaps (that's what DFB uses)"
47 }
48
49 wxCursor::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
59 wxCursor::wxCursor(const wxString& cursor_file,
60 long flags,
61 int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY))
62 {
63 #warning "FIXME"
64 }
65
66 bool wxCursor::IsOk() const
67 {
68 return m_refData && M_CURSOR->m_bitmap.Ok();
69 }
70
71 wxObjectRefData *wxCursor::CreateRefData() const
72 {
73 return new wxCursorRefData;
74 }
75
76 wxObjectRefData *wxCursor::CloneRefData(const wxObjectRefData *data) const
77 {
78 return new wxCursorRefData(*(wxCursorRefData *)data);
79 }
80
81
82 // ----------------------------------------------------------------------------
83 // Global cursor setting
84 // ----------------------------------------------------------------------------
85
86 void 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
99 static wxCursor gs_savedCursor = wxNullCursor;
100 static int gs_busyCount = 0;
101
102 const wxCursor &wxBusyCursor::GetStoredCursor()
103 {
104 return gs_savedCursor;
105 }
106
107 const wxCursor wxBusyCursor::GetBusyCursor()
108 {
109 return gs_globalCursor;
110 }
111 #endif
112
113 void wxEndBusyCursor()
114 {
115 #warning "FIXME - do this logic in common code?"
116 }
117
118 void wxBeginBusyCursor(const wxCursor *cursor)
119 {
120 #warning "FIXME"
121 }
122
123 bool wxIsBusy()
124 {
125 #warning "FIXME"
126 return false;
127 }