examples/SFExamples/RecipeEx/inc/LogContainer.h

00001 // Symbian Foundation Example Code
00002 // 
00003 // This software is in the public domain. No copyright is claimed, and you 
00004 // may use it for any purpose without license from the Symbian Foundation.
00005 // No warranty for any purpose is expressed or implied by the authors or
00006 // the Symbian Foundation. 
00007 
00008 
00009 #ifndef __LOGCONTAINER_H__
00010 #define __LOGCONTAINER_H__
00011 
00012 // Includes
00013 #include <coecntrl.h>
00014 
00015 // Forward declarations
00016 class CEikEdwin;
00017 class TDes16OverflowHandler;
00018 
00019 
00028 class CLogContainer : public CCoeControl
00029         {
00030 public: // Construction / destruction
00031 
00035         static CLogContainer* NewL( const TRect& aRect);
00036 
00040         static CLogContainer* NewLC( const TRect& aRect);
00041         
00043         ~CLogContainer();       
00044 
00045 private: // from CCoeControl
00046 
00051         void SizeChanged();
00052      
00054         void Draw( const TRect& aRect ) const;
00055         
00061         void HandleResourceChange(TInt aType);
00062 
00066         virtual TInt CountComponentControls() const;
00067 
00069         virtual CCoeControl* ComponentControl(TInt aIndex) const;
00070         
00072         virtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
00073 
00074 private: // Construction
00075         
00079         void ConstructL( const TRect& aRect);
00080 
00081 public: // Log APIs
00082 
00087         void LogSectionTitleL(const TDesC& aSectionTitle);      
00088 
00094         void LogEntryL(TRefByValue<const TDesC> aFormatString, ... );   
00095 
00096 private: // Internal API
00097         
00101         void AppendTextL(const TDesC& aLogText);        
00102         
00104         void ClearLogL();       
00105         
00106 private:
00107 
00111     CEikEdwin* iLog;
00112 
00113         };
00114 
00121 class TDes16OverflowHandler : public TDes16Overflow
00122         {
00123 public:
00124         TDes16OverflowHandler(){}
00125 
00126         // Ignore the overflow
00127         virtual void Overflow(TDes16& /*aDes*/){}
00128         };
00129 
00130 
00131 #endif // __LOGCONTAINER_H__
00132 
00133 // End of File

Generated by  doxygen 1.6.2