class MCursor

Jump to documentation

Manipulate Cursors. (OpenMayaUI) (OpenMayaUI.py)

public members:

MCursor ( LPCSTR pszResource )
NT constructor
MCursor (short width, short height, short hotSpotX, short hotSpotY, unsigned char * bits, unsigned char * mask )
IRIX constructor
MCursor (const MCursor & other)
~MCursor ()
MCursor & operator= (const MCursor &)
bool operator== (const MCursor &) const
bool operator!= (const MCursor &) const
static MCursor defaultCursor
Maya default cursor, the left arrow.
static MCursor crossHairCursor
'+' cursor.
static MCursor doubleCrossHairCursor
'+' cursor with double lines.
static MCursor editCursor
Wedge-shaped arrow pointing left.
static MCursor pencilCursor
Pencil shape.
static MCursor handCursor
Open hand shaped cursor.

Documentation

Implement a cursor.
Description

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.

Functions

MCursor:: MCursor ( LPCSTR pszResource )

Description

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

Arguments

  • pszResource A handle to a Windows Cursor resource

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

Description

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

Arguments

  • width the width of the cursor
  • height the height of the cursor
  • hotSpotX the x position of the hot spot (left is 1)
  • hotSpotY the y position of the hot spot (top is 1)
  • bits the cursor bitmap in xbm format
  • mask the cursor mask in xbm format

MCursor:: MCursor ( const MCursor & other )

Description

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

Arguments

  • other the MCursor to copy from.

MCursor:: ~MCursor ()

Description

The class destructor.

MCursor & MCursor:: operator = (const MCursor & other )

Description

Assignment operator. Allows assignment between MCursor instances.

Arguments

  • other the MCursor to copy from.

bool MCursor:: operator == (const MCursor & other ) const

Description

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

Arguments

  • other the MCursor object to be compared with.

Return Value

  • true if the objects are same.
  • false if the objects are different.

bool MCursor:: operator != (const MCursor & other ) const

Description

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

Arguments

  • other the MCursor object to be compared with.

Return Value

  • true if the objects are different.
  • false if the objects are same.

This class has no child classes.


Autodesk® Maya® 8.0 © 1997-2006 Autodesk, Inc. All rights reserved. doc++ Copyright