S60 3rd Edition SDK for Symbian OS
Example Applications Guide

CShadowsAppUi Class Reference

#include <ShadowsAppUi.h>

List of all members.

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


Detailed Description

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

Definition at line 36 of file ShadowsAppUi.h.


Constructor & Destructor Documentation

CShadowsAppUi::~CShadowsAppUi (   )  [virtual]
 

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

Definition at line 41 of file ShadowsAppUi.cpp.

References iAppContainer.

00042     {
00043     if ( iAppContainer )
00044         {
00045         RemoveFromStack( iAppContainer );
00046         delete iAppContainer;
00047         }
00048    }


Member Function Documentation

void CShadowsAppUi::ConstructL (   ) 
 

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

Definition at line 31 of file ShadowsAppUi.cpp.

References CShadowsContainer::ConstructL(), and iAppContainer.

00032     {
00033     BaseConstructL();
00034     iAppContainer = new (ELeave) CShadowsContainer;
00035     iAppContainer->SetMopParent(this);
00036     iAppContainer->ConstructL( ClientRect() );
00037     AddToStackL( iAppContainer );
00038     }

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 58 of file ShadowsAppUi.cpp.

00060     {
00061     }

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 114 of file ShadowsAppUi.cpp.

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

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 68 of file ShadowsAppUi.cpp.

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

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


Member Data Documentation

CShadowsContainer* CShadowsAppUi::iAppContainer [private]
 

GUI container that resides in this application UI.

Definition at line 80 of file ShadowsAppUi.h.


© Nokia 2006

Back to top