home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 Mobile
/
Chip_Mobile_2001.iso
/
palm
/
business
/
printcar
/
printcar.exe
/
src
/
UI
/
Application.cc
next >
Wrap
C/C++ Source or Header
|
2000-06-06
|
882b
|
43 lines
//
// $Id: Application.cc,v 1.2 2000/06/06 09:31:09 sergey Exp $
//
#include <Pilot.h>
#include "Application.h"
#include "Form.h"
namespace UI
{
void Application::run(Form& mainForm, long eventLoopDelay)
{
mainForm.create();
FrmPopupForm(mainForm.formID());
eventLoop(eventLoopDelay);
mainForm.destroy(); // do it here due to the problems with static variables
}
void Application::eventLoop(long delay)
{
Word error;
EventType event;
do
{
EvtGetEvent(&event, delay);
if (SysHandleEvent(&event))
continue;
if (MenuHandleEvent(NULL, &event, &error))
continue;
FrmDispatchEvent(&event);
}
while (event.eType != appStopEvent);
}
}
// namespace UI