SoWx
0.1.0
Coin3D GUI toolkit binding
|
The SoWxCursor class is used to set cursors for GUI components. More...
Classes | |
class | CustomCursor |
The SoWxCursor::CustomCursor class is used to specify bitmap data for SoWxCursor custom cursors. More... | |
Public Types | |
enum | Shape { CUSTOM_BITMAP = -1 , DEFAULT = 0 , BUSY , CROSSHAIR , UPARROW } |
Public Member Functions | |
SoWxCursor (const CustomCursor *cc) | |
SoWxCursor (const Shape shape) | |
SoWxCursor (const SoWxCursor &cursor) | |
SoWxCursor (void) | |
~SoWxCursor () | |
const CustomCursor & | getCustomCursor (void) const |
Shape | getShape (void) const |
SoWxCursor & | operator= (const SoWxCursor &c) |
void | setShape (const Shape shape) |
Static Public Member Functions | |
static const SoWxCursor & | getBlankCursor (void) |
static const SoWxCursor & | getPanCursor (void) |
static const SoWxCursor & | getRotateCursor (void) |
static const SoWxCursor & | getZoomCursor (void) |
static void | initClass (void) |
The SoWxCursor class is used to set cursors for GUI components.
The class provides both a set of predefined cursor shapes, as well as the option to use custom bitmap graphics.
Instances of this class is usually made for passing in to the SoWxComponent::setComponentCursor() and SoWxComponent::setWidgetCursor() methods.
enum SoWxCursor::Shape |
For enumerating built-in shape types, that can be used without having to specify cursor graphics. These are mapped to predefined cursor shapes from the underlying toolkit.
SoWxCursor::SoWxCursor | ( | void | ) |
Default constructor. Creates a default cursor.
SoWxCursor::SoWxCursor | ( | const Shape | shape | ) |
Constructor with Shape argument, for setting up the cursor with a predefined shape from the underlying native toolkit.
SoWxCursor::SoWxCursor | ( | const CustomCursor * | ccarg | ) |
Constructs a new custom bitmap cursor from cc.
Note that only a shallow copy will be made of the CustomCursor bitmap and mask references, so don't deallocate the memory they use until the SoWxCursor has been destructed.
As for the format of the cursor bitmap data, see documentation of SoWxCursor::CustomCursor.
SoWxCursor::SoWxCursor | ( | const SoWxCursor & | cursor | ) |
Constructor.
SoWxCursor::~SoWxCursor | ( | ) |
Destructor
|
static |
Because not all toolkits do easily support setting up a blank cursor from predefined shapes or API functions, we also provide a simple completely transparent cursor.
const SoWxCursor::CustomCursor & SoWxCursor::getCustomCursor | ( | void | ) | const |
Returns a reference to the current custom bitmap cursor.
Do not call this method unless SoWxCursor::getShape() returns SoWxCursor::CUSTOM_BITMAP.
|
static |
Returns a cursor with "pan" graphics (i.e. for translation in the camera normal plane).
|
static |
Returns a "rotate" indicator cursor.
SoWxCursor::Shape SoWxCursor::getShape | ( | void | ) | const |
Returns the shape type.
If the cursor has been set by the application programmer to a bitmap cursor, SoWxCursor::CUSTOM_BITMAP is returned.
|
static |
Returns a "zoom" indicator cursor.
SoWxCursor & SoWxCursor::operator= | ( | const SoWxCursor & | c | ) |
Assignment operator.
void SoWxCursor::setShape | ( | const Shape | shapearg | ) |
Sets the cursor to a predefined shape.