epoc32/include/app/cpbkselectfielddlg.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 *     Phonebook field selection dialog.
    16 *
    17 */
    18 
    19 
    20 #ifndef __CPbkSelectFieldDlg_H__
    21 #define __CPbkSelectFieldDlg_H__
    22 
    23 //  INCLUDES
    24 #include <e32base.h>    // CBase
    25 
    26 // FORWARD DECLARATIONS
    27 class TPbkContactItemField;
    28 class CPbkFieldArray;
    29 class MPbkControlKeyObserver;
    30 class CPbkContactItem;
    31 class CPbkFieldAnalyzer;
    32 class CPbkContactEngine;
    33 
    34 
    35 // CLASS DECLARATION
    36 
    37 /**
    38  * Phonebook field selection dialog. This class is used to show a Phonebook 
    39  * contact item field selection dialog to the user. The user is able to 
    40  * select a particular field from the dialog and this selection is returned
    41  * to the client.
    42  */
    43 class CPbkSelectFieldDlg : public CBase
    44     {
    45     public:  // Interface
    46         /**
    47          * Constructor.
    48          */
    49         IMPORT_C CPbkSelectFieldDlg();
    50 
    51         /**
    52          * Runs the dialog and returns selected field.
    53          * NOTE: this object is deleted when this function 
    54          * returns or leaves.
    55          *
    56          * @param aArray  Array of TPbkContactItemFields
    57          * @param aCbaResourceId Softkey buttons for the control.
    58          * @param aHeading Possible heading for the control.
    59          * @param aFocusIndex Field index to focus initially.
    60          *
    61          * @return The selected contact item field or NULL.
    62          */
    63         IMPORT_C TPbkContactItemField* ExecuteLD
    64             (CPbkFieldArray& aArray, 
    65             TInt aCbaResourceId, 
    66             const TDesC& aHeading = KNullDesC, 
    67             TInt aFocusIndex=-1);
    68 
    69         /**
    70          * Destructor.
    71          */
    72         IMPORT_C ~CPbkSelectFieldDlg();
    73 
    74         /**
    75          * Registers aKeyObserver as a key event observer of this control.
    76          * Only one observer is supported and setting a new one removes the
    77          * previous setting. 
    78          *
    79          * @param aKeyObserver  A Phonebook control key observer.
    80          */
    81         IMPORT_C void SetObserver(MPbkControlKeyObserver* aKeyObserver);
    82 
    83         /**
    84          * Attempts to exit this dialog as if a soft button was pressed.
    85          * @see CAknPopupList::AttemptExitL(TBool).
    86          */
    87         IMPORT_C void AttemptExitL(TBool aAccept);
    88 
    89         /**
    90          * Sets aSelfPtr to NULL when this dialog is destroyed.
    91          * @precond !aSelfPtr || *aSelfPtr==this
    92          */
    93         IMPORT_C void ResetWhenDestroyed(CPbkSelectFieldDlg** aSelfPtr);
    94 
    95     private: // Data
    96         /// Specialized listbox class
    97         class CListBox;
    98         /// Own: ListBox inside the popuplist
    99         CListBox* iListBox;
   100         /// Specialized popup list class
   101         class CPopupList;
   102         /// Own: popup list query
   103         CPopupList* iPopupList;
   104         /// Ref: key event observer
   105         MPbkControlKeyObserver* iKeyObserver;
   106         /// Ref: Set to ETrue in destructor
   107         TBool* iDestroyedPtr;
   108         /// Ref: Set to NULL when this dialog is destroyed.
   109         CPbkSelectFieldDlg** iSelfPtr;
   110         /// Own: Spare data
   111         TInt32 iSpare1;
   112     }; 
   113 
   114 #endif // __CPbkSelectFieldDlg_H__
   115             
   116 // End of File