SoQt  1.6.2
Coin3D GUI toolkit binding
No Matches
SoQtCursor Class Reference

The SoQtCursor class is used to set cursors for GUI components. More...


class  CustomCursor
 The SoQtCursor::CustomCursor class is used to specify bitmap data for SoQtCursor custom cursors. More...

Public Types

enum  Shape {

Public Member Functions

 SoQtCursor (const CustomCursor *cc)
 SoQtCursor (const Shape shape)
 SoQtCursor (const SoQtCursor &cursor)
 SoQtCursor (void)
 ~SoQtCursor ()
const CustomCursorgetCustomCursor (void) const
Shape getShape (void) const
SoQtCursoroperator= (const SoQtCursor &c)
void setShape (const Shape shape)

Static Public Member Functions

static const SoQtCursorgetBlankCursor (void)
static const SoQtCursorgetPanCursor (void)
static const SoQtCursorgetRotateCursor (void)
static const SoQtCursorgetZoomCursor (void)
static void initClass (void)

Detailed Description

The SoQtCursor 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 SoQtComponent::setComponentCursor() and SoQtComponent::setWidgetCursor() methods.

Member Enumeration Documentation

◆ 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.


Cursor is specified with our own bitmap graphics. The bitmap data must be passed to the constructor.


Using the native Window system's default cursor.


A busy cursor.


Two thin lines in a cross.


Thick, upward-pointing arrow.

Constructor & Destructor Documentation

◆ SoQtCursor() [1/4]

SoQtCursor::SoQtCursor ( void )

Default constructor. Creates a default cursor.

◆ SoQtCursor() [2/4]

SoQtCursor::SoQtCursor ( const Shape shape)

Constructor with Shape argument, for setting up the cursor with a predefined shape from the underlying native toolkit.

◆ SoQtCursor() [3/4]

SoQtCursor::SoQtCursor ( 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 SoQtCursor has been destructed.

As for the format of the cursor bitmap data, see documentation of SoQtCursor::CustomCursor.

◆ SoQtCursor() [4/4]

SoQtCursor::SoQtCursor ( const SoQtCursor & cursor)


◆ ~SoQtCursor()

SoQtCursor::~SoQtCursor ( )


Member Function Documentation

◆ getBlankCursor()

const SoQtCursor & SoQtCursor::getBlankCursor ( void )

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.

◆ getCustomCursor()

const SoQtCursor::CustomCursor & SoQtCursor::getCustomCursor ( void ) const

Returns a reference to the current custom bitmap cursor.

Do not call this method unless SoQtCursor::getShape() returns SoQtCursor::CUSTOM_BITMAP.

◆ getPanCursor()

const SoQtCursor & SoQtCursor::getPanCursor ( void )

Returns a cursor with "pan" graphics (i.e. for translation in the camera normal plane).

◆ getRotateCursor()

const SoQtCursor & SoQtCursor::getRotateCursor ( void )

Returns a "rotate" indicator cursor.

◆ getShape()

SoQtCursor::Shape SoQtCursor::getShape ( void ) const

Returns the shape type.

If the cursor has been set by the application programmer to a bitmap cursor, SoQtCursor::CUSTOM_BITMAP is returned.

◆ getZoomCursor()

const SoQtCursor & SoQtCursor::getZoomCursor ( void )

Returns a "zoom" indicator cursor.

◆ operator=()

SoQtCursor & SoQtCursor::operator= ( const SoQtCursor & c)

Assignment operator.

◆ setShape()

void SoQtCursor::setShape ( const Shape shapearg)

Sets the cursor to a predefined shape.

The documentation for this class was generated from the following files: