epoc32/include/app/cpbkselectfielddlg.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 
    31 
    32 // CLASS DECLARATION
    33 
    34 /**
    35  * Phonebook field selection dialog. This class is used to show a Phonebook 
    36  * contact item field selection dialog to the user. The user is able to 
    37  * select a particular field from the dialog and this selection is returned
    38  * to the client.
    39  */
    40 class CPbkSelectFieldDlg : public CBase
    41     {
    42     public:  // Interface
    43         /**
    44          * Constructor.
    45          */
    46         IMPORT_C CPbkSelectFieldDlg();
    47 
    48         /**
    49          * Runs the dialog and returns selected field.
    50          * NOTE: this object is deleted when this function 
    51          * returns or leaves.
    52          *
    53          * @param aArray  Array of TPbkContactItemFields
    54          * @param aCbaResourceId Softkey buttons for the control.
    55          * @param aHeading Possible heading for the control.
    56          * @param aFocusIndex Field index to focus initially.
    57          *
    58          * @return The selected contact item field or NULL.
    59          */
    60         IMPORT_C TPbkContactItemField* ExecuteLD
    61             (CPbkFieldArray& aArray, 
    62             TInt aCbaResourceId, 
    63             const TDesC& aHeading = KNullDesC, 
    64             TInt aFocusIndex=-1);
    65 
    66         /**
    67          * Destructor.
    68          */
    69         IMPORT_C ~CPbkSelectFieldDlg();
    70 
    71         /**
    72          * Registers aKeyObserver as a key event observer of this control.
    73          * Only one observer is supported and setting a new one removes the
    74          * previous setting. 
    75          *
    76          * @param aKeyObserver  A Phonebook control key observer.
    77          */
    78         IMPORT_C void SetObserver(MPbkControlKeyObserver* aKeyObserver);
    79 
    80         /**
    81          * Attempts to exit this dialog as if a soft button was pressed.
    82          * @see CAknPopupList::AttemptExitL(TBool).
    83          */
    84         IMPORT_C void AttemptExitL(TBool aAccept);
    85 
    86         /**
    87          * Sets aSelfPtr to NULL when this dialog is destroyed.
    88          * @precond !aSelfPtr || *aSelfPtr==this
    89          */
    90         IMPORT_C void ResetWhenDestroyed(CPbkSelectFieldDlg** aSelfPtr);
    91 
    92     private: // Data
    93         /// Specialized listbox class
    94         class CListBox;
    95         /// Own: ListBox inside the popuplist
    96         CListBox* iListBox;
    97         /// Specialized popup list class
    98         class CPopupList;
    99         /// Own: popup list query
   100         CPopupList* iPopupList;
   101         /// Ref: key event observer
   102         MPbkControlKeyObserver* iKeyObserver;
   103         /// Ref: Set to ETrue in destructor
   104         TBool* iDestroyedPtr;
   105         /// Ref: Set to NULL when this dialog is destroyed.
   106         CPbkSelectFieldDlg** iSelfPtr;
   107         /// Own: Spare data
   108         TInt32 iSpare1;
   109     }; 
   110 
   111 #endif // __CPbkSelectFieldDlg_H__
   112             
   113 // End of File