|
1 /* |
|
2 * Copyright (c) 2003 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
22 #include <inlinetext_internal.h> |
|
23 #endif |
|
24 #include <AknEdwinFormExtendedInterfaceProvider.h> |
|
25 |
|
26 class CAknCompositeInlineTextSource; |
|
27 #include "AknCompositeInlineTextSource.h" |
|
28 |
|
29 // MODULE TEMPLATES |
|
30 |
|
31 |
|
32 // MODULE DATA STRUCTURES |
|
33 |
|
34 |
|
35 // ============================ MEMBER FUNCTIONS =============================== |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // C++ constructor |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 CAknEdwinFormExtendedInterfaceProvider::CAknEdwinFormExtendedInterfaceProvider() |
|
42 { |
|
43 } |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // Two-phase constructor. |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 EXPORT_C CAknEdwinFormExtendedInterfaceProvider* CAknEdwinFormExtendedInterfaceProvider::NewL() |
|
50 { |
|
51 CAknEdwinFormExtendedInterfaceProvider* self= new(ELeave) CAknEdwinFormExtendedInterfaceProvider(); |
|
52 CleanupStack::PushL(self); |
|
53 self->ConstructL(); |
|
54 CleanupStack::Pop(); // self |
|
55 return self; |
|
56 } |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // Destructor |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 CAknEdwinFormExtendedInterfaceProvider::~CAknEdwinFormExtendedInterfaceProvider() |
|
63 { |
|
64 delete iCompositeInlineTextSource; |
|
65 } |
|
66 |
|
67 // ------------------------------------------------------------------------------ |
|
68 // 2nd stage constructor |
|
69 // ------------------------------------------------------------------------------ |
|
70 void CAknEdwinFormExtendedInterfaceProvider::ConstructL() |
|
71 { |
|
72 iCompositeInlineTextSource = CAknCompositeInlineTextSource::NewL(); |
|
73 } |
|
74 |
|
75 // ------------------------------------------------------------------------------ |
|
76 // Accessor method for combined InlineTextSource interface |
|
77 // This method is called from Avkon custom formatting clients who need to change the |
|
78 // state of the Composite inline text system. |
|
79 // ------------------------------------------------------------------------------ |
|
80 EXPORT_C CAknCompositeInlineTextSource& CAknEdwinFormExtendedInterfaceProvider::CompositeInlineTextSource() const |
|
81 { |
|
82 return *iCompositeInlineTextSource; |
|
83 } |
|
84 |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // GetExtendedInterface |
|
88 // |
|
89 // Currently the FormatObserver is returned as the same object as the composite inline text. |
|
90 // In future, there may be other object wanting to observer the FormatL, so an intermediate |
|
91 // object would be needed then to distribute the event.. . |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 TAny* CAknEdwinFormExtendedInterfaceProvider::GetExtendedInterface( const TUid& aInterfaceId ) |
|
95 { |
|
96 if (aInterfaceId.iUid == KInlineTextApiExtensionUid.iUid) |
|
97 { |
|
98 return static_cast<MTmInlineTextSource*>(iCompositeInlineTextSource); |
|
99 } |
|
100 else |
|
101 { |
|
102 return NULL; |
|
103 } |
|
104 } |
|
105 |
|
106 // End of File |
|
107 |