Rogue Wave Views Foundation Package API Reference Guide |
Rogue Wave Views Documentation Home |
Cursor class. More...
#include <ilviews/base/resource.h>
Public Member Functions | |
IlvCursor (IlvDisplay *display, IlvPos hotX, IlvPos hotY, const char *name, IlvBitmap *image, IlvBitmap *mask) | |
Constructor. More... | |
IlBoolean | isBad () const |
Checks the validity of that IlvCursor . More... | |
Public Member Functions inherited from IlvResource | |
IlvDisplay * | getDisplay () const |
Gets the IlvDisplay instance. More... | |
const char * | getName () const |
Gets the resource name. More... | |
void | lock () |
Locks the resource. More... | |
virtual void | setName (const char *name) |
Sets the name of the resource. More... | |
virtual void | unLock () |
Unlocks the resource. More... | |
Friends | |
class | IlvDisplay |
Cursor class.
Library: xviews or winviews or mviews (mutually exclusive)
A Rogue Wave Views cursor is an icon appearing on the screen and following mouse movement.
- Cursor resources -
The IlvDisplay::getCursor
member function returns a previously-defined cursor. The IlvDisplay::defaultCursor
member function returns a predefined cursor.
You can access predefined cursors by their name. Once a new IlvCursor
has a name, it can be identified by the display.
- Predefined cursors and their names -
IlvCursor::IlvCursor | ( | IlvDisplay * | display, |
IlvPos | hotX, | ||
IlvPos | hotY, | ||
const char * | name, | ||
IlvBitmap * | image, | ||
IlvBitmap * | mask | ||
) |
Constructor.
Initializes a new IlvCursor
with a given shape. The shape of the cursor is defined by two bitmaps that must be monochrome, and have the same size: the image bitmap, that defines the shape of the new cursor, and mask that indicates, by setting a pixel to 0
, that the image should be transparent at this point, or opaque if the mask pixel is set to 1
.
display | The display for which this cursor was created. |
hotX | The x coordinate, relative to the upper-left corner of this cursor, that indicates the real location of the pointing device (the hot spot). |
hotY | The x coordinate, relative to the upper-left corner of this cursor, that indicates the real location of the pointing device (the hot spot). |
name | The name of this cursor. This string is used by IlvDisplay::getCursor to find this cursor. This string is copied. |
image | The image bitmap that defines this cursor. |
mask | The mask bitmap that defines this cursor. |
IlvDisplay::getCursor
. IlBoolean IlvCursor::isBad | ( | ) | const |
Checks the validity of that IlvCursor
.
This method should be called before any other, right after the cursor was created, to make sure it is valid.
IlFalse
if the cursor is valid, and IlTrue
if it is not (usually because the parameters provided to the constructor were not valid). In the latter case, simply delete this IlvCursor
without using it any further. © Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.