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