S60ResourceLabAppUi.cpp
上传用户:laixiong
上传日期:2007-03-11
资源大小:2994k
文件大小:3k
源码类别:

Symbian

开发平台:

C/C++

  1. // Copyright (c) 2006 Nokia Corporation.
  2. // INCLUDE FILES
  3. #include "S60ResourceLabAppUi.h"
  4. #include "S60ResourceLabContainer.h" 
  5. #include <S60ResourceLab.rsg>
  6. #include "S60Resourcelab.hrh"
  7. #include <avkon.hrh>
  8. // ================= MEMBER FUNCTIONS =======================
  9. //
  10. // ----------------------------------------------------------
  11. // CS60ResourceLabAppUi::ConstructL()
  12. // ?implementation_description
  13. // ----------------------------------------------------------
  14. //
  15. void CS60ResourceLabAppUi::ConstructL()
  16.     {
  17.     BaseConstructL();
  18.     iAppContainer = new (ELeave) CS60ResourceLabContainer;
  19.     iAppContainer->SetMopParent(this);
  20.     iAppContainer->ConstructL( ClientRect() );
  21.     AddToStackL( iAppContainer );
  22.     }
  23. // ----------------------------------------------------
  24. // CS60ResourceLabAppUi::~CS60ResourceLabAppUi()
  25. // Destructor
  26. // Frees reserved resources
  27. // ----------------------------------------------------
  28. //
  29. CS60ResourceLabAppUi::~CS60ResourceLabAppUi()
  30.     {
  31.     if (iAppContainer)
  32.         {
  33.         RemoveFromStack( iAppContainer );
  34.         delete iAppContainer;
  35.         }
  36.     }
  37. // ------------------------------------------------------------------------------
  38. // CS60ResourceLabAppUi::::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
  39. //  This function is called by the EIKON framework just before it displays
  40. //  a menu pane. Its default implementation is empty, and by overriding it,
  41. //  the application can set the state of menu items dynamically according
  42. //  to the state of application data.
  43. // ------------------------------------------------------------------------------
  44. //
  45. void CS60ResourceLabAppUi::DynInitMenuPaneL(
  46.     TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
  47.     {
  48.     }
  49. // ----------------------------------------------------
  50. // CS60ResourceLabAppUi::HandleKeyEventL(
  51. //     const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
  52. // ?implementation_description
  53. // ----------------------------------------------------
  54. //
  55. TKeyResponse CS60ResourceLabAppUi::HandleKeyEventL(
  56.     const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
  57.     {
  58.     return EKeyWasNotConsumed;
  59.     }
  60. // ----------------------------------------------------
  61. // CS60ResourceLabAppUi::HandleCommandL(TInt aCommand)
  62. // ?implementation_description
  63. // ----------------------------------------------------
  64. //
  65. void CS60ResourceLabAppUi::HandleCommandL(TInt aCommand)
  66.     {
  67.     switch ( aCommand )
  68.         {
  69.         case EAknSoftkeyBack:
  70.         case EEikCmdExit:
  71.             {
  72.             Exit();
  73.             break;
  74.             }
  75.             
  76.         case ES60ResourceLabCmdAppTest:
  77.             {
  78.             
  79.             break;
  80.             }
  81.        
  82.         
  83.        
  84.         default:
  85.             break;      
  86.         }
  87.     }
  88. // End of File