xref: /haiku/docs/user/app/Cursor.dox (revision 7457ccb4b2f4786525d3b7bda42598487d57ab7d)
1/*
2 * Copyright 2012-2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		John Scipione, jscipione@gmail.com
7 *
8 * Corresponds to:
9 *		headers/os/app/Cursor.h	 hrev47355
10 *		src/kits/app/Cursor.cpp	 hrev47355
11 */
12
13
14/*!
15	\file Cursor.h
16	\ingroup app
17	\ingroup libbe
18	\brief Provides the BCursor class.
19*/
20
21
22/*!
23	\enum BCursorID
24	List of predefined cursor IDs
25
26	\since BeOS R5
27*/
28
29
30/*!
31	\var BCursorID B_CURSOR_ID_SYSTEM_DEFAULT
32	System default cursor
33
34	\since BeOS R5
35*/
36
37
38/*!
39	\var BCursorID B_CURSOR_ID_CONTEXT_MENU
40	Context menu cursor
41
42	\since BeOS R5
43*/
44
45
46/*!
47	\var BCursorID B_CURSOR_ID_COPY
48	Copy cursor
49
50	\since BeOS R5
51*/
52
53
54/*!
55	\var BCursorID B_CURSOR_ID_CREATE_LINK
56	Symlink cursor
57
58	\since BeOS R5
59*/
60
61
62/*!
63	\var BCursorID B_CURSOR_ID_CROSS_HAIR
64	Cross hairs cursor
65
66	\since BeOS R5
67*/
68
69
70/*!
71	\var BCursorID B_CURSOR_ID_FOLLOW_LINK
72	Follow html link cursor
73
74	\since BeOS R5
75*/
76
77
78/*!
79	\var BCursorID B_CURSOR_ID_GRAB
80	Grab cursor
81
82	\since BeOS R5
83*/
84
85
86/*!
87	\var BCursorID B_CURSOR_ID_GRABBING
88	Grabbing cursor (mouse down)
89
90	\since BeOS R5
91*/
92
93
94/*!
95	\var BCursorID B_CURSOR_ID_HELP
96	Help cursor
97
98	\since BeOS R5
99*/
100
101
102/*!
103	\var BCursorID B_CURSOR_ID_I_BEAM
104	I beam cursor
105
106	\since BeOS R5
107*/
108
109
110/*!
111	\var BCursorID B_CURSOR_ID_I_BEAM_HORIZONTAL
112	Horizontal I beam cursor
113
114	\since BeOS R5
115*/
116
117
118/*!
119	\var BCursorID B_CURSOR_ID_MOVE
120	Move cursor
121
122	\since BeOS R5
123*/
124
125
126/*!
127	\var BCursorID B_CURSOR_ID_NO_CURSOR
128	No cursor
129
130	\since BeOS R5
131*/
132
133
134/*!
135	\var BCursorID B_CURSOR_ID_NOT_ALLOWED
136	Not allowed cursor
137
138	\since BeOS R5
139*/
140
141
142/*!
143	\var BCursorID B_CURSOR_ID_PROGRESS
144	Progress cursor
145
146	\since BeOS R5
147*/
148
149
150/*!
151	\var BCursorID B_CURSOR_ID_RESIZE_NORTH
152	Resize north cursor
153
154	\since BeOS R5
155*/
156
157
158/*!
159	\var BCursorID B_CURSOR_ID_RESIZE_EAST
160	Resize east cursor
161
162	\since BeOS R5
163*/
164
165
166/*!
167	\var BCursorID B_CURSOR_ID_RESIZE_SOUTH
168	Resize south cursor
169
170	\since BeOS R5
171*/
172
173
174/*!
175	\var BCursorID B_CURSOR_ID_RESIZE_WEST
176	Resize west cursor
177
178	\since BeOS R5
179*/
180
181
182/*!
183	\var BCursorID B_CURSOR_ID_RESIZE_NORTH_EAST
184	Resize north east cursor
185
186	\since BeOS R5
187*/
188
189
190/*!
191	\var BCursorID B_CURSOR_ID_RESIZE_NORTH_WEST
192	Resize north west cursor
193
194	\since BeOS R5
195*/
196
197
198/*!
199	\var BCursorID B_CURSOR_ID_RESIZE_SOUTH_EAST
200	Resize south east cursor
201
202	\since BeOS R5
203*/
204
205
206/*!
207	\var BCursorID B_CURSOR_ID_RESIZE_SOUTH_WEST
208	Resize south west cursor
209
210	\since BeOS R5
211*/
212
213
214/*!
215	\var BCursorID B_CURSOR_ID_RESIZE_NORTH_SOUTH
216	Resize north south cursor
217
218	\since BeOS R5
219*/
220
221
222/*!
223	\var BCursorID B_CURSOR_ID_RESIZE_EAST_WEST
224	Resize east west cursor
225
226	\since BeOS R5
227*/
228
229
230/*!
231	\var BCursorID B_CURSOR_ID_RESIZE_NORTH_EAST_SOUTH_WEST
232	Resize north east south west cursor
233
234	\since BeOS R5
235*/
236
237
238/*!
239	\var BCursorID B_CURSOR_ID_RESIZE_NORTH_WEST_SOUTH_EAST
240	Resize north west south east cursor
241
242	\since BeOS R5
243*/
244
245
246/*!
247	\var BCursorID B_CURSOR_ID_ZOOM_IN
248	Zoom in cursor
249
250	\since BeOS R5
251*/
252
253
254/*!
255	\var BCursorID B_CURSOR_ID_ZOOM_OUT
256	Zoom out cursor
257
258	\since BeOS R5
259*/
260
261
262/*!
263	\class BCursor
264	\ingroup app
265	\ingroup libbe
266	\brief BCursor describes a view-wide or application-wide cursor.
267
268	\note As BeOS only supports 16x16 monochrome cursors, to see a nice
269		  shadowed one we will need to extend this.
270
271	\since BeOS R5
272*/
273
274
275/*!
276	\fn BCursor::BCursor(const void* cursorData)
277	\brief Initializes a new cursor object.
278
279	If the \a cursorData parameter is not \c NULL then the cursor is initialized
280	with the cursor data.
281
282	\param cursorData The cursor data.
283
284	\since BeOS R5
285*/
286
287
288/*!
289	\fn BCursor::BCursor(BCursorID id)
290	\brief Initializes a new cursor object from a predefined cursor \a id.
291
292	\param id The predefined \a id to initialize to.
293
294	\since BeOS R5
295*/
296
297
298/*!
299	\fn BCursor::BCursor(const BCursor& other)
300	\brief Initializes a new cursor object from another cursor object.
301
302	\param other The cursor object to initialize from.
303
304	\since BeOS R5
305*/
306
307
308/*!
309	\fn BCursor::BCursor(BMessage* data)
310	\brief Initializes a new cursor object from a message archive.
311
312	\param data The message data to initialize from.
313
314	\since BeOS R5
315*/
316
317
318/*!
319	\fn BCursor::~BCursor()
320	\brief Destroy the cursor and free its memory.
321
322	\since BeOS R5
323*/
324
325
326/*!
327	status_t BCursor::Archive(BMessage *into, bool deep) const
328	\brief Archive the cursor. Not implemented.
329
330	\since BeOS R5
331*/
332
333
334/*!
335	BArchivable* BCursor::Instantiate(BMessage *data)
336	\brief Instantiate the cursor from a message. Not implemented.
337
338	\since BeOS R5
339*/
340
341
342/*!
343	BCursor& BCursor::operator=(const BCursor& other)
344	\brief Set the cursor to another cursor object.
345
346	\param other The cursor object to copy from.
347
348	\returns the new cursor object.
349
350	\since BeOS R5
351*/
352
353
354/*!
355	bool BCursor::operator==(const BCursor& other) const
356	\brief Compare a cursor object to another and return if they are equal.
357
358	\param other The cursor object to compare to.
359
360	\returns \c true if the cursor objects are equal, \c false if the cursor
361	         objects are not equal.
362
363	\since BeOS R5
364*/
365
366
367/*!
368	bool BCursor::operator!=(const BCursor& other) const
369	\brief Compare a cursor object to another and return if they are not equal.
370
371	\param other The cursor object to compare to.
372
373	\returns \c true if the cursor objects are not equal, \c false if the cursor
374		objects are equal.
375
376	\since BeOS R5
377*/
378