aknqueryvaluetext.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknQueryValueText.h
00004 *  Part of  : Avkon
00005 *
00006 *  Description:
00007 *  Version:
00008 *
00009 *  Copyright © 2002 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation. All rights are reserved. Copying, 
00013 *  including reproducing, storing,  adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia Corporation. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia Corporation.
00018 * ============================================================================
00019 */
00020 // AknQueryValueText.h
00021 //
00022 // Copyright (c) 2001 Symbian Ltd.  All rights reserved.
00023 //
00024 
00025 #if !defined(__AKNQUERYVALUETEXT_H__)
00026 #define __AKNQUERYVALUETEXT_H__
00027 
00028 #include <bamdesca.h>
00029 #include <eikdialg.h>
00030 #include "AknQueryValue.h"
00031 
00032 class CAknQueryValueTextArray;
00033 
00040 NONSHARABLE_CLASS(CAknQueryValueText) : public CAknQueryValue
00041     {
00042 public:
00046         IMPORT_C static CAknQueryValueText* NewL();
00047         
00051         IMPORT_C static CAknQueryValueText* NewLC();
00052         
00053     IMPORT_C virtual ~CAknQueryValueText();
00054     
00060         IMPORT_C void SetArrayL(const CAknQueryValueTextArray* aArray);
00061         
00068         IMPORT_C void SetQueryCaption(TInt aResourceId);
00069         
00076         IMPORT_C HBufC* Value() const;
00077         
00078 public: // from MAknQueryValue
00079     IMPORT_C virtual const MDesCArray* MdcArray() const;
00080     IMPORT_C virtual HBufC* CurrentValueTextLC();
00081     IMPORT_C virtual TInt CurrentValueIndex() const;
00082     IMPORT_C virtual void SetCurrentValueIndex(const TInt aIndex);
00083     IMPORT_C virtual TBool CreateEditorL();
00084     
00085 protected:
00086         CAknQueryValueText();
00087         
00092         void ConstructL();
00093         
00099         void CalculateCurrentIndex();
00100         
00106         virtual void AppendValueIfNewL();
00107         
00108 private: // from MAknQueryValue
00109         IMPORT_C void Reserved_MAknQueryValue();
00110 
00111 private:
00112         // the following are member variables
00113         TInt iQueryCaptionId;
00114         HBufC* iText;
00115         TInt iCurrentIndex;
00116         // the following are not owned
00117         const CAknQueryValueTextArray* iArray;
00118     };
00119 
00120 
00125 NONSHARABLE_CLASS(CAknQueryValueTextArray) : public CBase, public MDesCArray
00126         {
00127 public:
00132         typedef CDesCArray TextArray;
00133         
00134         enum {KSafeSizeOfDescriptorForTextFormat = 32};
00135         
00136 public:
00141         IMPORT_C static CAknQueryValueTextArray* NewL();
00142         
00147         IMPORT_C static CAknQueryValueTextArray* NewLC();
00148         
00149         IMPORT_C ~CAknQueryValueTextArray();
00150         
00158         IMPORT_C void SetArray(TextArray& aArray);
00159         
00167         IMPORT_C TextArray* Array() const;
00168 
00176 #ifdef __WINS__
00177         IMPORT_C const TInt FormattedStringSize() const;
00178 #else
00179         IMPORT_C TInt FormattedStringSize() const;
00180 // __WINS__
00181 #endif
00182 
00183 public:
00184         // from MDesCArray
00189     IMPORT_C virtual TInt MdcaCount() const;
00190     
00197     IMPORT_C virtual TPtrC MdcaPoint(TInt aIndex) const;
00198     
00199 protected:
00200         CAknQueryValueTextArray();
00201         
00206         void ConstructL();
00207         
00208 private:
00209         // the following members are not owned
00210         TextArray* iArray;
00211         TInt iFormattedStringSize;
00212         };
00213 
00214 // __AKNQUERYVALUETEXT_H__
00215 #endif
00216 

Copyright © Nokia Corporation 2001-2008
Back to top