S60 3rd Edition SDK for Symbian OS
Example Applications Guide

CSimpleCubeAppUi Class Reference

#include <SimpleCubeAppUi.h>

List of all members.

Public Member Functions

void ConstructL ()
virtual ~CSimpleCubeAppUi ()

Private Member Functions

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

Private Attributes

CSimpleCubeContainer * iAppContainer


Detailed Description

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

Definition at line 35 of file SimpleCubeAppUi.h.


Constructor & Destructor Documentation

CSimpleCubeAppUi::~CSimpleCubeAppUi (   )  [virtual]
 

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

Definition at line 46 of file SimpleCubeAppUi.cpp.

References iAppContainer.

00047 {
00048     if ( iAppContainer )
00049         {
00050         RemoveFromStack( iAppContainer );
00051         delete iAppContainer;
00052         }
00053 }


Member Function Documentation

void CSimpleCubeAppUi::ConstructL (   ) 
 

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

Definition at line 31 of file SimpleCubeAppUi.cpp.

References CSimpleCubeContainer::ConstructL(), and iAppContainer.

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

void CSimpleCubeAppUi::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 63 of file SimpleCubeAppUi.cpp.

00065     {
00066     }

void CSimpleCubeAppUi::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 85 of file SimpleCubeAppUi.cpp.

References CSimpleCube::FlatShading(), iAppContainer, CSimpleCubeContainer::iSimpleCube, CSimpleCube::SmoothShading(), CSimpleCube::TriangleFanMode(), and CSimpleCube::TriangleMode().

00086     {
00087     switch ( aCommand )
00088         {
00089         case EAknSoftkeyBack:
00090         case EEikCmdExit:
00091             {
00092             Exit();
00093             break;
00094             }
00095         case ESimpleCubeFlat:
00096             iAppContainer->iSimpleCube->FlatShading();
00097             break;
00098         case ESimpleCubeSmooth:
00099             iAppContainer->iSimpleCube->SmoothShading();
00100             break;
00101         case ESimpleCubeTriangles:
00102             iAppContainer->iSimpleCube->TriangleMode();
00103             break;
00104         case ESimpleCubeTriangleFans:
00105             iAppContainer->iSimpleCube->TriangleFanMode();
00106             break;
00107         default:
00108             break;      
00109         }
00110     }

TKeyResponse CSimpleCubeAppUi::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 74 of file SimpleCubeAppUi.cpp.

00076 {
00077     return EKeyWasNotConsumed;
00078 }


Member Data Documentation

CSimpleCubeContainer* CSimpleCubeAppUi::iAppContainer [private]
 

GUI container that resides in this application UI.

Definition at line 79 of file SimpleCubeAppUi.h.


© Nokia 2006

Back to top