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

CurrencyListForm.h

Go to the documentation of this file.
00001 /** $Revision: 1.3 $
00002     Last updated: $Date: 2002/09/20 12:21:30 $
00003 
00004     Copyright (C) 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 #ifndef __CURRENCY_LIST_FORM__
00021 #define __CURRENCY_LIST_FORM__
00022 
00023 #include <PalmOS.h>
00024 
00025 #include "Form.h"
00026 #include "EditCurrencyForm.h"
00027 #include "FreeCoinsRsc.h"
00028 
00029 /**  This class displays a form which enables the user to browse all entries in the currency database. The form also displays
00030      the default currency and allows for creation of new currency entries*/
00031 class CurrencyListForm : public Form
00032 {   
00033 public:
00034     /**  constructor; sets form variables */
00035     CurrencyListForm() FORM_SECTION1;
00036     ///returns singleton reference to this object
00037     static CurrencyListForm* instance() FORM_SECTION1;  
00038 
00039     /// callback for custom list drawing 
00040     static void drawCurrencyEntry(Int16 item_no, RectangleType* bounds, Char** txt) FORM_SECTION1;
00041 
00042     ///handle updates (made public so that we can force the update)
00043     Boolean handleUpdateEvent (UInt16 update_code) FORM_SECTION1;
00044 
00045 private:
00046     ///reference to this object
00047     static CurrencyListForm* _instance;
00048     ///pointer to list displaying currency entries
00049     ListPtr _list;
00050     
00051     ///object used to create/edit currencies
00052     EditCurrencyForm edit_currency_form;
00053 
00054     ///initialises form
00055     Boolean handleOpenEvent() FORM_SECTION1;
00056     /** handles selection of list items (pops up edit dialog)
00057         @param item item that has been selected */
00058     Boolean handleLstSelectEvent(UInt16 item) FORM_SECTION1;
00059     
00060     ///handles controls
00061     Boolean handleCtlSelectEvent (UInt16 control_id) FORM_SECTION1;
00062     ///handles key presses
00063     Boolean handleKeyDownEvent(WChar key_id, UInt16 modifiers) FORM_SECTION1;
00064 };
00065 
00066 #endif

Generated on Thu Jan 16 23:11:12 2003 for FreeCoins by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002