|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : aknexpopfieldcontainer.h 00004 * Part of : Popup-field example 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 __AKNEXPOPFIELDCONTAINER_H__ 00017 #define __AKNEXPOPFIELDCONTAINER_H__ 00018 00019 // INCLUDES 00020 #include <coecntrl.h> 00021 00022 00023 // CONSTANTS 00024 const TInt KAknExPopFieldCountComponent = 1; 00025 const TInt KAknExPopFieldMessageBufLength = 256; 00026 00027 // FORWARD DECLARATIONS 00028 class CAknExPopFieldView; 00029 class CEikLabel; 00030 00031 // CLASS DECLARATION 00032 00033 /** 00034 * CAknExPopFieldContainer container control class. 00035 */ 00036 class CAknExPopFieldContainer : public CCoeControl 00037 { 00038 00039 public: // Constructors and destructor 00040 00041 /** 00042 * CAknExPopFieldContainer 00043 * C++ default constructor. 00044 * @param aView Pointer to view class object. 00045 */ 00046 CAknExPopFieldContainer( CAknExPopFieldView* aView ); 00047 00048 /** 00049 * ConstructL 00050 * 2nd phase constructor. 00051 * @param aRect Frame rectangle for container. 00052 */ 00053 void ConstructL( const TRect& aRect ); 00054 00055 /** 00056 * CAknExPopFieldContainer 00057 * Virtual Destructor. 00058 */ 00059 virtual ~CAknExPopFieldContainer(); 00060 00061 public: // New functions 00062 00063 /** 00064 * SetTextToLabelL 00065 * Sets text to label 00066 * @param aResourceId Resource's Id 00067 */ 00068 void SetTextToLabelL( TInt aResourceId ); 00069 00070 /** 00071 * DisplayTextPopFieldL 00072 * Display Text with PopField 00073 * @param aResourceId 00074 */ 00075 void DisplayTextPopFieldL( TInt aResourceId ); 00076 00077 /** 00078 * DisplayOptionalTextPopFieldL 00079 * @param aResourceId 00080 */ 00081 void DisplayOptionalTextPopFieldL( TInt aResourceId ); 00082 00083 /** 00084 * DisplayManyLineTextPopFieldL 00085 * @param aResourceId 00086 */ 00087 void DisplayManyLineTextPopFieldL( TInt aResourceId ); 00088 00089 /** 00090 * DisplayMultiPagePopFieldL 00091 * @param aResourceId 00092 */ 00093 void DisplayMultiPagePopFieldL( TInt aResourceId ); 00094 00095 /** 00096 * DisplaySetAttribsPopFieldL 00097 * @param aResourceId 00098 */ 00099 void DisplaySetAttribsPopFieldL( TInt aResourceId ); 00100 00101 private: // New functions 00102 00103 /** 00104 * CreateLabelL 00105 * Creates the label object. 00106 */ 00107 void CreateLabelL(); 00108 00109 00110 private: // From CCoeControl 00111 00112 /** 00113 * From CCoeControl, OfferKeyEventL. 00114 * Handles the key events. 00115 * @param aKeyEvent Key event 00116 * @param aType Type of event(EEventKey, EEventKeyUp or EEventKeyDown) 00117 * @return if key-event consumed, EKeyWasConsumed Else EKeyWasNotConsumed 00118 */ 00119 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 00120 TEventCode aType ); 00121 00122 /** 00123 00124 * From CCoeControl, SizeChanged. 00125 * Object's Size Changed 00126 */ 00127 void SizeChanged(); 00128 00129 /** 00130 * From CCoeControl, CountComponentControls. 00131 * Returns number of component. 00132 * @return Number of controls 00133 */ 00134 TInt CountComponentControls() const; 00135 00136 /** 00137 * From CCoeControl, ComponentControl. 00138 * Returns pointer to particular component. 00139 * @return Pointer to Control's component control, identified by index 00140 * @param aIndex Index of the control 00141 */ 00142 CCoeControl* ComponentControl( TInt aIndex ) const; 00143 00144 /** 00145 * From CCoeControl, Draw. 00146 * @param aRect Region of the control to be (re)drawn. 00147 */ 00148 void Draw( const TRect& aRect ) const; 00149 00150 00151 private: // Enumerations 00152 00153 /** 00154 * TAknExPopFieldComponentControls 00155 * Enumeration 00156 */ 00157 00158 enum TAknExPopFieldComponentControls 00159 { 00160 EAknExPopFieldComponentLabel 00161 }; 00162 00163 00164 private: // Data 00165 00166 /** 00167 * iView 00168 * Not Owned by CAknExPopFieldContainer object. 00169 */ 00170 CAknExPopFieldView* iView; 00171 00172 /** 00173 * iLabel 00174 * Owned by CAknExPopFieldContainer object. 00175 */ 00176 CEikLabel* iLabel; 00177 00178 }; 00179 00180 #endif //__AKNEXPOPFIELDCONTAINER_H__
|
© Nokia 2009 |