CURSOR

IUP - Portable User Interface

CURSOR

Defines the element's cursor.

Value

Name of a cursor predefined by IUP:

"NONE" "ARROW"
"BUSY"
"CROSS"
"HAND" (*)
"IUP" (*)
"MOVE"
"PEN" (*)
"RESIZE_N"
"RESIZE_S"
"RESIZE_W"
"RESIZE_E"
"RESIZE_NE"
"RESIZE_SE"
"RESIZE_NW"
"RESIZE_SW"
"TEXT"

Default: "ARROW"

(*) To use these cursors on Windows, the Iup.rc file, provided with IUP, must be added to the project.

It can receive as a parameter the name of an image, to be used as an application-defined cursor (the cursor must be a IupImage, but the image is not a regular one. See the notes below).

Notes

For the image to represent a cursor, it must use attribute HOTSPOT to define its hotspot (place where the mouse click is actually effective). Only color indices 0, 1 and 2 can be used in a cursor, where 0 will be transparent. The RGB colors corresponding to indices 1 and 2 are defined just as in regular images. In Windows the cursor can have more than 2 colors. Cursor sizes are usually less than or equal to 32x32.

In the interface system, the cursor will only change when the interface system regains control.

The Windows SDK recomends that cursors and icons should be implemented as resources rather than created at run time.

When the cursor image is no longer necessary, it must be destroyed through function IupDestroy. Attention: the cursor cannot be in use when it is destroyed.

Affects

IupDialog, IupCanvas

See Also

IupImage