www.pudn.com > SoundMixer_Example_v1_0.zip > SoundMixerAppUi.cpp


   /* 
    * 
============================================================================ 
    *  Name     : SoundMixerAppUi.cpp 
    *  Part of  : SoundMixer 
    *  Created  : 03/01/2003 by Forum Nokia 
    *  Description: 
    *     This is the project specification file for SoundMixer. 
    * 
    *  Version  : 1.0.0 
    *  Copyright: Forum Nokia 
    * 
============================================================================ 
    */ 
 
 
#include "SoundMixerAppUi.h" 
#include "SoundMixerContainer.h" 
#include  
#include "soundmixer.hrh" 
 
#include  
 
void CSoundMixerAppUi::ConstructL() 
    { 
    BaseConstructL(); 
    iAppContainer = new (ELeave) CSoundMixerContainer; 
    iAppContainer->SetMopParent(this); 
    iAppContainer->ConstructL( ClientRect() ); 
    AddToStackL( iAppContainer ); 
    } 
 
CSoundMixerAppUi::~CSoundMixerAppUi() 
    { 
    if (iAppContainer) 
        { 
        RemoveFromStack( iAppContainer ); 
        delete iAppContainer; 
        } 
   } 
 
void CSoundMixerAppUi::DynInitMenuPaneL( 
    TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/) 
    { 
    } 
 
TKeyResponse CSoundMixerAppUi::HandleKeyEventL( 
    const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/) 
    { 
    return EKeyWasNotConsumed; 
    } 
 
void CSoundMixerAppUi::HandleCommandL(TInt aCommand) 
    { 
    switch ( aCommand ) 
        { 
        case EAknSoftkeyBack: 
        case EEikCmdExit: 
            { 
            Exit(); 
            break; 
            } 
        case ESoundMixerCmdStartMixer: 
            { 
			iAppContainer->StartMixer(); 
            break; 
            } 
 
        case ESoundMixerCmdStopMixer: 
            { 
			iAppContainer->StopMixer(); 
            break; 
            } 
 
        case ESoundMixerCmdVolumeUp: 
            { 
			iAppContainer->VolumeUp(); 
            break; 
            } 
 
        case ESoundMixerCmdVolumeDown: 
            { 
			iAppContainer->VolumeDown(); 
            break; 
            } 
 
        default: 
            break; 
        } 
    }