Nokia N97 SDK
Example Applications Guide

CListboxAppUi Class Reference

#include <ListboxAppUi.h>

Inheritance diagram for CListboxAppUi:

List of all members.

Detailed Description

CListboxAppUi application UI class. Interacts with the user through the UI and request message processing from the handler class

Definition at line 33 of file ListboxAppUi.h.


Public Member Functions

void  ConstructL ()
  CListboxAppUi ()
virtual  ~CListboxAppUi ()

Private Member Functions

void  HandleCommandL (TInt aCommand)
void  HandleResourceChangeL (TInt aType)

Private Attributes

CViewTemplate< CListboxNumberContainer > *  iSingleNumberStyleView
CViewTemplate< CListboxGraphicContainer > *  iSingleGraphicStyleView
CListboxSettingView *  iSettingView


Constructor & Destructor Documentation

CListboxAppUi::CListboxAppUi (   ) 
 

C++ default constructor. This needs to be public due to the way the framework constructs the AppUi

Definition at line 68 of file ListboxAppUi.cpp.

00069     {
00070     // No implementation required
00071     }

CListboxAppUi::~CListboxAppUi (   )  [virtual]
 

Virtual Destructor.

Definition at line 78 of file ListboxAppUi.cpp.

00079     {
00080     }


Member Function Documentation

void CListboxAppUi::ConstructL (   ) 
 

2nd phase constructor.

Definition at line 36 of file ListboxAppUi.cpp.

References iSettingView, iSingleGraphicStyleView, iSingleNumberStyleView, CViewTemplate< T >::MenuItemToDimm(), CListboxSettingView::NewL(), and CViewTemplate< T >::NewL().

00037     {
00038     // Enable skin and MSK.
00039     BaseConstructL(EAknEnableSkin | EAknEnableMSK );
00040     
00041     // Create view objects.
00042     iSingleNumberStyleView = CViewTemplate<CListboxNumberContainer>::NewL( 
00043         R_LISTBOX_NUMBER_VIEW, 
00044         0, 
00045         TUid::Uid( EListboxNumberView ) );    
00046     iSingleNumberStyleView->MenuItemToDimm( EListboxCommandToNumberStyle );
00047         
00048     iSingleGraphicStyleView = CViewTemplate<CListboxGraphicContainer>::NewL(
00049         R_LISTBOX_GRAPHIC_VIEW, 
00050         R_LISTBOX_GRAPHICVIEW_MSK_MENUBAR, 
00051         TUid::Uid( EListboxGraphicView ) );
00052     iSingleGraphicStyleView->MenuItemToDimm( EListboxCommandToGraphicStyle );
00053         
00054     iSettingView = CListboxSettingView::NewL();
00055 
00056     AddViewL( iSingleNumberStyleView );
00057     AddViewL( iSingleGraphicStyleView );
00058     AddViewL( iSettingView );
00059     
00060     SetDefaultViewL( *iSingleNumberStyleView );    
00061     }

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

From CEikAppUi, HandleCommandL. Takes care of command handling.

Parameters:
aCommand  Command to be handled.

Definition at line 87 of file ListboxAppUi.cpp.

00088     {
00089     switch( aCommand )
00090         {
00091         case EListboxCommandToNumberStyle:
00092             {
00093                 ActivateLocalViewL( TUid::Uid( EListboxNumberView ) );  
00094                 }
00095             break;
00096         case EListboxCommandToGraphicStyle:
00097                 {                       
00098                 ActivateLocalViewL( TUid::Uid( EListboxGraphicView ) );
00099                 }
00100             break;
00101         case EListboxCommandToSetting:
00102                 {
00103                 ActivateLocalViewL( TUid::Uid( EListboxSettingView ) );
00104                 }
00105             break;
00106         case EEikCmdExit:
00107         case EAknSoftkeyExit:
00108             Exit();
00109             break;
00110         default:
00111             break;
00112         }
00113     }

void CListboxAppUi::HandleResourceChangeL (  TInt  aType  )  [private]
 

Handles a change to the control's resources.

Parameters:
aType  A message UID value.

Definition at line 120 of file ListboxAppUi.cpp.

References CListboxSettingView::HandleSizeChange(), CViewTemplate< T >::HandleSizeChange(), iSettingView, iSingleGraphicStyleView, and iSingleNumberStyleView.

00121     {
00122     CAknAppUi::HandleResourceChangeL( aType );
00123        
00124     if ( aType==KEikDynamicLayoutVariantSwitch )
00125         {
00126         iSingleNumberStyleView->HandleSizeChange(aType);   
00127         iSingleGraphicStyleView->HandleSizeChange(aType); 
00128         iSettingView->HandleSizeChange(aType); 
00129         }           
00130     }


Member Data Documentation

CViewTemplate<CListboxNumberContainer>* CListboxAppUi::iSingleNumberStyleView [private]
 

The SingleNumberStyle view. Owned.

Definition at line 74 of file ListboxAppUi.h.

Referenced by ConstructL(), and HandleResourceChangeL().

CViewTemplate<CListboxGraphicContainer>* CListboxAppUi::iSingleGraphicStyleView [private]
 

The SingleGraphicStyle view. Owned.

Definition at line 80 of file ListboxAppUi.h.

Referenced by ConstructL(), and HandleResourceChangeL().

CListboxSettingView* CListboxAppUi::iSettingView [private]
 

The Setting view. Owned.

Definition at line 86 of file ListboxAppUi.h.

Referenced by ConstructL(), and HandleResourceChangeL().


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

© Nokia 2009

Back to top