]> git.saurik.com Git - wxWidgets.git/blame - src/dfb/cursor.cpp
Add wxDataViewRendererBase::PrepareForItem() helper.
[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
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
8f884a0d 25class wxCursorRefData : public wxGDIRefData
b3c86150
VS
26{
27public:
28 wxCursorRefData(const wxBitmap& bmp = wxNullBitmap, int id = -1)
29 : m_id(id), m_bitmap(bmp) {}
30
8f884a0d
VZ
31 virtual bool IsOk() const { return m_bitmap.IsOk(); }
32
b3c86150
VS
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
44IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxObject)
45
0ef5b1da 46void wxCursor::InitFromStock(wxStockCursor cursorId)
b3c86150
VS
47{
48#warning "FIXME -- implement the cursor as bitmaps (that's what DFB uses)"
49}
50
b3c86150 51wxCursor::wxCursor(const wxString& cursor_file,
0ef5b1da 52 wxBitmapType type,
b3c86150
VS
53 int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY))
54{
55#warning "FIXME"
56}
57
8f884a0d 58wxGDIRefData *wxCursor::CreateGDIRefData() const
b3c86150
VS
59{
60 return new wxCursorRefData;
61}
62
8f884a0d 63wxGDIRefData *wxCursor::CloneGDIRefData(const wxGDIRefData *data) const
b3c86150
VS
64{
65 return new wxCursorRefData(*(wxCursorRefData *)data);
66}
67
68
69// ----------------------------------------------------------------------------
70// Global cursor setting
71// ----------------------------------------------------------------------------
72
73void 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
86static wxCursor gs_savedCursor = wxNullCursor;
87static int gs_busyCount = 0;
88
89const wxCursor &wxBusyCursor::GetStoredCursor()
90{
91 return gs_savedCursor;
92}
93
94const wxCursor wxBusyCursor::GetBusyCursor()
95{
96 return gs_globalCursor;
97}
98#endif
99
100void wxEndBusyCursor()
101{
102 #warning "FIXME - do this logic in common code?"
103}
104
105void wxBeginBusyCursor(const wxCursor *cursor)
106{
107 #warning "FIXME"
108}
109
110bool wxIsBusy()
111{
112 #warning "FIXME"
113 return false;
114}