DrawContents draws each tile individually, as shown in Step 1, calling DrawTile for each tile. Additionally, DrawContents now checks to see if there is a current selection on the model. If there is a current selection, DrawContents finds out if the tile just drawn is part of the selection, and passes that information to DrawTile. If a tile is selected, DrawTile draws a black frame around it. DrawContents calls DrawTile for each tile individually, first checking if it is selected--so if the user has done a Select All, DrawContents displays selection feedback for each tile.
To make it easier to determine whether a particular tile is currently selected, this step adds a function to TTilesSelection, ContainsTile, that takes a tile index and returns True if that tile is part of the selection.
You can now create a Tiles document and see the new functionality by compiling the project in the directory $TaligentRoot/TaligentSamples/Supported/Apps/TilesTutorial/04.CurrentSelection/
Tiles
and then calling TilesTutorialApp
from the $TaligentSharedLibs
directory. Make sure that a previous version of a Tiles document is not running when you compile the project.