|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : MessagingContainer.cpp 00004 * Part of : Messaging 00005 * Interface : 00006 * Description : 00007 * Version : 00008 * 00009 * Copyright (c) 2005-2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================== 00014 */ 00015 00016 // INCLUDE FILES 00017 #include "MessagingContainer.h" 00018 00019 00020 // ================= MEMBER FUNCTIONS ========================================== 00021 00022 // ----------------------------------------------------------------------------- 00023 // CFilelistContainer::NewL() 00024 // Symbian two-phased constructor. 00025 // ----------------------------------------------------------------------------- 00026 // 00027 CMessagingContainer* CMessagingContainer::NewL( const TRect& aRect ) 00028 { 00029 CMessagingContainer* self = CMessagingContainer::NewLC( aRect ); 00030 CleanupStack::Pop( self ); 00031 return self; 00032 } 00033 00034 // ----------------------------------------------------------------------------- 00035 // CFilelistContainer::NewLC() 00036 // Symbian two-phased constructor. 00037 // ----------------------------------------------------------------------------- 00038 // 00039 CMessagingContainer* CMessagingContainer::NewLC( const TRect& aRect ) 00040 { 00041 CMessagingContainer* self = new ( ELeave ) CMessagingContainer(); 00042 CleanupStack::PushL( self ); 00043 self->ConstructL( aRect ); 00044 return self; 00045 } 00046 00047 // ----------------------------------------------------------------------------- 00048 // CMessagingContainer::ConstructL(const TRect& aRect) 00049 // Symbian two phased constructor 00050 // ----------------------------------------------------------------------------- 00051 // 00052 void CMessagingContainer::ConstructL( const TRect& aRect ) 00053 { 00054 CreateWindowL(); 00055 // Set the windows size 00056 SetRect( aRect ); 00057 // Activate the window, which makes it ready to be drawn 00058 ActivateL(); 00059 } 00060 00061 // ----------------------------------------------------------------------------- 00062 // CMessagingContainer::~CMessagingContainer() 00063 // Destructor 00064 // ----------------------------------------------------------------------------- 00065 // 00066 CMessagingContainer::~CMessagingContainer() 00067 { 00068 // no implementation needed here 00069 } 00070 00071 // ----------------------------------------------------------------------------- 00072 // CMessagingContainer::SizeChanged() 00073 // Called by framework when the view size is changed 00074 // ----------------------------------------------------------------------------- 00075 // 00076 void CMessagingContainer::SizeChanged() 00077 { 00078 // no implementation needed here 00079 } 00080 00081 // ----------------------------------------------------------------------------- 00082 // CMessagingContainer::CountComponentControls() 00083 // Called by the framework in compound controls 00084 // @return the number of controls inside container 00085 // ----------------------------------------------------------------------------- 00086 // 00087 TInt CMessagingContainer::CountComponentControls() const 00088 { 00089 return 0; // there are no components 00090 } 00091 00092 // ----------------------------------------------------------------------------- 00093 // CMessagingContainer::ComponentControl(TInt aIndex) const 00094 // Called by the framework in compound controls 00095 // @param The index of the control to return 00096 // @return The control for aIndex 00097 // ----------------------------------------------------------------------------- 00098 // 00099 CCoeControl* CMessagingContainer::ComponentControl( TInt aIndex ) const 00100 { 00101 switch ( aIndex ) 00102 { 00103 default: 00104 return NULL; // there are no components 00105 } 00106 } 00107 00108 // ----------------------------------------------------------------------------- 00109 // CMessagingContainer::Draw(const TRect& aRect) const 00110 // Draw this application's view to the screen 00111 // ----------------------------------------------------------------------------- 00112 // 00113 void CMessagingContainer::Draw( const TRect& aRect ) const 00114 { 00115 CWindowGc& gc = SystemGc(); 00116 gc.SetPenStyle( CGraphicsContext::ENullPen ); 00117 gc.SetBrushColor( KRgbWhite ); 00118 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); 00119 gc.DrawRect( aRect ); 00120 } 00121 00122 // ----------------------------------------------------------------------------- 00123 // CMessagingContainer::HandleControlEventL() 00124 // Handles control events. 00125 // ----------------------------------------------------------------------------- 00126 // 00127 void CMessagingContainer::HandleControlEventL( 00128 CCoeControl*, TCoeEvent ) 00129 { 00130 // no implementation needed here 00131 } 00132 00133 // End of File
|
© Nokia 2006 |