Nokia N97 SDK
Example Applications Guide

CShadowsAppUi Class Reference

#include <ShadowsAppUi.h>

Inheritance diagram for CShadowsAppUi:

List of all members.

Detailed Description

Application UI class that contains the CShadowsAppUi (as required by the Symbian UI application architecture).

Definition at line 33 of file ShadowsAppUi.h.


Public Member Functions

void  ConstructL ()
virtual  ~CShadowsAppUi ()

Private Member Functions

void  DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane)
void  HandleCommandL (TInt aCommand)
virtual TKeyResponse  HandleKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)

Private Attributes

CShadowsContainer *  iAppContainer


Constructor & Destructor Documentation

CShadowsAppUi::~CShadowsAppUi (   )  [virtual]
 

Destructor. Removes CShadowsContainer from the control stack and destroys it.

Definition at line 38 of file ShadowsAppUi.cpp.

References iAppContainer.

00039     {
00040     if ( iAppContainer )
00041         {
00042         RemoveFromStack( iAppContainer );
00043         delete iAppContainer;
00044         }
00045    }


Member Function Documentation

void CShadowsAppUi::ConstructL (   ) 
 

Second phase constructor. Creates the CShadowsContainer and adds it to the control stack.

Definition at line 28 of file ShadowsAppUi.cpp.

References CShadowsContainer::ConstructL(), and iAppContainer.

00029     {
00030     BaseConstructL();
00031     iAppContainer = new (ELeave) CShadowsContainer;
00032     iAppContainer->SetMopParent(this);
00033     iAppContainer->ConstructL( ClientRect(), this );
00034     AddToStackL( iAppContainer );
00035     }

void CShadowsAppUi::DynInitMenuPaneL (  TInt  aResourceId,
CEikMenuPane *  aMenuPane
)  [private]
 

This method is called by the EIKON framework just before it displays a menu pane. Does nothing in this implemenation.

Definition at line 55 of file ShadowsAppUi.cpp.

00057     {
00058     }

void CShadowsAppUi::HandleCommandL (  TInt  aCommand  )  [private]
 

CEikAppUi method that is used to handle user commands. Handles menu commands and application exit request.

Parameters:
aCommand  Command to be handled.

Definition at line 111 of file ShadowsAppUi.cpp.

00112     {
00113     switch ( aCommand )
00114         {
00115         case EAknSoftkeyBack:
00116         case EEikCmdExit:
00117             {
00118             Exit();
00119             break;
00120             }
00121         default:
00122             break;
00123         }
00124     }

TKeyResponse CShadowsAppUi::HandleKeyEventL (  const TKeyEvent &  aKeyEvent,
TEventCode  aType
)  [private, virtual]
 

CEikAppUi method that is used to handle key events. Does nothing in this implemenation.

Parameters:
aKeyEvent  Event to handled (ignored by this implementation).
aType  Type of the key event (ignored by this implementation).
Returns:
Response code. Always EKeyWasNotConsumed in this implementation.

Definition at line 65 of file ShadowsAppUi.cpp.

References iAppContainer, CShadowsContainer::iShadows, CShadows::RotateLightLeft(), and CShadows::RotateLightRight().

00067     {
00068     if ( aType == EEventKeyDown )
00069         {
00070         TUint scan = aKeyEvent.iScanCode;
00071 
00072         switch ( scan )
00073             {
00074             case(14):
00075                 iAppContainer->iShadows->RotateLightLeft();
00076                 return EKeyWasConsumed;
00077             case(15):
00078                 iAppContainer->iShadows->RotateLightRight();
00079                 return EKeyWasConsumed;
00080             default:
00081                 return EKeyWasNotConsumed;
00082             }
00083         }
00084     else if ( aType == EEventKeyUp )
00085         {
00086         TUint scan = aKeyEvent.iScanCode;
00087 
00088         switch ( scan )
00089             {
00090             case(14):
00091                 iAppContainer->iShadows->RotateLightLeft();
00092                 return EKeyWasConsumed;
00093             case(15):
00094                 iAppContainer->iShadows->RotateLightRight();
00095                 return EKeyWasConsumed;
00096             default:
00097                 return EKeyWasNotConsumed;
00098             }
00099         }
00100     else
00101         {
00102         return EKeyWasNotConsumed;
00103         }
00104     }


Member Data Documentation

CShadowsContainer* CShadowsAppUi::iAppContainer [private]
 

GUI container that resides in this application UI.

Definition at line 77 of file ShadowsAppUi.h.

Referenced by ConstructL(), HandleKeyEventL(), and ~CShadowsAppUi().


The documentation for this class was generated from the following files:

© Nokia 2009

Back to top