williamr@2: /* williamr@2: * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * Represents a text combo box type control, used to implement the williamr@2: * Series 60 text pop-up field. williamr@2: * This control can be constructed directly from resource. williamr@2: * williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #if !defined(__AKNPOPUPFIELDTEXT_H__) williamr@2: #define __AKNPOPUPFIELDTEXT_H__ williamr@2: williamr@2: #include "AknPopupField.h" williamr@2: #include "AknQueryValueText.h" williamr@2: williamr@2: /** williamr@2: * Represents a text combo box type control which is used to implement williamr@2: * the Series 60 text pop-up field. This control can be constructed directly williamr@2: * from a resource. williamr@2: */ williamr@2: class CAknPopupFieldText : public CAknPopupField williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * C++ default constructor. williamr@2: */ williamr@2: IMPORT_C CAknPopupFieldText(); williamr@2: williamr@2: /** williamr@2: * Destructor. williamr@2: */ williamr@2: IMPORT_C ~CAknPopupFieldText(); williamr@2: williamr@2: /** williamr@2: * Gets the current value text stored in the @c CaknQueryValueText member. williamr@2: * williamr@2: * @return Pointer to the current value text. williamr@2: */ williamr@2: IMPORT_C HBufC* CurrentValueTextLC(); williamr@2: williamr@2: /** williamr@2: * Gets the current value index from the @c CAknQueryValueText member. williamr@2: * williamr@2: * @return The current value index. williamr@2: */ williamr@2: IMPORT_C TInt CurrentValueIndex() const; williamr@2: williamr@2: /** williamr@2: * Sets the current value index to the @c CAknQueryValueText member. williamr@2: * williamr@2: * @param aIndex The current value index. williamr@2: */ williamr@2: IMPORT_C void SetCurrentValueIndex(const TInt aIndex); williamr@2: williamr@2: /** williamr@2: * Gets the @c MdcArray from the @c CAknQueryValueText member. This array williamr@2: * contains the selection array of the popup field. williamr@2: * williamr@2: * @return Selection array of the popup field. williamr@2: */ williamr@2: IMPORT_C const MDesCArray* MdcArray() const; williamr@2: williamr@2: /** williamr@2: * Sets or clears @c EAutoAppendBitIndexCalls flag from @c CAknQueryValue. williamr@2: * williamr@2: * @param aAppend If @c ETrue, the flag is set. williamr@2: */ williamr@2: IMPORT_C void SetAutoAppend(TBool aAppend); williamr@2: williamr@2: public: // from CCoeControl williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Constructs the control from a resource file. williamr@2: * williamr@2: * @param aReader Resource reader. williamr@2: */ williamr@2: IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Handles pointer events. williamr@2: * williamr@2: * @param aPointerEvent The pointer event. williamr@2: */ williamr@2: IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); williamr@2: williamr@2: private: // Methods from CAknPopupField that were public williamr@2: williamr@2: /** williamr@2: * 2nd phase constructor. williamr@2: */ williamr@2: void ConstructL(); williamr@2: williamr@2: /** williamr@2: * This method should not be used. williamr@2: * It is here to hide it from users, this will panic if you use it. williamr@2: */ williamr@2: void SetQueryValueL(MAknQueryValue* aValue); williamr@2: williamr@2: private: // from CCoeControl williamr@2: IMPORT_C void Reserved_1(); williamr@2: IMPORT_C void Reserved_2(); williamr@2: williamr@2: private: williamr@2: /** williamr@2: * From CAknControl williamr@2: */ williamr@2: IMPORT_C void* ExtensionInterface( TUid aInterface ); williamr@2: williamr@2: private: // personal williamr@2: void CommonConstructL(TInt aTextArrayResourceId, TInt aInitialIndex); williamr@2: williamr@2: private: williamr@2: // the following members are owned williamr@2: CDesCArray* iArray; // the array of text items williamr@2: CAknQueryValueTextArray* iTextArray; williamr@2: CAknQueryValueText* iTextValue; williamr@2: TInt iSpare[2]; williamr@2: }; williamr@2: williamr@2: #endif // __AKNPOPUPFIELDTEXT_H__