Supporting selections on the model

TTilesModel inherits from TModel, a base class provided by the Compound Document framework that supports many abstractions for models. Whenever you create a model, you have to implement TModel's only pure virtual function, CreateSelection. The CreateSelection function for each concrete model class returns a pointer to an instance of the TModelSelection derived class representing the default selection on that model.

Selections will be examined in more detail in Step 3 of this tutorial, which demonstrates how to create a selection class specifically for selecting data in a TTilesModel. For now, TTilesModel::CreateSelection will return a "dummy" selection, using the Presentation framework class template TGUIModelSelectionFor<TTilesModel>. TGUIModelSelectionFor<AModel> allows you to easily create a default selection on a given model.



[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