|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================ 00003 * Name : datamobilityappoutputcontainer.h 00004 * Part of : datamobility 00005 * Description : Declares the output container class. 00006 * 00007 * Copyright (c) 2007 Nokia Corporation. 00008 * This material, including documentation and any related 00009 * computer programs, is protected by copyright controlled by 00010 * Nokia Corporation. 00011 * ============================================================================ 00012 */ 00013 00014 #ifndef DATAMOBILITYAPPOUTPUTCONTAINER_H 00015 #define DATAMOBILITYAPPOUTPUTCONTAINER_H 00016 00017 // INCLUDES 00018 #include <coecntrl.h> 00019 #include <eiklbo.h> 00020 #include "datamobilityprinter.h" 00021 00022 // CONSTANTS 00023 static const TInt KTextXMargin = 10; 00024 static const TInt KTextMinY = 20; 00025 static const TInt KTextDistanceBetweenLines = 20; 00026 00027 // CLASS DECLARATION 00028 00029 /** 00030 * CDataMobilityAppOutputContainer container control class. 00031 * 00032 */ 00033 class CDataMobilityAppOutputContainer : public CCoeControl, public MDataMobilityPrinter 00034 { 00035 public: // Constructors and destructor 00036 00037 /** 00038 * Symbian OS default constructor. 00039 * @param aRect Frame rectangle for container. 00040 * @param aObjectToStart Identify an example object to start. 00041 */ 00042 void ConstructL( const TRect& aRect, TInt aObjectToStart ); 00043 00044 /** 00045 * Destructor. 00046 */ 00047 ~CDataMobilityAppOutputContainer(); 00048 00049 public: // Functions from MDataMobilityPrinter interface 00050 00051 /** 00052 * Print a line of text in the output view. 00053 * @param aLine Line of text to be printed. 00054 */ 00055 void Print( const TDesC& aLine ); 00056 00057 private: // Functions from base classes 00058 00059 /** 00060 * From CCoeControl,Draw. 00061 * Draw a control, called by window server. 00062 * @param aRect The region of the control to be redrawn. Co-ordinates 00063 * are relative to the control's origin (top left corner). 00064 */ 00065 void Draw( const TRect& aRect ) const; 00066 00067 /** 00068 * From CCoeControl,OfferKeyEventL 00069 * Called by framework when the view layout is changed. 00070 * @param aType The type of resource change. 00071 */ 00072 virtual void HandleResourceChange(TInt aType); 00073 00074 private: //data 00075 00076 CDesCArrayFlat* iLinesToPrint; 00077 TBool iAllowedToPrint; 00078 CBase* iApplication; 00079 }; 00080 00081 #endif // DATAMOBILITYAPPOUTPUTCONTAINER_H 00082 00083 // End of File
|
© Nokia 2009 |