SoGtk  0.1.0
Coin3D GUI toolkit binding
All Classes Functions Variables Typedefs Enumerations Enumerator Modules Pages
SoGtkCursor Class Reference

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

Classes

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

Public Types

enum  Shape {
  CUSTOM_BITMAP = -1 , DEFAULT = 0 , BUSY , CROSSHAIR ,
  UPARROW
}
 

Public Member Functions

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

Static Public Member Functions

static const SoGtkCursorgetBlankCursor (void)
 
static const SoGtkCursorgetPanCursor (void)
 
static const SoGtkCursorgetRotateCursor (void)
 
static const SoGtkCursorgetZoomCursor (void)
 
static void initClass (void)
 

Detailed Description

The SoGtkCursor 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 SoGtkComponent::setComponentCursor() and SoGtkComponent::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.

Enumerator
CUSTOM_BITMAP 

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

DEFAULT 

Using the native Window system's default cursor.

BUSY 

A busy cursor.

CROSSHAIR 

Two thin lines in a cross.

UPARROW 

Thick, upward-pointing arrow.

Constructor & Destructor Documentation

◆ SoGtkCursor() [1/4]

SoGtkCursor::SoGtkCursor ( void )

Default constructor. Creates a default cursor.

◆ SoGtkCursor() [2/4]

SoGtkCursor::SoGtkCursor ( const Shape shape)

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

◆ SoGtkCursor() [3/4]

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

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

◆ SoGtkCursor() [4/4]

SoGtkCursor::SoGtkCursor ( const SoGtkCursor & cursor)

Constructor.

◆ ~SoGtkCursor()

SoGtkCursor::~SoGtkCursor ( )

Destructor

Member Function Documentation

◆ getBlankCursor()

const SoGtkCursor & SoGtkCursor::getBlankCursor ( void )
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.

◆ getCustomCursor()

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

Returns a reference to the current custom bitmap cursor.

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

◆ getPanCursor()

const SoGtkCursor & SoGtkCursor::getPanCursor ( void )
static

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

◆ getRotateCursor()

const SoGtkCursor & SoGtkCursor::getRotateCursor ( void )
static

Returns a "rotate" indicator cursor.

◆ getShape()

SoGtkCursor::Shape SoGtkCursor::getShape ( void ) const

Returns the shape type.

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

◆ getZoomCursor()

const SoGtkCursor & SoGtkCursor::getZoomCursor ( void )
static

Returns a "zoom" indicator cursor.

◆ operator=()

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

Assignment operator.

◆ setShape()

void SoGtkCursor::setShape ( const Shape shapearg)

Sets the cursor to a predefined shape.


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