00001 /** $Revision: 1.10 $ 00002 Last updated: $Date: 2002/09/20 12:21:31 $ 00003 00004 Copyright (C) 2000-2002 Vlad Mereuta <dizzy@users.sourceforge.net> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 00019 00020 00021 #ifndef __TRANSACTIONS_TABLE__ 00022 #define __TRANSACTIONS_TABLE__ 00023 00024 #include <PalmOS.h> 00025 #include "Table.h" 00026 00027 class TransactionsTable : public Table 00028 { 00029 public: 00030 ///code for the date column 00031 static const Int16 date_col=0; 00032 ///code for the peer name/destination account column 00033 static const Int16 dest_col=1; 00034 ///code for the amount column 00035 static const Int16 amount_col=2; 00036 ///code for the column displaying the cleared status 00037 static const Int16 cleared_col=3; 00038 00039 /// initialises the table 00040 TransactionsTable(); 00041 00042 ///loads data into the accounts table 00043 void loadData(); 00044 00045 ///inits the columns in the table 00046 void initColumns(); 00047 00048 ///overloads the method in Table 00049 Boolean recordIsValid(UInt16 id); 00050 00051 ///draws a sum of money (callback) 00052 static void drawCurrency(void* table, Int16 row, Int16 column, RectangleType* bounds); 00053 00054 ///draws a date (callback) 00055 static void drawDate(void* table, Int16 row, Int16 column, RectangleType* bounds); 00056 00057 ///draw the account name (source or dest; the one which is different from the present account) - callback 00058 static void drawAcc(void* table, Int16 row, Int16 column, RectangleType* bounds); 00059 }; 00060 00061 #endif