Interface to Alias cursors. Note that some of this class’s methods are not available on Windows.
#include <AlCursor.h> class AlCursor enum { kArrowSquare=0, kEmpty, kHourGlass, kEyeDropper, kFullEyeDropper, kMove, kSelect, kInsert, kDelete, kCross, kTarget } Predefined; static statusCode push( int id ); static statusCode pop( void ); static int define( const char*,int,int,int,int ); static int define( const char*,int,int,int,int,const char*,int,int ); static statusCode remove( int id );
This class allows you to display and define cursors inside of OpenAlias. Predefined cursors can be used or custom cursors can be created. Cursors are maintained using a stack of ID numbers. When a cursor image is set, its ID is pushed onto the stack. When a cursor is popped, its image is restored to the previous image.
statusCode AlCursor::push( int id )
Sets the current cursor to the given ID number and pushes
the ID onto the stack. ’ID’ can be either a custom ID returned by AlCursor::define() or one of the default types (Predefined::kArrowSquare, Predefined::kEmpty, Predefined::kHourGlass, Predefined::kEyeDropper, Predefined::kFullEyeDropper, Predefined::kMove, Predefined::kSelect, Predefined::kInsert, Predefined::kDelete, Predefined::kCross, or Predefined::kTarget).
int AlCursor::define( const char* image, int imageWidth, int imageHeight, int imageHotSpotX, int imageHotSpotY, const char* mask, int maskWidth, int maskHeight )
Creates a new cursor using a mask. These parameters are used in conjunction with XCreatePixmapFromBitmapData(). The mask can be used to create a blank region around the image.
NOTE: this method always fails on the Windows.
int AlCursor::define( const char* image, int imageWidth, int imageHeight, int imageHotSpotX, int imageHotSpotY )
Creates a new cursor (the cursor image is also used as the mask).
NOTE: this method always fails on the Windows.