|
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 dialog UI field. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPBK2CONTACTEDITORUIFIELDBASE_H_ |
|
19 #define CPBK2CONTACTEDITORUIFIELDBASE_H_ |
|
20 |
|
21 // INCLUDES |
|
22 #include "MPbk2ContactEditorUIField.h" |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * Phonebook 2 contact editor UI base field. |
|
30 */ |
|
31 class CPbk2ContactEditorUIFieldBase : public CBase, |
|
32 public MPbk2ContactEditorUIField |
|
33 { |
|
34 protected: |
|
35 |
|
36 /** |
|
37 * C++ constructor. |
|
38 * |
|
39 * @param aUiBuilder UI builder for adding |
|
40 * the field into dialog. |
|
41 * @param aIconInfoContainer An icon container for setting |
|
42 * field icon. |
|
43 */ |
|
44 IMPORT_C CPbk2ContactEditorUIFieldBase( |
|
45 MPbk2UIField* aField, |
|
46 MPbk2ContactEditorUiBuilder& aUiBuilder, |
|
47 CPbk2IconInfoContainer& aIconInfoContainer, |
|
48 TInt aCustomPosition ); |
|
49 |
|
50 public: |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 IMPORT_C virtual ~CPbk2ContactEditorUIFieldBase(); |
|
55 |
|
56 |
|
57 IMPORT_C virtual TInt ControlId(); |
|
58 IMPORT_C virtual CEikEdwin* Control() = 0; |
|
59 IMPORT_C virtual MPbk2UIField* UIField() const; |
|
60 IMPORT_C virtual TBool HandleCustomFieldCommandL(TInt aCommand); |
|
61 IMPORT_C virtual const TDesC& FieldLabel() const; |
|
62 IMPORT_C virtual void SetFieldLabelL( |
|
63 const TDesC& aLabel ); |
|
64 IMPORT_C virtual const TDesC& ControlText() const; |
|
65 IMPORT_C virtual void SetControlTextL( |
|
66 const TDesC& aText ) = 0; |
|
67 IMPORT_C virtual void SetFocus(); |
|
68 IMPORT_C virtual void ActivateL() = 0; |
|
69 IMPORT_C virtual TBool ConsumesKeyEvent( |
|
70 const TKeyEvent& aKeyEvent, |
|
71 TEventCode aType ); |
|
72 IMPORT_C virtual void LoadBitmapToFieldL( const TPbk2IconId& aIconId ); |
|
73 |
|
74 protected: |
|
75 /// Take ownership of this object |
|
76 MPbk2UIField* iField; |
|
77 /// Ref: UI builder for adding the field into dialog |
|
78 MPbk2ContactEditorUiBuilder& iUiBuilder; |
|
79 /// Ref: Icon container for setting field icon |
|
80 CPbk2IconInfoContainer& iIconInfoContainer; |
|
81 /// Lebel |
|
82 RBuf iLebel; |
|
83 RBuf iText; |
|
84 TInt iCustomPosition; |
|
85 TBool iStdKeyDevice3Down; |
|
86 }; |
|
87 |
|
88 |
|
89 #endif /*CPBK2CONTACTEDITORUIFIELDBASE_H_*/ |
|
90 |
|
91 // End of File |