28.2. Cursor tools

Looking at the Pop Framework, you’ll notice that the user can activate different kinds of cursors. When you have a program where users can change the tool action of the cursor, it’s important to change the appearance of the cursor to match the mode. That is, the appearance of the cursor should inform the user about what the effects of mouse actions are likely to be.

We’ll let the tool type depend on the view, so that it’s possible to have two views open with a different tool being used in each one. This means that the data about which cursor to use should live in the CPopView. And the CPopView will be responsible for resetting the cursor whenever the cursor moves over the CPopView’s window.

How does the CPopView keep track ...

Get Software Engineering and Computer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.