examples/SFExamples/NotifierExample/Launchers/ExeLauncher_S60/src/ExeLauncher_S60Container.cpp

00001 /*
00002 ========================================================================
00003  Name        : ExeLauncher_S60Container.cpp
00004  Author      : Hamish Willee
00005  Copyright   : (C) Symbian 2007
00006  Description : 
00007 ========================================================================
00008 */
00009 // [[[ begin generated region: do not modify [Generated System Includes]
00010 #include <aknviewappui.h>
00011 #include <eikappui.h>
00012 #include <ExeLauncher_S60.rsg>
00013 // ]]] end generated region [Generated System Includes]
00014 
00015 // [[[ begin generated region: do not modify [Generated User Includes]
00016 #include "ExeLauncher_S60Container.h"
00017 #include "ExeLauncher_S60ContainerView.h"
00018 #include "ExeLauncher_S60.hrh"
00019 #include "ExeLauncher_S60Container.hrh"
00020 // ]]] end generated region [Generated User Includes]
00021 
00022 // [[[ begin generated region: do not modify [Generated Constants]
00023 // ]]] end generated region [Generated Constants]
00024 
00029 CExeLauncher_S60Container::CExeLauncher_S60Container()
00030         {
00031         // [[[ begin generated region: do not modify [Generated Contents]
00032         // ]]] end generated region [Generated Contents]
00033         
00034         }
00038 CExeLauncher_S60Container::~CExeLauncher_S60Container()
00039         {
00040         // [[[ begin generated region: do not modify [Generated Contents]
00041         // ]]] end generated region [Generated Contents]
00042         
00043         }
00044                                 
00054 CExeLauncher_S60Container* CExeLauncher_S60Container::NewL( 
00055                 const TRect& aRect, 
00056                 const CCoeControl* aParent, 
00057                 MEikCommandObserver* aCommandObserver )
00058         {
00059         CExeLauncher_S60Container* self = CExeLauncher_S60Container::NewLC( 
00060                         aRect, 
00061                         aParent, 
00062                         aCommandObserver );
00063         CleanupStack::Pop( self );
00064         return self;
00065         }
00066 
00076 CExeLauncher_S60Container* CExeLauncher_S60Container::NewLC( 
00077                 const TRect& aRect, 
00078                 const CCoeControl* aParent, 
00079                 MEikCommandObserver* aCommandObserver )
00080         {
00081         CExeLauncher_S60Container* self = new ( ELeave ) CExeLauncher_S60Container();
00082         CleanupStack::PushL( self );
00083         self->ConstructL( aRect, aParent, aCommandObserver );
00084         return self;
00085         }
00086                         
00094 void CExeLauncher_S60Container::ConstructL( 
00095                 const TRect& aRect, 
00096                 const CCoeControl* aParent, 
00097                 MEikCommandObserver* aCommandObserver )
00098         {
00099         if ( aParent == NULL )
00100             {
00101                 CreateWindowL();
00102             }
00103         else
00104             {
00105             SetContainerWindowL( *aParent );
00106             }
00107         iFocusControl = NULL;
00108         iCommandObserver = aCommandObserver;
00109         InitializeControlsL();
00110         SetRect( aRect );
00111         ActivateL();
00112         // [[[ begin generated region: do not modify [Post-ActivateL initializations]
00113         // ]]] end generated region [Post-ActivateL initializations]
00114         
00115         }
00116                         
00121 TInt CExeLauncher_S60Container::CountComponentControls() const
00122         {
00123         return ( int ) ELastControl;
00124         }
00125                                 
00131 CCoeControl* CExeLauncher_S60Container::ComponentControl( TInt aIndex ) const
00132         {
00133         // [[[ begin generated region: do not modify [Generated Contents]
00134         switch ( aIndex )
00135                 {
00136                 }
00137         // ]]] end generated region [Generated Contents]
00138         
00139         // handle any user controls here...
00140         
00141         return NULL;
00142         }
00143                                 
00151 void CExeLauncher_S60Container::SizeChanged()
00152         {
00153         CCoeControl::SizeChanged();
00154         LayoutControls();
00155         // [[[ begin generated region: do not modify [Generated Contents]
00156                         
00157         // ]]] end generated region [Generated Contents]
00158         
00159         }
00160                                 
00161 // [[[ begin generated function: do not modify
00165 void CExeLauncher_S60Container::LayoutControls()
00166         {
00167         }
00168 // ]]] end generated function
00169 
00173 TKeyResponse CExeLauncher_S60Container::OfferKeyEventL( 
00174                 const TKeyEvent& aKeyEvent, 
00175                 TEventCode aType )
00176         {
00177         // [[[ begin generated region: do not modify [Generated Contents]
00178         
00179         // ]]] end generated region [Generated Contents]
00180         
00181         if ( iFocusControl != NULL
00182                 && iFocusControl->OfferKeyEventL( aKeyEvent, aType ) == EKeyWasConsumed )
00183                 {
00184                 return EKeyWasConsumed;
00185                 }
00186         return CCoeControl::OfferKeyEventL( aKeyEvent, aType );
00187         }
00188                                 
00189 // [[[ begin generated function: do not modify
00193 void CExeLauncher_S60Container::InitializeControlsL()
00194         {
00195         
00196         }
00197 // ]]] end generated function
00198 
00202 void CExeLauncher_S60Container::HandleResourceChange( TInt aType )
00203         {
00204         CCoeControl::HandleResourceChange( aType );
00205         SetRect( iAvkonViewAppUi->View( TUid::Uid( EExeLauncher_S60ContainerViewId ) )->ClientRect() );
00206         // [[[ begin generated region: do not modify [Generated Contents]
00207         // ]]] end generated region [Generated Contents]
00208         
00209         }
00210                                 
00214 void CExeLauncher_S60Container::Draw( const TRect& aRect ) const
00215         {
00216         // [[[ begin generated region: do not modify [Generated Contents]
00217         CWindowGc& gc = SystemGc();
00218         gc.Clear( aRect );
00219         
00220         // ]]] end generated region [Generated Contents]
00221         
00222         }
00223                                 

Generated by  doxygen 1.6.2