The Table Objects: 2 TableClass Overview

Up: GEOS SDK TechDocs| Up | Prev: 1 Table Objects | Next: 3 TableClass Instance Data

TableClass implements a scrolling table. The table should be composed of one or more different columns, and one or more similar rows. Typically, each column would be a different category, and each row would have an entry for every different category.

TableClass is a subclass of VisCompClass . This means that you can group tables together or with other Vis objects. (You can put titles on a scrolling table by grouping two different Table objects together; this is discussed in Table Headings.)

TableClass supports the following features:

There is one function the Table object does not perform. It does not store the data contained in the cells. When it needs to know the contents of a cell, it requests that information; when the user changes a cell, it informs you. You, however, must store the information yourself.

For example, whenever the Table object needs to draw a cell, it sends itself MSG_TABLE_QUERY_DRAW , specifying which cell needs to be drawn. You should intercept this message; your handler should look up the data stored in that cell, and draw its contents. Similarly, when a user edits a cell, you first tell the Table object what the current contents of the cell are (by intercepting MSG_TABLE_START_EDIT_CELL_TEXT ). The Table then brings up a VisText which contains the current contents of the cell. The user can edit or change this text. When the user is finished, the Table object informs the application (via MSG_TABLE_DONE_EDIT_CELL_TEXT ) what the cell's new contents are. The application should intercept the message and store the new contents.

Since the Table refers to its cells by row and column numbers, you may wish to store its data in a GEOS cell file . A cell file is a GEOS VM file which uses special structures and routines to organize DB items so they can be accessed by row and column numbers, instead of by group and item handles. For more information about cell files, consult the "Database" chapter of the Concepts book provided with the SDK.


Up: GEOS SDK TechDocs| Up | Prev: 1 Table Objects | Next: 3 TableClass Instance Data