author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
parent 1 | 666f914201fb |
child 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@2 | 1 |
/* |
williamr@2 | 2 |
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 3 |
* All rights reserved. |
williamr@2 | 4 |
* This component and the accompanying materials are made available |
williamr@2 | 5 |
* 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 | 6 |
* which accompanies this distribution, and is available |
williamr@2 | 7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
williamr@2 | 8 |
* |
williamr@2 | 9 |
* Initial Contributors: |
williamr@2 | 10 |
* Nokia Corporation - initial contribution. |
williamr@2 | 11 |
* |
williamr@2 | 12 |
* Contributors: |
williamr@2 | 13 |
* |
williamr@2 | 14 |
* Description: |
williamr@2 | 15 |
* Represents a text combo box type control, used to implement the |
williamr@2 | 16 |
* Series 60 text pop-up field. |
williamr@2 | 17 |
* This control can be constructed directly from resource. |
williamr@2 | 18 |
* |
williamr@2 | 19 |
* |
williamr@2 | 20 |
*/ |
williamr@2 | 21 |
|
williamr@2 | 22 |
|
williamr@2 | 23 |
#if !defined(__AKNPOPUPFIELDTEXT_H__) |
williamr@2 | 24 |
#define __AKNPOPUPFIELDTEXT_H__ |
williamr@2 | 25 |
|
williamr@2 | 26 |
#include "AknPopupField.h" |
williamr@2 | 27 |
#include "AknQueryValueText.h" |
williamr@2 | 28 |
|
williamr@2 | 29 |
/** |
williamr@2 | 30 |
* Represents a text combo box type control which is used to implement |
williamr@2 | 31 |
* the Series 60 text pop-up field. This control can be constructed directly |
williamr@2 | 32 |
* from a resource. |
williamr@2 | 33 |
*/ |
williamr@2 | 34 |
class CAknPopupFieldText : public CAknPopupField |
williamr@2 | 35 |
{ |
williamr@2 | 36 |
public: |
williamr@2 | 37 |
|
williamr@2 | 38 |
/** |
williamr@2 | 39 |
* C++ default constructor. |
williamr@2 | 40 |
*/ |
williamr@2 | 41 |
IMPORT_C CAknPopupFieldText(); |
williamr@2 | 42 |
|
williamr@2 | 43 |
/** |
williamr@2 | 44 |
* Destructor. |
williamr@2 | 45 |
*/ |
williamr@2 | 46 |
IMPORT_C ~CAknPopupFieldText(); |
williamr@2 | 47 |
|
williamr@2 | 48 |
/** |
williamr@2 | 49 |
* Gets the current value text stored in the @c CaknQueryValueText member. |
williamr@2 | 50 |
* |
williamr@2 | 51 |
* @return Pointer to the current value text. |
williamr@2 | 52 |
*/ |
williamr@2 | 53 |
IMPORT_C HBufC* CurrentValueTextLC(); |
williamr@2 | 54 |
|
williamr@2 | 55 |
/** |
williamr@2 | 56 |
* Gets the current value index from the @c CAknQueryValueText member. |
williamr@2 | 57 |
* |
williamr@2 | 58 |
* @return The current value index. |
williamr@2 | 59 |
*/ |
williamr@2 | 60 |
IMPORT_C TInt CurrentValueIndex() const; |
williamr@2 | 61 |
|
williamr@2 | 62 |
/** |
williamr@2 | 63 |
* Sets the current value index to the @c CAknQueryValueText member. |
williamr@2 | 64 |
* |
williamr@2 | 65 |
* @param aIndex The current value index. |
williamr@2 | 66 |
*/ |
williamr@2 | 67 |
IMPORT_C void SetCurrentValueIndex(const TInt aIndex); |
williamr@2 | 68 |
|
williamr@2 | 69 |
/** |
williamr@2 | 70 |
* Gets the @c MdcArray from the @c CAknQueryValueText member. This array |
williamr@2 | 71 |
* contains the selection array of the popup field. |
williamr@2 | 72 |
* |
williamr@2 | 73 |
* @return Selection array of the popup field. |
williamr@2 | 74 |
*/ |
williamr@2 | 75 |
IMPORT_C const MDesCArray* MdcArray() const; |
williamr@2 | 76 |
|
williamr@2 | 77 |
/** |
williamr@2 | 78 |
* Sets or clears @c EAutoAppendBitIndexCalls flag from @c CAknQueryValue. |
williamr@2 | 79 |
* |
williamr@2 | 80 |
* @param aAppend If @c ETrue, the flag is set. |
williamr@2 | 81 |
*/ |
williamr@2 | 82 |
IMPORT_C void SetAutoAppend(TBool aAppend); |
williamr@2 | 83 |
|
williamr@2 | 84 |
public: // from CCoeControl |
williamr@2 | 85 |
|
williamr@2 | 86 |
/** |
williamr@2 | 87 |
* From @c CCoeControl. |
williamr@2 | 88 |
* |
williamr@2 | 89 |
* Constructs the control from a resource file. |
williamr@2 | 90 |
* |
williamr@2 | 91 |
* @param aReader Resource reader. |
williamr@2 | 92 |
*/ |
williamr@2 | 93 |
IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); |
williamr@2 | 94 |
|
williamr@2 | 95 |
/** |
williamr@2 | 96 |
* From @c CCoeControl. |
williamr@2 | 97 |
* |
williamr@2 | 98 |
* Handles pointer events. |
williamr@2 | 99 |
* |
williamr@2 | 100 |
* @param aPointerEvent The pointer event. |
williamr@2 | 101 |
*/ |
williamr@2 | 102 |
IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
williamr@2 | 103 |
|
williamr@2 | 104 |
private: // Methods from CAknPopupField that were public |
williamr@2 | 105 |
|
williamr@2 | 106 |
/** |
williamr@2 | 107 |
* 2nd phase constructor. |
williamr@2 | 108 |
*/ |
williamr@2 | 109 |
void ConstructL(); |
williamr@2 | 110 |
|
williamr@2 | 111 |
/** |
williamr@2 | 112 |
* This method should not be used. |
williamr@2 | 113 |
* It is here to hide it from users, this will panic if you use it. |
williamr@2 | 114 |
*/ |
williamr@2 | 115 |
void SetQueryValueL(MAknQueryValue* aValue); |
williamr@2 | 116 |
|
williamr@2 | 117 |
private: // from CCoeControl |
williamr@2 | 118 |
IMPORT_C void Reserved_1(); |
williamr@2 | 119 |
IMPORT_C void Reserved_2(); |
williamr@2 | 120 |
|
williamr@2 | 121 |
private: |
williamr@2 | 122 |
/** |
williamr@2 | 123 |
* From CAknControl |
williamr@2 | 124 |
*/ |
williamr@2 | 125 |
IMPORT_C void* ExtensionInterface( TUid aInterface ); |
williamr@2 | 126 |
|
williamr@2 | 127 |
private: // personal |
williamr@2 | 128 |
void CommonConstructL(TInt aTextArrayResourceId, TInt aInitialIndex); |
williamr@2 | 129 |
|
williamr@2 | 130 |
private: |
williamr@2 | 131 |
// the following members are owned |
williamr@2 | 132 |
CDesCArray* iArray; // the array of text items |
williamr@2 | 133 |
CAknQueryValueTextArray* iTextArray; |
williamr@2 | 134 |
CAknQueryValueText* iTextValue; |
williamr@2 | 135 |
TInt iSpare[2]; |
williamr@2 | 136 |
}; |
williamr@2 | 137 |
|
williamr@2 | 138 |
#endif // __AKNPOPUPFIELDTEXT_H__ |