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" (* - context help)
"MOVE"
"PEN" (* - pencil shape)
"RESIZE_N"
"RESIZE_S"
"RESIZE_W"
"RESIZE_E"
"RESIZE_NE"
"RESIZE_SE"
"RESIZE_NW"
"RESIZE_SW"
"TEXT"
"APPSTARTING" (Windows Only)
"HELP" (Windows Only)
"NO" (Windows Only)
"UPARROW" (Windows Only)

Default: "ARROW"

(*) To use these cursors on Windows, the iup.rc file, provided with IUP, must be linked with the application.

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).

In Motif the value can be a number of one of the cursors defined in the X11 header "cursorfont.h".

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

In Motif can also be used in other controls.

See Also

IupImage