examples/Graphics/WS/Scroll/AppHolder.cpp

00001 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of "Eclipse Public License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.eclipse.org/legal/epl-v10.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 "Scroll.h"
00019 #include <eikstart.h>
00020 //
00021 // EXPORTed functions
00022 //
00023 
00024 EXPORT_C CApaApplication* NewApplication()
00025         {
00026         return new CAppholderApplication;
00027         }
00028                                                                         
00029 extern TInt E32Main()           
00030         {
00031         return EikStart::RunApplication(NewApplication);
00032         }
00033 
00034 
00036 //
00037 // Application class, CAppholderApplication
00038 //
00040 
00041 TUid CAppholderApplication::AppDllUid() const
00042         {
00043         return KUidAppholder;
00044         }
00045 
00046 CApaDocument* CAppholderApplication::CreateDocumentL()
00047         {
00048         // Construct the document using its NewL() function, rather 
00049         // than using new(ELeave), because it requires two-phase
00050         // construction.
00051         return new (ELeave) CAppholderDocument(*this);
00052         }
00053 
00054 
00056 //
00057 // Document class, CAppholderDocument
00058 //
00060 
00061 // C++ constructor
00062 CAppholderDocument::CAppholderDocument(CEikApplication& aApp)
00063                 : CEikDocument(aApp)
00064         {
00065         }
00066 
00067 CEikAppUi* CAppholderDocument::CreateAppUiL()
00068         {
00069     return new(ELeave) CAppholderAppUi;
00070         }
00071 
00072 CAppholderDocument::~CAppholderDocument()
00073         {
00074         }
00075 
00077 //
00078 // App UI class, CAppholderAppUi
00079 //
00081 
00082 void CAppholderAppUi::ConstructL()
00083     {
00084     BaseConstructL();
00085         iClient=CExampleWsClient::NewL(ClientRect());
00086     }
00087 
00088 CAppholderAppUi::~CAppholderAppUi()
00089         {
00090         delete iClient;
00091         }
00092 
00093 void CAppholderAppUi::HandleCommandL(TInt aCommand)
00094         {
00095         switch (aCommand)
00096                 {
00097         case EEikCmdExit: 
00098                 Exit();
00099                 break;
00100                 }
00101         }

Generated by  doxygen 1.6.2