63
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-2007 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: Phonebook 2 contact editor control interface.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef MPBK2CONTACTEDITORCONTROL_H
|
|
20 |
#define MPBK2CONTACTEDITORCONTROL_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <Pbk2FieldProperty.hrh> // TPbk2FieldCtrlType
|
|
24 |
|
|
25 |
// FORWARD DECLATIONS
|
|
26 |
class MPbk2ContactEditorField;
|
|
27 |
|
|
28 |
// CLASS DECLARATION
|
|
29 |
|
|
30 |
/**
|
|
31 |
* Phonebook 2 contact editor control interface.
|
|
32 |
*/
|
|
33 |
class MPbk2ContactEditorControl
|
|
34 |
{
|
|
35 |
public: // Interface
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Sets the focus to the control in given index.
|
|
39 |
*
|
|
40 |
* @param aIndex The index of the control to set focused.
|
|
41 |
*/
|
|
42 |
virtual void SetFocus(
|
|
43 |
TInt aIndex ) = 0;
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Returns the number of controls.
|
|
47 |
*
|
|
48 |
* @return The number of controls in the editor.
|
|
49 |
*/
|
|
50 |
virtual TInt NumberOfControls() const = 0;
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Returns index of given control type in contact editor.
|
|
54 |
*
|
|
55 |
* @param aType The control type to search for.
|
|
56 |
* @param aIndex Indicates from what index to
|
|
57 |
* start matching controls.
|
|
58 |
* @return The index of the control, KErrNotFound if not found.
|
|
59 |
*/
|
|
60 |
virtual TInt IndexOfCtrlType(
|
|
61 |
TPbk2FieldCtrlType aType,
|
|
62 |
TInt& aIndex ) const = 0;
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Returns ETrue if all UI controls are empty.
|
|
66 |
*
|
|
67 |
* @return ETrue if all controls are empty.
|
|
68 |
*/
|
|
69 |
virtual TBool AreAllControlsEmpty() const = 0;
|
|
70 |
|
|
71 |
/**
|
|
72 |
* Returns ETrue if the control at given index is empty.
|
|
73 |
*
|
|
74 |
* @param aIndex Index of control to query.
|
|
75 |
* @return ETrue if the control is empty.
|
|
76 |
*/
|
|
77 |
virtual TBool IsControlEmptyL(
|
|
78 |
TInt aIndex ) const = 0;
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Returns editor field at given index.
|
|
82 |
*
|
|
83 |
* @param aIndex Index of editor field to query.
|
|
84 |
* @return ETrue if the control is empty.
|
|
85 |
*/
|
|
86 |
virtual MPbk2ContactEditorField& EditorField(
|
|
87 |
TInt aIndex ) const = 0;
|
|
88 |
|
|
89 |
/**
|
|
90 |
* Returns an extension point for this interface or NULL.
|
|
91 |
*
|
|
92 |
* @param aExtensionUid Extension UID.
|
|
93 |
* @return Extension point.
|
|
94 |
*/
|
|
95 |
virtual TAny* ContactEditorControlExtension(
|
|
96 |
TUid /*aExtensionUid*/ )
|
|
97 |
{
|
|
98 |
return NULL;
|
|
99 |
}
|
|
100 |
|
|
101 |
protected: // Disabled functions
|
|
102 |
virtual ~MPbk2ContactEditorControl()
|
|
103 |
{}
|
|
104 |
};
|
|
105 |
|
|
106 |
#endif // MPBK2CONTACTEDITORCONTROL_H
|
|
107 |
|
|
108 |
// End of File
|