]> git.saurik.com Git - wxWidgets.git/blame - src/dfb/cursor.cpp
Fix wxHtmlHelpData::SetTempDir() to behave correctly without trailing slash.
[wxWidgets.git] / src / dfb / cursor.cpp
CommitLineData
b3c86150
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/dfb/cursor.cpp
3// Purpose: wxCursor implementation
4// Author: Vaclav Slavik
5// Created: 2006-08-08
b3c86150
VS
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
8f884a0d 24class wxCursorRefData : public wxGDIRefData
b3c86150
VS
25{
26public:
27 wxCursorRefData(const wxBitmap& bmp = wxNullBitmap, int id = -1)
28 : m_id(id), m_bitmap(bmp) {}
29
8f884a0d
VZ
30 virtual bool IsOk() const { return m_bitmap.IsOk(); }
31
fd324b29
VZ
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
b3c86150
VS
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
52IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxObject)
53
0ef5b1da 54void wxCursor::InitFromStock(wxStockCursor cursorId)
b3c86150
VS
55{
56#warning "FIXME -- implement the cursor as bitmaps (that's what DFB uses)"
57}
58
b3c86150 59wxCursor::wxCursor(const wxString& cursor_file,
0ef5b1da 60 wxBitmapType type,
b3c86150
VS
61 int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY))
62{
63#warning "FIXME"
64}
65
8f884a0d 66wxGDIRefData *wxCursor::CreateGDIRefData() const
b3c86150
VS
67{
68 return new wxCursorRefData;
69}
70
8f884a0d 71wxGDIRefData *wxCursor::CloneGDIRefData(const wxGDIRefData *data) const
b3c86150 72{
fd324b29 73 return static_cast<const wxCursorRefData *>(data)->Clone();
b3c86150
VS
74}
75
76
77// ----------------------------------------------------------------------------
78// Global cursor setting
79// ----------------------------------------------------------------------------
80
81void 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
94static wxCursor gs_savedCursor = wxNullCursor;
95static int gs_busyCount = 0;
96
97const wxCursor &wxBusyCursor::GetStoredCursor()
98{
99 return gs_savedCursor;
100}
101
102const wxCursor wxBusyCursor::GetBusyCursor()
103{
104 return gs_globalCursor;
105}
106#endif
107
108void wxEndBusyCursor()
109{
110 #warning "FIXME - do this logic in common code?"
111}
112
113void wxBeginBusyCursor(const wxCursor *cursor)
114{
115 #warning "FIXME"
116}
117
118bool wxIsBusy()
119{
120 #warning "FIXME"
121 return false;
122}