Public Member Functions | Static Public Attributes

MCursor Class Reference

Search for all occurrences

Detailed Description

Manipulate Cursors.

The MCursor class implements a cursor class, and is used to pass all cursor arguments to Maya API methods.

The cursor image and mask are stored in xbm format to the constructor along with the cursor dimensions and the cursor hotspot.

Examples:

lassoTool.cpp.

#include <MCursor.h>

List of all members.

Public Member Functions

 MCursor (short width, short height, short hotSpotX, short hotSpotY, unsigned char *bits, unsigned char *mask)
 Class constructor.
 MCursor (const MCursor &other)
 Copy constructor.
 ~MCursor ()
 The class destructor.
MCursoroperator= (const MCursor &)
 Assignment operator.
bool operator== (const MCursor &) const
 Equality operator.
bool operator!= (const MCursor &) const
 Inequality operator.

Static Public Attributes

static const MCursor defaultCursor
 Maya default cursor, the left arrow.
static const MCursor crossHairCursor
 '+' cursor.
static const MCursor doubleCrossHairCursor
 '+' cursor with double lines.
static const MCursor editCursor
 Wedge-shaped arrow pointing left.
static const MCursor pencilCursor
 Pencil shape.
static const MCursor handCursor
 Open hand shaped cursor.

Constructor & Destructor Documentation

MCursor ( short  width,
short  height,
short  hotSpotX,
short  hotSpotY,
unsigned char *  bits,
unsigned char *  mask 
)

Class constructor.

Create a new instance of an MCursor and initialize it with the given values.

Parameters:
[in]widththe width of the cursor
[in]heightthe height of the cursor
[in]hotSpotXthe x position of the hot spot (left is 1)
[in]hotSpotYthe y position of the hot spot (top is 1)
[in]bitsthe cursor bitmap in xbm format
[in]maskthe cursor mask in xbm format
MCursor ( const MCursor other)

Copy constructor.

Create a new MCursor instance and initialize it with the given cursor.

Parameters:
[in]otherthe MCursor to copy from.

Member Function Documentation

MCursor & operator= ( const MCursor other)

Assignment operator.

Allows assignment between MCursor instances.

Parameters:
[in]otherthe MCursor to copy from.
bool operator== ( const MCursor other) const

Equality operator.

Allows 2 MCursors to be compared to see if they are identical.

Parameters:
[in]otherthe MCursor object to be compared with.
Returns:
  • true if the objects are same.
  • false if the objects are different.
bool operator!= ( const MCursor other) const

Inequality operator.

Allows 2 MCursors to be compared to see if they are not the same.

Parameters:
[in]otherthe MCursor object to be compared with.
Returns:
  • true if the objects are different.
  • false if the objects are same.

MCursor MCursor MCursor MCursor MCursor MCursor MCursor MCursor MCursor MCursor
MCursor MCursor MCursor MCursor MCursor MCursor MCursor MCursor MCursor MCursor