author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:18:30 +0300 | |
branch | RCL_3 |
changeset 102 | ba63c83f4716 |
parent 88 | 3321d3e205b6 |
permissions | -rw-r--r-- |
83 | 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 |
// --------------------------------------------------------- |
|
102
ba63c83f4716
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
90 |
// CXnTextEditor::HandleEditorEvent |
ba63c83f4716
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
91 |
// --------------------------------------------------------- |
ba63c83f4716
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
92 |
// |
ba63c83f4716
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
93 |
void CXnTextEditor::HandleEditorEvent( TInt aReason ) |
ba63c83f4716
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
94 |
{ |
ba63c83f4716
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
95 |
static_cast<CXnTextEditorAdapter*>(ControlAdapter())-> |
ba63c83f4716
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
96 |
HandleEditorEvent( aReason ); |
ba63c83f4716
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
97 |
} |
ba63c83f4716
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
98 |
|
ba63c83f4716
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
99 |
// --------------------------------------------------------- |
83 | 100 |
// --------------------------------------------------------- |
101 |
XnComponentInterface::MXnComponentInterface* CXnTextEditor::MakeInterfaceL(const TDesC8& aType) |
|
102 |
{ |
|
103 |
if( aType != XnTextEditorInterface::KType ) |
|
104 |
{ |
|
105 |
return NULL; |
|
106 |
} |
|
107 |
||
108 |
XnTextEditorInterface::MXnTextEditorInterface* editorIf = static_cast< XnTextEditorInterface::MXnTextEditorInterface* >( this ); |
|
109 |
||
110 |
return editorIf; |
|
111 |
} |
|
112 |
||
113 |
// End of file |