1/* 2 * Copyright 2012 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 hrev45039 10 * src/kits/app/Cursor.cpp hrev45039 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 27 28/*! 29 \var BCursorID B_CURSOR_ID_SYSTEM_DEFAULT 30 System default cursor 31*/ 32 33 34/*! 35 \var BCursorID B_CURSOR_ID_CONTEXT_MENU 36 Context menu cursor 37*/ 38 39 40/*! 41 \var BCursorID B_CURSOR_ID_COPY 42 Copy cursor 43*/ 44 45 46/*! 47 \var BCursorID B_CURSOR_ID_CREATE_LINK 48 Symlink cursor 49*/ 50 51 52/*! 53 \var BCursorID B_CURSOR_ID_CROSS_HAIR 54 Cross hairs cursor 55*/ 56 57 58/*! 59 \var BCursorID B_CURSOR_ID_FOLLOW_LINK 60 Follow html link cursor 61*/ 62 63 64/*! 65 \var BCursorID B_CURSOR_ID_GRAB 66 Grab cursor 67*/ 68 69 70/*! 71 \var BCursorID B_CURSOR_ID_GRABBING 72 Grabbing cursor (mouse down) 73*/ 74 75 76/*! 77 \var BCursorID B_CURSOR_ID_HELP 78 Help cursor 79*/ 80 81 82/*! 83 \var BCursorID B_CURSOR_ID_I_BEAM 84 I beam cursor 85*/ 86 87 88/*! 89 \var BCursorID B_CURSOR_ID_I_BEAM_HORIZONTAL 90 Horizontal I beam cursor 91*/ 92 93 94/*! 95 \var BCursorID B_CURSOR_ID_MOVE 96 Move cursor 97*/ 98 99 100/*! 101 \var BCursorID B_CURSOR_ID_NO_CURSOR 102 No cursor 103*/ 104 105 106/*! 107 \var BCursorID B_CURSOR_ID_NOT_ALLOWED 108 Not allowed cursor 109*/ 110 111 112/*! 113 \var BCursorID B_CURSOR_ID_PROGRESS 114 Progress cursor 115*/ 116 117 118/*! 119 \var BCursorID B_CURSOR_ID_RESIZE_NORTH 120 Resize north cursor 121*/ 122 123 124/*! 125 \var BCursorID B_CURSOR_ID_RESIZE_EAST 126 Resize east cursor 127*/ 128 129 130/*! 131 \var BCursorID B_CURSOR_ID_RESIZE_SOUTH 132 Resize south cursor 133*/ 134 135 136/*! 137 \var BCursorID B_CURSOR_ID_RESIZE_WEST 138 Resize west cursor 139*/ 140 141 142/*! 143 \var BCursorID B_CURSOR_ID_RESIZE_NORTH_EAST 144 Resize north east cursor 145*/ 146 147 148/*! 149 \var BCursorID B_CURSOR_ID_RESIZE_NORTH_WEST 150 Resize north west cursor 151*/ 152 153 154/*! 155 \var BCursorID B_CURSOR_ID_RESIZE_SOUTH_EAST 156 Resize south east cursor 157*/ 158 159 160/*! 161 \var BCursorID B_CURSOR_ID_RESIZE_SOUTH_WEST 162 Resize south west cursor 163*/ 164 165 166/*! 167 \var BCursorID B_CURSOR_ID_RESIZE_NORTH_SOUTH 168 Resize north south cursor 169*/ 170 171 172/*! 173 \var BCursorID B_CURSOR_ID_RESIZE_EAST_WEST 174 Resize east west cursor 175*/ 176 177 178/*! 179 \var BCursorID B_CURSOR_ID_RESIZE_NORTH_EAST_SOUTH_WEST 180 Resize north east south west cursor 181*/ 182 183 184/*! 185 \var BCursorID B_CURSOR_ID_RESIZE_NORTH_WEST_SOUTH_EAST 186 Resize north west south east cursor 187*/ 188 189 190/*! 191 \var BCursorID B_CURSOR_ID_ZOOM_IN 192 Zoom in cursor 193*/ 194 195 196/*! 197 \var BCursorID B_CURSOR_ID_ZOOM_OUT 198 Zoom out cursor 199*/ 200 201 202/*! 203 \class BCursor 204 \ingroup app 205 \ingroup libbe 206 \brief BCursor describes a view-wide or application-wide cursor. 207 208 \note As BeOS only supports 16x16 monochrome cursors, to see a nice 209 shadowed one we will need to extend this. 210*/ 211 212 213/*! 214 \fn BCursor::BCursor(const void* cursorData) 215 \brief Initializes a new cursor object. 216 217 If the \a cursorData parameter is not \c NULL then the cursor is initialized 218 with the cursor data. 219 220 \param cursorData The cursor data. 221*/ 222 223 224/*! 225 \fn BCursor::BCursor(BCursorID id) 226 \brief Initializes a new cursor object from a predefined cursor \a id. 227 228 \param id The predefined \a id to initialize to. 229*/ 230 231 232/*! 233 \fn BCursor::BCursor(const BCursor& other) 234 \brief Initializes a new cursor object from another cursor object. 235 236 \param other The cursor object to initialize from. 237*/ 238 239 240/*! 241 \fn BCursor::BCursor(BMessage* data) 242 \brief Initializes a new cursor object from a message archive. 243 244 \param data The message data to initialize from. 245*/ 246 247 248/*! 249 \fn BCursor::~BCursor() 250 \brief Destroy the cursor and free it's memory. 251*/ 252 253 254/*! 255 status_t BCursor::Archive(BMessage *into, bool deep) const 256 \brief Archive the cursor. Not implemented. 257*/ 258 259 260/*! 261 BArchivable* BCursor::Instantiate(BMessage *data) 262 \brief Instantiate the cursor from a message. Not implemented. 263*/ 264 265 266/*! 267 BCursor& BCursor::operator=(const BCursor& other) 268 \brief Set the cursor to another cursor object. 269 270 \param other The cursor object to copy from. 271 272 \returns the new cursor object. 273*/ 274 275 276/*! 277 bool BCursor::operator==(const BCursor& other) const 278 \brief Compare a cursor object to another and return if they are equal. 279 280 \param other The cursor object to compare to. 281 282 \returns \c true if the cursor objects are equal, \c false if the cursor 283 objects are not equal. 284*/ 285 286 287/*! 288 bool BCursor::operator!=(const BCursor& other) const 289 \brief Compare a cursor object to another and return if they are not equal. 290 291 \param other The cursor object to compare to. 292 293 \returns \c true if the cursor objects are not equal, \c false if the cursor 294 objects are equal. 295*/ 296