3 The Mouse

3.2 Mouse cursor objects

The mouse cursor object is a data structure that defines what the mouse cursor looks like on the screen and how it behaves. When you move the mouse, a mouse cursor moves on the root viewport. The image of the mouse cursor, which is usually an arrow, is taken from the bitmap of the mouse cursor object. The mouse cursor object is never occluded by other Window Tool Kit objects.

You can make a new mouse cursor object to replace the existing one at any time. You must first create a bitmap that contains the image of the new mouse cursor by using any of the methods described in Chapter 2, "Bitmaps, Viewports, and Windows". The height and width of the new bitmap cannot exceed the maximum height and width that are allowed for the mouse cursor object by the Window Tool Kit. The constants maximum-cursor-height and maximum-cursor-width contain these values. The depth of the bitmap for a mouse cursor object must always be 1.

3.2.1 - Making mouse cursor objects

The Window Tool Kit - 9 SEP 1996

Generated with Harlequin WebMaker