]> git.saurik.com Git - wxWidgets.git/blame - src/qt/cursor.cpp
removed now obsoleted commented-out piece of code
[wxWidgets.git] / src / qt / cursor.cpp
CommitLineData
7c78e7c7
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: cursor.cpp
01b2eeec
KB
3// Purpose: wxCursor class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
7c78e7c7
RR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
7c78e7c7
RR
12#ifdef __GNUG__
13#pragma implementation "cursor.h"
14#endif
15
16#include "wx/cursor.h"
17
01b2eeec 18IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap)
7c78e7c7 19
01b2eeec
KB
20wxCursorRefData::wxCursorRefData()
21{
22 m_width = 32; m_height = 32;
23
24/* TODO
25 m_hCursor = 0 ;
26*/
27}
28
29wxCursorRefData::~wxCursorRefData()
30{
31 // TODO: destroy cursor
32}
33
34// Cursors
35wxCursor::wxCursor()
36{
37}
38
39wxCursor::wxCursor(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height),
40 int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY), const char WXUNUSED(maskBits)[])
41{
42}
43
44wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY)
45{
46 m_refData = new wxIconRefData;
47
48 // TODO: create cursor from a file
49}
50
51// Cursors by stock number
52wxCursor::wxCursor(int cursor_type)
53{
54 m_refData = new wxIconRefData;
55
56/* TODO
57 switch (cursor_type)
58 {
59 case wxCURSOR_WAIT:
60 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_WAIT);
61 break;
62 case wxCURSOR_IBEAM:
63 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_IBEAM);
64 break;
65 case wxCURSOR_CROSS:
66 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_CROSS);
67 break;
68 case wxCURSOR_SIZENWSE:
69 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENWSE);
70 break;
71 case wxCURSOR_SIZENESW:
72 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENESW);
73 break;
74 case wxCURSOR_SIZEWE:
75 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZEWE);
76 break;
77 case wxCURSOR_SIZENS:
78 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENS);
79 break;
80 case wxCURSOR_CHAR:
81 {
82 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW);
83 break;
84 }
85 case wxCURSOR_HAND:
86 {
87 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_HAND");
88 break;
89 }
90 case wxCURSOR_BULLSEYE:
91 {
92 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_BULLSEYE");
93 break;
94 }
95 case wxCURSOR_PENCIL:
96 {
97 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PENCIL");
98 break;
99 }
100 case wxCURSOR_MAGNIFIER:
101 {
102 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_MAGNIFIER");
103 break;
104 }
105 case wxCURSOR_NO_ENTRY:
106 {
107 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_NO_ENTRY");
108 break;
109 }
110 case wxCURSOR_LEFT_BUTTON:
111 {
112 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW);
113 break;
114 }
115 case wxCURSOR_RIGHT_BUTTON:
116 {
117 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW);
118 break;
119 }
120 case wxCURSOR_MIDDLE_BUTTON:
121 {
122 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW);
123 break;
124 }
125 case wxCURSOR_SIZING:
126 {
127 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_SIZING");
128 break;
129 }
130 case wxCURSOR_WATCH:
131 {
132 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_WATCH");
133 break;
134 }
135 case wxCURSOR_SPRAYCAN:
136 {
137 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_ROLLER");
138 break;
139 }
140 case wxCURSOR_PAINT_BRUSH:
141 {
142 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PBRUSH");
143 break;
144 }
145 case wxCURSOR_POINT_LEFT:
146 {
147 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PLEFT");
148 break;
149 }
150 case wxCURSOR_POINT_RIGHT:
151 {
152 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PRIGHT");
153 break;
154 }
155 case wxCURSOR_QUESTION_ARROW:
156 {
157 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_QARROW");
158 break;
159 }
160 case wxCURSOR_BLANK:
161 {
162 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_BLANK");
163 break;
164 }
165 default:
166 case wxCURSOR_ARROW:
167 M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW);
168 break;
169 }
170*/
171
172}
173
174wxCursor::~wxCursor()
175{
176}
177
178// Global cursor setting
179void wxSetCursor(const wxCursor& cursor)
180{
181 // TODO (optional on platforms with no global cursor)
182}
7c78e7c7
RR
183
184