Extending the Tiles program
If you want to build on the Tiles program you can:
- Modify TTilesSelection to support disjoint selections. The TTile instances would be specified by a collection of low to high ranges instead of a low and high bound. Allow the user to Shift-click to extend the current selection.
- Modify the TMoveCommand to support moving a single TTile, the whole model, or any subselection of the model. In the TTilesView MouseDown function, do not create a new selection if the user has clicked on a tile in the existing current selection--just start the TMoveInteractor.
- Create different graphics to correspond to each type of TTile, and modify TTilesView to draw these graphics.
- Modify TTilesView so that users can drop colors onto the background view and not just onto tiles.
- Create a new command and corresponding menu that allows users to change the type of a TTile (to rock, paper, or scissors).
- Tie the new command to a cursor tool rather than a menu.
- Use custom notification rather than the Presentation framework's default notification to improve performance, especially during TMoveCommand. The Presentation framework's default notification causes a redraw of the entire view. For more information on notification, see Chapter 3, "Notification framework," in Desktop Framework Concepts.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.
Generated with WebMaker