examples/Graphics/WS/PtBuffer/AppHolder.cpp

00001 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // License: "Symbian Foundation License v1.0" to Symbian Foundation
00004 // members and "Symbian Foundation End User License Agreement v1.0"
00005 // to non-members at the URL
00006 // "http://www.symbianfoundation.org/legal/licencesv10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 //
00015 
00016 
00017 #include "AppHolder.h"
00018 #include "PointerMoveBuffer.h"
00019 #include <eikstart.h>
00020 //
00021 // EXPORTed functions
00022 //
00023 
00024 EXPORT_C CApaApplication* NewApplication()
00025         {
00026         return new CAppholderApplication;
00027         }
00028 
00029                                                                                 
00030 extern TInt E32Main()           
00031         {
00032         return EikStart::RunApplication(NewApplication);
00033         }
00034 
00035 
00037 //
00038 // Application class, CAppholderApplication
00039 //
00041 
00042 TUid CAppholderApplication::AppDllUid() const
00043         {
00044         return KUidAppholder;
00045         }
00046 
00047 CApaDocument* CAppholderApplication::CreateDocumentL()
00048         {
00049         // Construct the document using its NewL() function, rather 
00050         // than using new(ELeave), because it requires two-phase
00051         // construction.
00052         return new (ELeave) CAppholderDocument(*this);
00053         }
00054 
00055 
00057 //
00058 // Document class, CAppholderDocument
00059 //
00061 
00062 // C++ constructor
00063 CAppholderDocument::CAppholderDocument(CEikApplication& aApp)
00064                 : CEikDocument(aApp)
00065         {
00066         }
00067 
00068 CEikAppUi* CAppholderDocument::CreateAppUiL()
00069         {
00070     return new(ELeave) CAppholderAppUi;
00071         }
00072 
00073 CAppholderDocument::~CAppholderDocument()
00074         {
00075         }
00076 
00078 //
00079 // App UI class, CAppholderAppUi
00080 //
00082 
00083 void CAppholderAppUi::ConstructL()
00084     {
00085     BaseConstructL();
00086         iClient=CExampleWsClient::NewL(ClientRect());
00087     }
00088 
00089 CAppholderAppUi::~CAppholderAppUi()
00090         {
00091         delete iClient;
00092         }
00093 
00094 void CAppholderAppUi::HandleCommandL(TInt aCommand)
00095         {
00096         switch (aCommand)
00097                 {
00098         case EEikCmdExit: 
00099                 Exit();
00100                 break;
00101                 }
00102         }

Generated by  doxygen 1.6.2