localisation/apparchitecture/tef/SimpleApparcTestApp.cpp
branchSymbian3
changeset 57 b8d18c84f71c
parent 6 c108117318cb
equal deleted inserted replaced
56:aa99f2208aad 57:b8d18c84f71c
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    18 // t_foreground sends a window server message to this app, this 
    18 // t_foreground sends a window server message to this app, this 
    19 // message is handled in CExampleAppUi::HandleSystemEventL
    19 // message is handled in CExampleAppUi::HandleSystemEventL
    20 // 
    20 // 
    21 //
    21 //
    22 
    22 
    23 
       
    24 
       
    25 /**
    23 /**
    26  @file
    24  @file
    27  @internalComponent - Internal Symbian test code
    25  @internalComponent - Internal Symbian test code
    28 */
    26 */
    29 
    27 
    34 #include <apgtask.h>
    32 #include <apgtask.h>
    35 #include <eikenv.h>
    33 #include <eikenv.h>
    36 #include <eikappui.h>
    34 #include <eikappui.h>
    37 #include <eikapp.h>
    35 #include <eikapp.h>
    38 #include <eikdoc.h>
    36 #include <eikdoc.h>
    39 #include <eikmenup.h>
    37 #include <mw/eikmenup.h>
    40 
    38 
    41 #include <eikon.hrh>
    39 #include <mw/eikon.hrh>
    42 
    40 
    43 #include <SimpleApparcTestApp.rsg>
    41 #include <simpleapparctestapp.rsg>
    44 #include "SimpleApparcTestApp.hrh"
    42 #include "SimpleApparcTestApp.hrh"
    45 
    43 
    46 #include <eikstart.h>
    44 #include <eikstart.h>
    47 
    45 
    48 
    46 
    49 ////////////////////////////////////////////////////////////////////////
    47 //
    50 //
    48 //
    51 // CExampleAppView
    49 // CExampleAppView
    52 //
    50 //
    53 ////////////////////////////////////////////////////////////////////////
    51 //
    54 class CExampleAppView : public CCoeControl
    52 class CExampleAppView : public CCoeControl
    55     {
    53     {
    56 public:
    54 public:
    57 	static CExampleAppView* NewL(const TRect& aRect);
    55 	static CExampleAppView* NewL(const TRect& aRect);
    58 	CExampleAppView();
    56 	CExampleAppView();
   106 	gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0);
   104 	gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0);
   107 	gc.DiscardFont();
   105 	gc.DiscardFont();
   108 	}
   106 	}
   109 
   107 
   110 
   108 
   111 ////////////////////////////////////////////////////////////////////////
   109 //
   112 //
   110 //
   113 // CExampleAppUi
   111 // CExampleAppUi
   114 //
   112 //
   115 ////////////////////////////////////////////////////////////////////////
   113 //
   116 class CExampleAppUi : public CEikAppUi
   114 class CExampleAppUi : public CEikAppUi
   117     {
   115     {
   118 public:
   116 public:
   119     void ConstructL();
   117     void ConstructL();
   120 	~CExampleAppUi();
   118 	~CExampleAppUi();
   181 
   179 
   182 
   180 
   183 
   181 
   184 
   182 
   185 
   183 
   186 ////////////////////////////////////////////////////////////////////////
   184 //
   187 //
   185 //
   188 // CExampleDocument
   186 // CExampleDocument
   189 //
   187 //
   190 ////////////////////////////////////////////////////////////////////////
   188 //
   191 class CExampleDocument : public CEikDocument
   189 class CExampleDocument : public CEikDocument
   192 	{
   190 	{
   193 public:
   191 public:
   194 	static CExampleDocument* NewL(CEikApplication& aApp);
   192 	static CExampleDocument* NewL(CEikApplication& aApp);
   195 	CExampleDocument(CEikApplication& aApp);
   193 	CExampleDocument(CEikApplication& aApp);
   209     return new(ELeave) CExampleAppUi;
   207     return new(ELeave) CExampleAppUi;
   210 	}
   208 	}
   211 
   209 
   212 
   210 
   213 
   211 
   214 ////////////////////////////////////////////////////////////////////////
   212 //
   215 //
   213 //
   216 // CExampleApplication
   214 // CExampleApplication
   217 //
   215 //
   218 ////////////////////////////////////////////////////////////////////////
   216 //
   219 
   217 
   220 class CExampleApplication : public CEikApplication
   218 class CExampleApplication : public CEikApplication
   221 	{
   219 	{
   222 private: 
   220 private: 
   223 	           // Inherited from class CApaApplication
   221 	           // Inherited from class CApaApplication
   250 GLDEF_C TInt E32Main()
   248 GLDEF_C TInt E32Main()
   251 	{
   249 	{
   252 	return EikStart::RunApplication(NewApplication);
   250 	return EikStart::RunApplication(NewApplication);
   253 	}
   251 	}
   254 	
   252 	
       
   253