Cursor.CursorPool Class Reference


Detailed Description

The cursor pool is a collection of all the cursor available to be used in the application.

An application only needs one pool so there is a global pool created call theCursorPool.

There is a default set of cursors created when the cursor pool is initialized. The names of these cursors are:

Arrow, CrossHair, Wait, IBeam, Blank, ArrowWait, and Magnifier.

If the default cursors don't suit your needs then cursors may be added to the pool via the add() method. Simply provide a unique name for the cursor and the file defining the cursor.

#include <class_cursor_1_1_cursor_pool.h>

List of all members.

Public Member Functions

  __init__ ()
  cursor ()
  Retrieve the cursor object by name.
  count ()
  Return the number of cursors in the pool.
  add ()
  Add a cursor to the pool of cursors.

Member Function Documentation

Cursor.CursorPool.__init__ ( )
Cursor.CursorPool.cursor ( )

Retrieve the cursor object by name.

None is returned if the name does not refer to a cursor in the pool.

Cursor.CursorPool.count ( )

Return the number of cursors in the pool.

Cursor.CursorPool.add ( )

Add a cursor to the pool of cursors.

The name is used to identify the cursor when you want to activate it (ie. push it on the cursor stack). The name must be unique.

The file is the path to the file defining the cursor. The file path may be absolute or relative. Relative paths are looked for in the application's cursors directory.

Cursor files currently must be defined using a .cur file.

Note that the actual cursor object is stored so that subsequent calls to push the same cursor do not result in loading the cursor from file again.

True is returned if the name is unique, the cursor file is found and defines a valid cursor. False is returned otherwise.


Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool
Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool Cursor.CursorPool