Documentation  |   Table of Contents   |  < Previous   |  Next >  

118    Table.h

Porting Applications to Palm OS® Cobalt

Exploring Palm OS®

Palm OS Cobalt adds support for additional table item styles.

The Table APIs have been cleaned up, in that the internals of the TableType structure, formerly exposed for debugging purposes only, are now private, and declarations of other structures which only supported the TableType structure have been removed.

Tables in Palm OS Cobalt behave a bit differently than in previous Palm OS releases:

  • When table goes into edit mode, all columns that are edit indicators are highlighted. In version of Palm OS prior to Palm OS Cobalt, only contiguous edit indicators were highlighted. That is, if there are 5 columns and columns 0, 1, 2 and 4 are edit indicators, only columns 0, 1, and 2 were highlighted.
  • There is no need for tallCustomTableItem. In Palm OS Cobalt the entire row is always highlighted when necessary. In prior Palm OS releases, only the top 11 pixels were highlighted.
  • For custom table items, the table code formerly used winSwap to reverse the foreground and background colors if the item was to be drawn highlighted. This occurred after the custom drawing callback returned. In Palm OS Cobalt, winSwap is not supported and there's no way to change a color after the custom draw callback. Therefore, if you use nonstandard colors in your custom drawing callback for a table item, you need to check to see if you are drawing the current selection and update your colors accordingly. If you're just using the normal colors in the drawing callback, you don't need to worry about it.

Deleted APIs ^TOP^

Table 118.1  Deleted structures

Deleted API

Use instead

TableAttrType

Nothing. This structure was only used in the definition of the TableType structure, the internals of which are now private. Developers were warned never to access the contents of either of these structures directly.

TableColumnAttrType

Nothing. This structure was only used in the definition of the TableType structure, the internals of which are now private. Developers were warned never to access the contents of either of these structures directly.

TableItemType

Nothing. This structure was only used in the definition of the TableType structure, the internals of which are now private. Developers were warned never to access the contents of either of these structures directly.

TableRowAttrType

Nothing. This structure was only used in the definition of the TableType structure, the internals of which are now private. Developers were warned never to access the contents of either of these structures directly.

Table 118.2  Deleted types

Deleted API

Use instead

TableItemPtr

Nothing. In the most recent Palm OS Garnet SDK, this type was defined to a pointer to a TableItemType, which was declared but never used by any of the other APIs.

Modified APIs ^TOP^

Table 118.3  Modified structures

Modified API

Description of change

TableType

The contents of this structure have been made private.

Table 118.4  Modified enumerated types

Modified API

Description of change

tableItemStyles

Two new table item types have been added: labelNoColonTableItem and popupTriggerNoColonTableItem.

TableItemStyleType

Formerly an enum, this is now a typedef that accepts one of the values defined by the tableItemStyles enum.

Unchanged APIs ^TOP^

Table 118.5  Unchanged functions 

TblDrawTable()

TblEditing()

TblEraseTable()

TblFindRowData()

TblFindRowID()

TblGetBounds()

TblGetColumnSpacing()

TblGetColumnWidth()

TblGetCurrentField()

TblGetItemBounds()

TblGetItemFont()

TblGetItemInt()

TblGetItemPtr()

TblGetLastUsableRow()

TblGetNumberOfColumns()

TblGetNumberOfRows()

TblGetRowData()

TblGetRowHeight()

TblGetRowID()

TblGetSelection()

TblGetTopRow()

TblGrabFocus()

TblHandleEvent()

TblHasScrollBar()

TblInsertRow()

TblMarkRowInvalid()

TblMarkTableInvalid()

TblRedrawTable()

TblReleaseFocus()

TblRemoveRow()

TblRowInvalid()

TblRowMasked()

TblRowSelectable()

TblRowUsable()

TblSelectItem()

TblSetBounds()

TblSetColumnEditIndicator()

TblSetColumnMasked()

TblSetColumnSpacing()

TblSetColumnUsable()

TblSetColumnWidth()

TblSetCustomDrawProcedure()

TblSetItemFont()

TblSetItemInt()

TblSetItemPtr()

TblSetItemStyle()

TblSetLoadDataProcedure()

TblSetRowData()

TblSetRowHeight()

TblSetRowID()

TblSetRowMasked()

TblSetRowSelectable()

TblSetRowStaticHeight()

TblSetRowUsable()

TblSetSaveDataProcedure()

TblSetSelection()

TblUnhighlightSelection()

Table 118.6  Unchanged types

TableDrawItemFuncPtr

TableLoadDataFuncPtr

TablePtr

TableSaveDataFuncPtr

Table 118.7  Unchanged #defines

tableDefaultColumnSpacing

tableMaxTextItemSize

tableNoteIndicatorHeight

tableNoteIndicatorWidth

tblUnusableRow

Table 118.8  Unchanged application-defined functions

TableDrawItemFuncType()

TableLoadDataFuncType()

TableSaveDataFuncType()