]> git.saurik.com Git - wxWidgets.git/blob - src/dfb/cursor.cpp
Return wxFONTFAMILY_DEFAULT, not UNKNOWN, from wxFont::GetFamily().
[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 void wxCursor::InitFromStock(wxStockCursor cursorId)
47 {
48 #warning "FIXME -- implement the cursor as bitmaps (that's what DFB uses)"
49 }
50
51 wxCursor::wxCursor(const wxString& cursor_file,
52 wxBitmapType type,
53 int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY))
54 {
55 #warning "FIXME"
56 }
57
58 wxGDIRefData *wxCursor::CreateGDIRefData() const
59 {
60 return new wxCursorRefData;
61 }
62
63 wxGDIRefData *wxCursor::CloneGDIRefData(const wxGDIRefData *data) const
64 {
65 return new wxCursorRefData(*(wxCursorRefData *)data);
66 }
67
68
69 // ----------------------------------------------------------------------------
70 // Global cursor setting
71 // ----------------------------------------------------------------------------
72
73 void wxSetCursor(const wxCursor& cursor)
74 {
75 #warning "FIXME: implement"
76 }
77
78
79
80 //-----------------------------------------------------------------------------
81 // busy cursor routines
82 //-----------------------------------------------------------------------------
83
84 #warning "FIXME: this should be common code"
85 #if 0
86 static wxCursor gs_savedCursor = wxNullCursor;
87 static int gs_busyCount = 0;
88
89 const wxCursor &wxBusyCursor::GetStoredCursor()
90 {
91 return gs_savedCursor;
92 }
93
94 const wxCursor wxBusyCursor::GetBusyCursor()
95 {
96 return gs_globalCursor;
97 }
98 #endif
99
100 void wxEndBusyCursor()
101 {
102 #warning "FIXME - do this logic in common code?"
103 }
104
105 void wxBeginBusyCursor(const wxCursor *cursor)
106 {
107 #warning "FIXME"
108 }
109
110 bool wxIsBusy()
111 {
112 #warning "FIXME"
113 return false;
114 }