|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : SIPExLogContainer.h 00004 * Part of : SIPEx 00005 * Interface : 00006 * Description : 00007 * Version : 00008 * 00009 * Copyright (c) 2004-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 #ifndef __SIPEXLOGCONTAINER_H__ 00017 #define __SIPEXLOGCONTAINER_H__ 00018 00019 // INCLUDES 00020 #include <coecntrl.h> 00021 #include <aknutils.h> 00022 00023 // FORWARD DECLARATIONS 00024 class CSIPExEngine; 00025 class CEikGlobalTextEditor; 00026 class CAknsBasicBackgroundControlContext; 00027 00028 // CLASS DECLARATION 00029 00030 /** 00031 * CSIPExLogContainer container control class. 00032 * 00033 */ 00034 class CSIPExLogContainer : public CCoeControl, MCoeControlObserver 00035 { 00036 public: // Constructors and destructor 00037 00038 /** 00039 * C++ default constructor 00040 * @param aEngine The reference to the application engine. 00041 */ 00042 CSIPExLogContainer( CSIPExEngine& aEngine ); 00043 00044 /** 00045 * EPOC default constructor. 00046 * @param aRect Frame rectangle for container. 00047 */ 00048 void ConstructL(const TRect& aRect); 00049 00050 /** 00051 * Destructor. 00052 */ 00053 ~CSIPExLogContainer(); 00054 00055 private: // Functions from base classes 00056 00057 /** 00058 * From CoeControl,SizeChanged. 00059 */ 00060 void SizeChanged(); 00061 00062 /** 00063 * From CoeControl,CountComponentControls. 00064 */ 00065 TInt CountComponentControls() const; 00066 00067 /** 00068 * From CCoeControl,ComponentControl. 00069 */ 00070 CCoeControl* ComponentControl( TInt aIndex ) const; 00071 00072 /** 00073 * From CCoeControl,Draw. 00074 */ 00075 void Draw( const TRect& aRect ) const; 00076 00077 /** 00078 * From CCoeControl, HandleControlEventL. 00079 */ 00080 // event handling section 00081 // e.g Listbox events 00082 void HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType ); 00083 00084 /** 00085 * From CCoeControl, OfferKeyEvent. 00086 */ 00087 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); 00088 00089 /** 00090 * From CCoeControl, HandleResourceChange. 00091 */ 00092 void HandleResourceChange( TInt aType ); 00093 00094 /** 00095 * From CCoeControl, MopSupplyObject. 00096 */ 00097 TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); 00098 00099 public: 00100 00101 /** 00102 * Show current info text in editor 00103 */ 00104 void ShowInfoL(); 00105 00106 /** 00107 * Gets appropriate layout for editor 00108 */ 00109 AknLayoutUtils::SAknLayoutTextMultiline GetEditorLayout( const TRect& aRect ) const; 00110 00111 TInt FontHeightInPixels() const; 00112 00113 TInt FontTotalHeightInPixels() const; 00114 00115 TInt NumOfFittingEditorLines( const TRect& aRect ) const; 00116 00117 00118 private: //data 00119 00120 // Info text area. Area where all info texts can be drawn. 00121 CEikGlobalTextEditor* iEditor; 00122 00123 CAknsBasicBackgroundControlContext* iBgContext; 00124 00125 CSIPExEngine& iEngine; 00126 00127 }; 00128 00129 #endif // __SIPEXLOGCONTAINER_H__ 00130 00131 // End of File
|
© Nokia 2006 |