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