2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Represents a text combo box type control, used to implement the
16 * Series 60 text pop-up field.
17 * This control can be constructed directly from resource.
23 #if !defined(__AKNPOPUPFIELDTEXT_H__)
24 #define __AKNPOPUPFIELDTEXT_H__
26 #include "AknPopupField.h"
27 #include "AknQueryValueText.h"
30 * Represents a text combo box type control which is used to implement
31 * the Series 60 text pop-up field. This control can be constructed directly
34 class CAknPopupFieldText : public CAknPopupField
39 * C++ default constructor.
41 IMPORT_C CAknPopupFieldText();
46 IMPORT_C ~CAknPopupFieldText();
49 * Gets the current value text stored in the @c CaknQueryValueText member.
51 * @return Pointer to the current value text.
53 IMPORT_C HBufC* CurrentValueTextLC();
56 * Gets the current value index from the @c CAknQueryValueText member.
58 * @return The current value index.
60 IMPORT_C TInt CurrentValueIndex() const;
63 * Sets the current value index to the @c CAknQueryValueText member.
65 * @param aIndex The current value index.
67 IMPORT_C void SetCurrentValueIndex(const TInt aIndex);
70 * Gets the @c MdcArray from the @c CAknQueryValueText member. This array
71 * contains the selection array of the popup field.
73 * @return Selection array of the popup field.
75 IMPORT_C const MDesCArray* MdcArray() const;
78 * Sets or clears @c EAutoAppendBitIndexCalls flag from @c CAknQueryValue.
80 * @param aAppend If @c ETrue, the flag is set.
82 IMPORT_C void SetAutoAppend(TBool aAppend);
84 public: // from CCoeControl
87 * From @c CCoeControl.
89 * Constructs the control from a resource file.
91 * @param aReader Resource reader.
93 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader);
96 * From @c CCoeControl.
98 * Handles pointer events.
100 * @param aPointerEvent The pointer event.
102 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
104 private: // Methods from CAknPopupField that were public
107 * 2nd phase constructor.
112 * This method should not be used.
113 * It is here to hide it from users, this will panic if you use it.
115 void SetQueryValueL(MAknQueryValue* aValue);
117 private: // from CCoeControl
118 IMPORT_C void Reserved_1();
119 IMPORT_C void Reserved_2();
125 IMPORT_C void* ExtensionInterface( TUid aInterface );
128 void CommonConstructL(TInt aTextArrayResourceId, TInt aInitialIndex);
131 // the following members are owned
132 CDesCArray* iArray; // the array of text items
133 CAknQueryValueTextArray* iTextArray;
134 CAknQueryValueText* iTextValue;
138 #endif // __AKNPOPUPFIELDTEXT_H__