Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Table Class Reference

A wrapper for the Table functions; its main function is to set a few standard functions which are to be overloaded in derived classes. More...

#include <Table.h>

Inheritance diagram for Table:

AccountsTable SplitsTable TransactionsTable List of all members.

Public Methods

void initTable ()
 initialises the table pointer. More...

 Table (UInt32 table_resource, UInt32 up, UInt32 down)
 initialises the table. More...

virtual ~Table ()
 destructor: by default it hides the scroll arrows. More...

void setRowsUnusable (UInt16 start)
 set part of the table rows to unusable. More...

void unhighlight ()
 unhilights the curent selection. More...

Boolean pageUp ()
 scroll a page up (if possible). More...

Boolean pageDown ()
 scroll a page down (if possible). More...

void hideScrollArrows ()
 hide the scroll arrows. More...

void showScrollArrows ()
 displays scroll arrows for the table (if needed). More...

virtual void initColumns ()=0
 initialises the columns. More...

virtual void loadData ()=0
 loads date into the table. More...

virtual Boolean recordIsValid (UInt16 id)=0
 this function should be used to check whether a record belongs in this table or not. More...


Public Attributes

UInt16 top_visible_item
 the id of the top visible item. More...

UInt16 rows
 the max no of rows that can be displayed at once in this table. More...

UInt16 total_items
 no of elements that could be loaded in the table. More...


Protected Attributes

TablePtr _table
 pointer to the table managed by the object. More...

UInt32 _table_resource
 resource for the table. More...

UInt32 _up_arrow
 resource for the up arrow. More...

UInt32 _down_arrow
 resource for the down arrow. More...

FormPtr _form
 pointer to the form hosting the table. More...


Detailed Description

A wrapper for the Table functions; its main function is to set a few standard functions which are to be overloaded in derived classes.

Definition at line 30 of file Table.h.


Constructor & Destructor Documentation

Table::Table UInt32    table_resource,
UInt32    up,
UInt32    down
 

initialises the table.

Parameters:
table_resource  id of the resource associated with this table
up  id of the resource associeted with the 'up' scroll arrow
down  id of the resource associeted with the 'down' scroll arrow

virtual Table::~Table   [virtual]
 

destructor: by default it hides the scroll arrows.


Member Function Documentation

void Table::hideScrollArrows  
 

hide the scroll arrows.

virtual void Table::initColumns   [pure virtual]
 

initialises the columns.

Implemented in AccountsTable.

void Table::initTable  
 

initialises the table pointer.

this code is not in the constructor because delayed initialisation might be desired (after the form was initialised) When finished this function calls the loadData method in orded to populate the table.

virtual void Table::loadData   [pure virtual]
 

loads date into the table.

Implemented in AccountsTable.

Boolean Table::pageDown  
 

scroll a page down (if possible).

Returns:
true if the operation was executed, false otherwise

Boolean Table::pageUp  
 

scroll a page up (if possible).

Returns:
true if the operation was executed, false otherwise

virtual Boolean Table::recordIsValid UInt16    id [pure virtual]
 

this function should be used to check whether a record belongs in this table or not.

Parameters:
id  the id of the record to be checked
Returns:
true if the record is valid and false otherwise

Implemented in AccountsTable.

void Table::setRowsUnusable UInt16    start
 

set part of the table rows to unusable.

Parameters:
start  row from which all other rows will be unusable

void Table::showScrollArrows  
 

displays scroll arrows for the table (if needed).

void Table::unhighlight  
 

unhilights the curent selection.


Member Data Documentation

UInt32 Table::_down_arrow [protected]
 

resource for the down arrow.

Definition at line 94 of file Table.h.

FormPtr Table::_form [protected]
 

pointer to the form hosting the table.

Definition at line 96 of file Table.h.

TablePtr Table::_table [protected]
 

pointer to the table managed by the object.

Definition at line 88 of file Table.h.

UInt32 Table::_table_resource [protected]
 

resource for the table.

Definition at line 90 of file Table.h.

UInt32 Table::_up_arrow [protected]
 

resource for the up arrow.

Definition at line 92 of file Table.h.

UInt16 Table::rows
 

the max no of rows that can be displayed at once in this table.

Definition at line 36 of file Table.h.

UInt16 Table::top_visible_item
 

the id of the top visible item.

Definition at line 34 of file Table.h.

UInt16 Table::total_items
 

no of elements that could be loaded in the table.

Definition at line 38 of file Table.h.


The documentation for this class was generated from the following file:
Generated on Thu Jan 16 23:11:15 2003 for FreeCoins by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002