|
1 /* |
|
2 * Copyright (c) 2005-2006 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: Implementation wrapper for CEikEdwin |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <e32base.h> |
|
19 #include <coecntrl.h> |
|
20 #include <barsread.h> |
|
21 #include "xncomponent.h" |
|
22 #include "xntexteditor.h" |
|
23 #include "xntexteditoradapter.h" |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CXnTextEditor::NewL |
|
29 // Symbian static 1st phase constructor |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 CXnTextEditor* CXnTextEditor::NewL() |
|
33 { |
|
34 CXnTextEditor* self = new( ELeave ) CXnTextEditor; |
|
35 |
|
36 CleanupStack::PushL( self ); |
|
37 self->ConstructL(); |
|
38 CleanupStack::Pop(); |
|
39 |
|
40 return self; |
|
41 } |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // CXnTextEditor::ConstructL |
|
45 // Symbian 2nd phase constructor can leave. |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 void CXnTextEditor::ConstructL() |
|
49 { |
|
50 CXnComponent::ConstructL(); |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // CXnTextEditor::ConstructL |
|
55 // C++ default constructor |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 CXnTextEditor::CXnTextEditor() |
|
59 { |
|
60 } |
|
61 |
|
62 // ----------------------------------------------------------------------------- |
|
63 // CXnTextEditor::ConstructL |
|
64 // C++ destructor |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 CXnTextEditor::~CXnTextEditor() |
|
68 { |
|
69 } |
|
70 |
|
71 // --------------------------------------------------------- |
|
72 // CXnTextEditor::SetTextL |
|
73 // --------------------------------------------------------- |
|
74 // |
|
75 void CXnTextEditor::SetTextL(const TDesC& aText) |
|
76 { |
|
77 (static_cast<CXnTextEditorAdapter*>(ControlAdapter()))->SetTextL(aText); |
|
78 } |
|
79 |
|
80 // --------------------------------------------------------- |
|
81 // CXnTextEditor::Text |
|
82 // --------------------------------------------------------- |
|
83 // |
|
84 const HBufC* CXnTextEditor::Text() |
|
85 { |
|
86 return (static_cast<CXnTextEditorAdapter*>(ControlAdapter()))->Text(); |
|
87 } |
|
88 |
|
89 // --------------------------------------------------------- |
|
90 // --------------------------------------------------------- |
|
91 XnComponentInterface::MXnComponentInterface* CXnTextEditor::MakeInterfaceL(const TDesC8& aType) |
|
92 { |
|
93 if( aType != XnTextEditorInterface::KType ) |
|
94 { |
|
95 return NULL; |
|
96 } |
|
97 |
|
98 XnTextEditorInterface::MXnTextEditorInterface* editorIf = static_cast< XnTextEditorInterface::MXnTextEditorInterface* >( this ); |
|
99 |
|
100 return editorIf; |
|
101 } |
|
102 |
|
103 // End of file |