|
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 "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: LandmarksUi Content File - Landmark editor text field. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 #ifndef __CLMKEDITORTEXTFIELD_H__ |
|
25 #define __CLMKEDITORTEXTFIELD_H__ |
|
26 |
|
27 // INCLUDES |
|
28 #include "CLmkEditorFieldBase.h" |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CEikEdwin; |
|
32 class MLmkEditorUiBuilder; |
|
33 class CEikCaptionedControl; |
|
34 |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * Landmark editor text field. |
|
40 */ |
|
41 class CLmkEditorTextField : public CLmkEditorFieldBase |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 /** |
|
45 * Creates a new instance of this class - text editor to a field. |
|
46 * @param aField the to be edited field |
|
47 * @param aUiBuilder reference to UI builder |
|
48 * //@param aIconInfoContainer reference to icon info container |
|
49 */ |
|
50 static CLmkEditorTextField* NewL( |
|
51 MLmkFieldData& aField, |
|
52 MLmkEditorUiBuilder& aUiBuilder ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CLmkEditorTextField(); |
|
58 |
|
59 public: // from MLmkEditorField |
|
60 TBool SaveFieldL(); |
|
61 void ActivateL(); |
|
62 /** |
|
63 * Returns the iControl member |
|
64 */ |
|
65 CEikEdwin* Control(); |
|
66 |
|
67 /** |
|
68 * Returns the iCaptionedCtrl member |
|
69 */ |
|
70 CEikCaptionedControl* CaptionedControl(); |
|
71 /** |
|
72 * Resets the field |
|
73 */ |
|
74 void ResetL(){} |
|
75 /** |
|
76 * Checks, if any prefix-present before the url protocol. |
|
77 */ |
|
78 TInt IsWebUrlProtocolPreFixedL( TPtr& aWebUrl ); |
|
79 /** |
|
80 * Removes the prefixes from the display text |
|
81 */ |
|
82 void TrimPrefixesFromWebUrlL( TPtr& aWebUrl,TInt aTrimPos ); |
|
83 /** |
|
84 * Sets the display text to the control |
|
85 */ |
|
86 void SetControlTextL( TPtrC& aText); |
|
87 /* |
|
88 * Sets the edit state of the control |
|
89 */ |
|
90 void SetEditableL( TBool aEditable ); |
|
91 |
|
92 protected: // Implementation |
|
93 CLmkEditorTextField( |
|
94 MLmkFieldData& aField, |
|
95 MLmkEditorUiBuilder& aUiBuilder ); |
|
96 |
|
97 private: // implementation |
|
98 void ConstructL(); |
|
99 protected: // Data |
|
100 /// Ref: Fields editor |
|
101 CEikEdwin* iControl; |
|
102 /// Ref: fields captioned control |
|
103 CEikCaptionedControl* iCaptionedCtrl; |
|
104 |
|
105 // e.g image/jpeg/http://www.google.com |
|
106 TBool isUrlPrefixed; |
|
107 //own |
|
108 HBufC* iUrlPrefix; |
|
109 //own |
|
110 HBufC* iText; |
|
111 }; |
|
112 |
|
113 #endif // __CLMKEDITORTEXTFIELD_H__ |
|
114 |
|
115 // End of File |