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