1.1 --- a/epoc32/include/app/cpbkselectfielddlg.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/app/cpbkselectfielddlg.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,113 @@
1.4 -cpbkselectfielddlg.h
1.5 +/*
1.6 +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +* Phonebook field selection dialog.
1.20 +*
1.21 +*/
1.22 +
1.23 +
1.24 +#ifndef __CPbkSelectFieldDlg_H__
1.25 +#define __CPbkSelectFieldDlg_H__
1.26 +
1.27 +// INCLUDES
1.28 +#include <e32base.h> // CBase
1.29 +
1.30 +// FORWARD DECLARATIONS
1.31 +class TPbkContactItemField;
1.32 +class CPbkFieldArray;
1.33 +class MPbkControlKeyObserver;
1.34 +
1.35 +
1.36 +// CLASS DECLARATION
1.37 +
1.38 +/**
1.39 + * Phonebook field selection dialog. This class is used to show a Phonebook
1.40 + * contact item field selection dialog to the user. The user is able to
1.41 + * select a particular field from the dialog and this selection is returned
1.42 + * to the client.
1.43 + */
1.44 +class CPbkSelectFieldDlg : public CBase
1.45 + {
1.46 + public: // Interface
1.47 + /**
1.48 + * Constructor.
1.49 + */
1.50 + IMPORT_C CPbkSelectFieldDlg();
1.51 +
1.52 + /**
1.53 + * Runs the dialog and returns selected field.
1.54 + * NOTE: this object is deleted when this function
1.55 + * returns or leaves.
1.56 + *
1.57 + * @param aArray Array of TPbkContactItemFields
1.58 + * @param aCbaResourceId Softkey buttons for the control.
1.59 + * @param aHeading Possible heading for the control.
1.60 + * @param aFocusIndex Field index to focus initially.
1.61 + *
1.62 + * @return The selected contact item field or NULL.
1.63 + */
1.64 + IMPORT_C TPbkContactItemField* ExecuteLD
1.65 + (CPbkFieldArray& aArray,
1.66 + TInt aCbaResourceId,
1.67 + const TDesC& aHeading = KNullDesC,
1.68 + TInt aFocusIndex=-1);
1.69 +
1.70 + /**
1.71 + * Destructor.
1.72 + */
1.73 + IMPORT_C ~CPbkSelectFieldDlg();
1.74 +
1.75 + /**
1.76 + * Registers aKeyObserver as a key event observer of this control.
1.77 + * Only one observer is supported and setting a new one removes the
1.78 + * previous setting.
1.79 + *
1.80 + * @param aKeyObserver A Phonebook control key observer.
1.81 + */
1.82 + IMPORT_C void SetObserver(MPbkControlKeyObserver* aKeyObserver);
1.83 +
1.84 + /**
1.85 + * Attempts to exit this dialog as if a soft button was pressed.
1.86 + * @see CAknPopupList::AttemptExitL(TBool).
1.87 + */
1.88 + IMPORT_C void AttemptExitL(TBool aAccept);
1.89 +
1.90 + /**
1.91 + * Sets aSelfPtr to NULL when this dialog is destroyed.
1.92 + * @precond !aSelfPtr || *aSelfPtr==this
1.93 + */
1.94 + IMPORT_C void ResetWhenDestroyed(CPbkSelectFieldDlg** aSelfPtr);
1.95 +
1.96 + private: // Data
1.97 + /// Specialized listbox class
1.98 + class CListBox;
1.99 + /// Own: ListBox inside the popuplist
1.100 + CListBox* iListBox;
1.101 + /// Specialized popup list class
1.102 + class CPopupList;
1.103 + /// Own: popup list query
1.104 + CPopupList* iPopupList;
1.105 + /// Ref: key event observer
1.106 + MPbkControlKeyObserver* iKeyObserver;
1.107 + /// Ref: Set to ETrue in destructor
1.108 + TBool* iDestroyedPtr;
1.109 + /// Ref: Set to NULL when this dialog is destroyed.
1.110 + CPbkSelectFieldDlg** iSelfPtr;
1.111 + /// Own: Spare data
1.112 + TInt32 iSpare1;
1.113 + };
1.114 +
1.115 +#endif // __CPbkSelectFieldDlg_H__
1.116 +
1.117 +// End of File