|
1 /* |
|
2 * Copyright (c) 2002-2004 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: |
|
15 * Classes used for holding inline text for the Form MTmInlineTextSource interface. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef AKNRICHTEXTPHONENUMBERINLINETEXTSOURCE_H |
|
22 #define AKNRICHTEXTPHONENUMBERINLINETEXTSOURCE_H |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include "AknInlineText.h" |
|
27 #include "AknPhoneNumberInlineTextSource.h" |
|
28 #include "txtrich.h" |
|
29 |
|
30 class CPNGNumberGrouping; |
|
31 class CEikEdwin; |
|
32 class CTextLayout; |
|
33 class CFindItemEngine; |
|
34 |
|
35 // CONSTANTS |
|
36 |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 /** |
|
41 * Specialized inline text source for the formatting of phone numbers recognized in general text. |
|
42 * |
|
43 * Such an implementation is restricted to CEikRichTextEditors because only there is there an |
|
44 * edit observer mechanism that allows the re-formatting of the text into phone numbers to be |
|
45 * performed only when necessary. |
|
46 * |
|
47 * @lib EikCoCtl |
|
48 * @since 2.6 |
|
49 */ |
|
50 NONSHARABLE_CLASS(CAknRichTextPhoneNumberInlineTextSource) : public CAknPhoneNumberInlineTextSource |
|
51 { |
|
52 public: |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. |
|
56 */ |
|
57 static CAknRichTextPhoneNumberInlineTextSource* NewL( const CRichText& aText ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CAknRichTextPhoneNumberInlineTextSource(); |
|
63 |
|
64 public: // Functions from MEditObserver |
|
65 |
|
66 /** |
|
67 * See medobsrv.h |
|
68 */ |
|
69 virtual void EditObserver( TInt aStart, TInt aExtent ); |
|
70 |
|
71 private: |
|
72 |
|
73 /** |
|
74 * C++ constructor. |
|
75 */ |
|
76 CAknRichTextPhoneNumberInlineTextSource( const CRichText& aText); |
|
77 |
|
78 /** |
|
79 * 2nd phase constructor |
|
80 */ |
|
81 void ConstructL(); |
|
82 |
|
83 /** |
|
84 * Method for determining if the next character after a phone number is valid. |
|
85 * |
|
86 * @param aNextPos a position in the RichText buffer immediately after the candidate phone number |
|
87 * @returns ETrue if the next character does not exist or is valid |
|
88 */ |
|
89 TBool FollowingCharIsValid( TInt aNextPos ) const; |
|
90 |
|
91 |
|
92 private: // Data |
|
93 |
|
94 // owned pointer to an engine to find the phone numbers |
|
95 CFindItemEngine* iFindItemEngine; |
|
96 }; |
|
97 |
|
98 #endif |
|
99 |
|
100 // End of File |