author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 15 Sep 2010 11:52:37 +0300 | |
branch | RCL_3 |
changeset 73 | c8382f7b54ef |
parent 64 | 3533d4323edc |
child 80 | 726fba06891a |
permissions | -rw-r--r-- |
64 | 1 |
/* |
2 |
* Copyright (c) 2007 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: compose view container |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
#include "emailtrace.h" |
|
21 |
#include <AknIconUtils.h> |
|
22 |
#include <avkon.hrh> |
|
23 |
#include <eiklabel.h> |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
24 |
#include <aknbutton.h> |
64 | 25 |
#include <eikimage.h> |
26 |
#include <eikenv.h> |
|
27 |
#include <AknsDrawUtils.h> |
|
28 |
#include <AknUtils.h> |
|
29 |
#include <StringLoader.h> |
|
30 |
#include <s32mem.h> |
|
31 |
#include <txtrich.h> |
|
32 |
#include <FreestyleEmailUi.rsg> |
|
33 |
#include <freestyleemailui.mbg> |
|
34 |
#include "FreestyleEmailUiLayoutData.h" |
|
35 |
#include "FreestyleEmailUiLayoutHandler.h" |
|
36 |
#include "FreestyleEmailUiAppui.h" |
|
37 |
#include "FreestyleEmailUiTextureManager.h" |
|
38 |
#include "ncssubjectfield.h" |
|
39 |
#include "ncsconstants.h" |
|
40 |
#include "ncsfieldsizeobserver.h" |
|
41 |
#include "ncsutility.h" |
|
42 |
#include "ncsheadercontainer.h" |
|
43 |
||
44 |
// --------------------------------------------------------------------------- |
|
45 |
// CNcsSubjectField::CNcsSubjectField() |
|
46 |
// --------------------------------------------------------------------------- |
|
47 |
// |
|
48 |
CNcsSubjectField::CNcsSubjectField( MNcsFieldSizeObserver* aSizeObserver, |
|
49 |
CNcsHeaderContainer* aParentControl ): |
|
50 |
MNcsControl( aSizeObserver ), |
|
51 |
iParentControl( aParentControl ) |
|
52 |
{ |
|
53 |
FUNC_LOG; |
|
54 |
} |
|
55 |
||
56 |
// ----------------------------------------------------------------------------- |
|
57 |
// CNcsSubjectField::NewL() |
|
58 |
// Two-phased constructor. |
|
59 |
// ----------------------------------------------------------------------------- |
|
60 |
// |
|
61 |
CNcsSubjectField* CNcsSubjectField::NewL( TInt aLabelTextId, |
|
62 |
MNcsFieldSizeObserver* aSizeObserver, CNcsHeaderContainer* aParentControl ) |
|
63 |
{ |
|
64 |
FUNC_LOG; |
|
65 |
CNcsSubjectField* self = |
|
66 |
new ( ELeave ) CNcsSubjectField( aSizeObserver, aParentControl ); |
|
67 |
CleanupStack::PushL( self ); |
|
68 |
self->ConstructL( aLabelTextId ); |
|
69 |
CleanupStack::Pop( self ); |
|
70 |
return self; |
|
71 |
} |
|
72 |
||
73 |
||
74 |
// ----------------------------------------------------------------------------- |
|
75 |
// CNcsSubjectField::ConstructL() |
|
76 |
// Symbian 2nd phase constructor can leave. |
|
77 |
// ----------------------------------------------------------------------------- |
|
78 |
// |
|
79 |
void CNcsSubjectField::ConstructL( TInt aLabelTextId ) |
|
80 |
{ |
|
81 |
FUNC_LOG; |
|
82 |
// Create label |
|
83 |
HBufC* aTextBuf = StringLoader::LoadLC( aLabelTextId ); |
|
84 |
TPtrC captionText = aTextBuf ? aTextBuf->Des() : TPtrC(); |
|
85 |
||
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
86 |
if( AknLayoutUtils::PenEnabled() ) |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
87 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
88 |
// Create a frameless button that has no observer |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
89 |
// This is done like this to make Subject: field appear similar as |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
90 |
// other header fields (To:, Cc:), although it doesn't have other |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
91 |
// button-like features |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
92 |
TRect buttRect( 10, 10, 70, 100 ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
93 |
iButton = CAknButton::NewL( NULL, NULL, NULL, NULL, |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
94 |
captionText, TPtrC(), |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
95 |
KAknButtonTextLeft | KAknButtonNoFrame , |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
96 |
0 ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
97 |
iButton->SetTextColorIds( |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
98 |
KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG63 ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
99 |
iButton->SetContainerWindowL( *iParentControl ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
100 |
iButton->SetRect( buttRect ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
101 |
iButton->EnableFeedback( EFalse ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
102 |
iButton->MakeVisible( ETrue ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
103 |
iButton->ActivateL(); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
104 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
105 |
else |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
106 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
107 |
iLabel = new ( ELeave ) CNcsLabel( *this, NULL ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
108 |
iLabel->SetTextL( captionText ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
109 |
|
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
110 |
// S60 Skin support |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
111 |
iLabel->SetBrushStyle(CWindowGc::ENullBrush); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
112 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
113 |
|
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
114 |
iTextEditor = new ( ELeave ) CNcsEditor( |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
115 |
iSizeObserver, ETrue, ENcsEditorSubject, captionText ); |
64 | 116 |
CleanupStack::PopAndDestroy( aTextBuf ); |
117 |
} |
|
118 |
||
119 |
// --------------------------------------------------------------------------- |
|
120 |
// Destructor |
|
121 |
// --------------------------------------------------------------------------- |
|
122 |
// |
|
123 |
CNcsSubjectField::~CNcsSubjectField() |
|
124 |
{ |
|
125 |
FUNC_LOG; |
|
126 |
delete iTextEditor; |
|
127 |
delete iLabel; |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
128 |
delete iButton; |
64 | 129 |
} |
130 |
||
131 |
// ----------------------------------------------------------------------------- |
|
132 |
// CNcsSubjectField::SetContainerWindowL() const |
|
133 |
// ----------------------------------------------------------------------------- |
|
134 |
// |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
135 |
void CNcsSubjectField::SetContainerWindowL( const CCoeControl& aContainer ) |
64 | 136 |
{ |
137 |
FUNC_LOG; |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
138 |
CCoeControl::SetContainerWindowL( aContainer ); |
64 | 139 |
|
140 |
// Create the component array |
|
141 |
InitComponentArrayL(); |
|
142 |
CCoeControlArray& controls = Components(); |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
143 |
controls.SetControlsOwnedExternally( ETrue ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
144 |
if ( iButton ) |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
145 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
146 |
controls.AppendLC( iButton ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
147 |
CleanupStack::Pop( iButton ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
148 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
149 |
else |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
150 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
151 |
controls.AppendLC( iLabel ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
152 |
CleanupStack::Pop( iLabel ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
153 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
154 |
controls.AppendLC( iTextEditor ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
155 |
CleanupStack::Pop( iTextEditor ); |
64 | 156 |
|
157 |
// Setup text editor |
|
158 |
iTextEditor->ConstructL( &aContainer, KMaxAddressFieldLines, 0 ); |
|
159 |
iTextEditor->SetBorder( TGulBorder::ENone ); |
|
160 |
iTextEditor->SetAknEditorInputMode( EAknEditorTextInputMode ); |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
161 |
iTextEditor->CreateScrollBarFrameL()->SetScrollBarVisibilityL( |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
162 |
CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ); |
64 | 163 |
iTextEditor->SetEdwinSizeObserver( this ); |
164 |
iTextEditor->SetupEditorL(); |
|
165 |
// Setup label |
|
166 |
UpdateFontSize(); |
|
167 |
UpdateColors(); |
|
168 |
} |
|
169 |
||
170 |
// ----------------------------------------------------------------------------- |
|
171 |
// CNcsSubjectField::Draw() const |
|
172 |
// Draws the display |
|
173 |
// ----------------------------------------------------------------------------- |
|
174 |
// |
|
175 |
void CNcsSubjectField::Draw( const TRect& /*aRect*/ ) const |
|
176 |
{ |
|
177 |
FUNC_LOG; |
|
178 |
CWindowGc& gc = SystemGc(); |
|
179 |
gc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
180 |
} |
|
181 |
||
182 |
// ----------------------------------------------------------------------------- |
|
183 |
// CNcsSubjectField::GetMinLabelLength() |
|
184 |
// ----------------------------------------------------------------------------- |
|
185 |
// |
|
186 |
TInt CNcsSubjectField::GetMinLabelLength() const |
|
187 |
{ |
|
188 |
FUNC_LOG; |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
189 |
return iLabel ? iLabel->Font()->TextWidthInPixels( *iLabel->Text() ) : 0; |
64 | 190 |
} |
191 |
||
192 |
// ----------------------------------------------------------------------------- |
|
193 |
// CNcsSubjectField::SizeChanged() |
|
194 |
// set size |
|
195 |
// ----------------------------------------------------------------------------- |
|
196 |
// |
|
197 |
void CNcsSubjectField::SizeChanged() |
|
198 |
{ |
|
199 |
FUNC_LOG; |
|
200 |
||
201 |
const TRect rect( Rect() ); |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
202 |
if ( iButton ) |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
203 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
204 |
NcsUtility::LayoutCaptionButton( iButton, rect ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
205 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
206 |
else |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
207 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
208 |
NcsUtility::LayoutCaptionLabel( iLabel, rect ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
209 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
210 |
|
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
211 |
NcsUtility::LayoutDetailEdwinTouch( |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
212 |
iTextEditor, rect, iEditorLineCount, EFalse ); |
64 | 213 |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
214 |
if ( iTextEditor->ScrollBarFrame() ) |
64 | 215 |
{ |
216 |
TRect rc = iTextEditor->Rect(); |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
217 |
if ( AknLayoutUtils::LayoutMirrored() ) |
64 | 218 |
{ |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
219 |
rc.iTl.iX += iTextEditor->ScrollBarFrame()->ScrollBarBreadth( |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
220 |
CEikScrollBar::EVertical ); |
64 | 221 |
} |
222 |
else |
|
223 |
{ |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
224 |
rc.iBr.iX -= iTextEditor->ScrollBarFrame()->ScrollBarBreadth( |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
225 |
CEikScrollBar::EVertical ); |
64 | 226 |
} |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
227 |
iTextEditor->SetRect( rc ); |
64 | 228 |
} |
229 |
||
230 |
// Setup text alignment according the mirrored/normal layout. |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
231 |
if ( iLabel ) |
64 | 232 |
{ |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
233 |
if ( AknLayoutUtils::LayoutMirrored() ) |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
234 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
235 |
iLabel->SetAlignment( EHLeftVCenter ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
236 |
iLabel->SetLabelAlignment( ELayoutAlignLeft ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
237 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
238 |
else |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
239 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
240 |
iLabel->SetAlignment( EHRightVCenter ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
241 |
iLabel->SetLabelAlignment( ELayoutAlignRight ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
242 |
} |
64 | 243 |
} |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
244 |
|
64 | 245 |
// this needs to be bidi as in mirrored layout |
246 |
// writing language left to right can be set |
|
247 |
iTextEditor->SetAlignment( EAknEditorAlignBidi ); |
|
248 |
||
249 |
UpdateFontSize(); |
|
250 |
||
251 |
iTextEditor->UpdateCustomDrawer(); |
|
252 |
} |
|
253 |
||
254 |
// ----------------------------------------------------------------------------- |
|
255 |
// CNcsSubjectField::PositionChanged() |
|
256 |
// ----------------------------------------------------------------------------- |
|
257 |
// |
|
258 |
void CNcsSubjectField::PositionChanged() |
|
259 |
{ |
|
260 |
FUNC_LOG; |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
261 |
// empty |
64 | 262 |
} |
263 |
||
264 |
// ----------------------------------------------------------------------------- |
|
265 |
// CNcsSubjectField::OfferKeyEventL() |
|
266 |
// Handles key events |
|
267 |
// ----------------------------------------------------------------------------- |
|
268 |
// |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
269 |
TKeyResponse CNcsSubjectField::OfferKeyEventL( |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
270 |
const TKeyEvent& aKeyEvent, TEventCode aType ) |
64 | 271 |
{ |
272 |
FUNC_LOG; |
|
273 |
TKeyResponse ret( EKeyWasNotConsumed ); |
|
274 |
||
275 |
ret = iTextEditor->OfferKeyEventL( aKeyEvent, aType ); |
|
276 |
return ret; |
|
277 |
} |
|
278 |
||
279 |
// ----------------------------------------------------------------------------- |
|
280 |
// CNcsAddressInputField::HandlePointerEventL() |
|
281 |
// Handles pointer events |
|
282 |
// ----------------------------------------------------------------------------- |
|
283 |
// |
|
284 |
void CNcsSubjectField::HandlePointerEventL( const TPointerEvent& aPointerEvent ) |
|
285 |
{ |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
286 |
FUNC_LOG; |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
287 |
CCoeControl::HandlePointerEventL( aPointerEvent ); |
64 | 288 |
} |
289 |
||
290 |
// ----------------------------------------------------------------------------- |
|
291 |
// CNcsSubjectField::FocusChanged() |
|
292 |
// ----------------------------------------------------------------------------- |
|
293 |
// |
|
294 |
void CNcsSubjectField::FocusChanged( TDrawNow aDrawNow ) |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
295 |
{ |
64 | 296 |
FUNC_LOG; |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
297 |
if ( IsFocused() ) |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
298 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
299 |
iTextEditor->SetFocus( ETrue, aDrawNow ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
300 |
if ( iParentControl ) |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
301 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
302 |
TRAP_IGNORE( iParentControl->SetMskL() ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
303 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
304 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
305 |
else |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
306 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
307 |
iTextEditor->SetFocus( EFalse, aDrawNow ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
308 |
} |
64 | 309 |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
310 |
if ( aDrawNow ) |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
311 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
312 |
DrawNow(); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
313 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
314 |
} |
64 | 315 |
|
316 |
// ----------------------------------------------------------------------------- |
|
317 |
// CNcsSubjectField::MinimumHeight() |
|
318 |
// return height of subject control |
|
319 |
// ----------------------------------------------------------------------------- |
|
320 |
// |
|
321 |
TInt CNcsSubjectField::MinimumHeight() |
|
322 |
{ |
|
323 |
FUNC_LOG; |
|
324 |
return 0; |
|
325 |
} |
|
326 |
||
327 |
// ----------------------------------------------------------------------------- |
|
328 |
// CNcsSubjectField::SetSubjectL() |
|
329 |
// ----------------------------------------------------------------------------- |
|
330 |
// |
|
331 |
void CNcsSubjectField::SetSubjectL( const TDesC& aSubject ) |
|
332 |
{ |
|
333 |
FUNC_LOG; |
|
334 |
if ( &aSubject && aSubject.Length() > 0 ) |
|
335 |
{ |
|
336 |
// clear subject if necessary |
|
337 |
TInt documentLength = iTextEditor->RichText()->DocumentLength(); |
|
338 |
if ( documentLength > 0 ) |
|
339 |
{ |
|
340 |
iTextEditor->RichText()->DeleteL( 0, documentLength ); |
|
341 |
iTextEditor->HandleTextChangedL(); |
|
342 |
} |
|
343 |
||
344 |
RMemReadStream inputStream( aSubject.Ptr(), aSubject.Size() ); |
|
345 |
CleanupClosePushL( inputStream ); |
|
346 |
||
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
347 |
iTextEditor->RichText()->ImportTextL( |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
348 |
0, inputStream, CPlainText::EOrganiseByParagraph ); |
64 | 349 |
|
350 |
// Activating the field will set the control to the end of the text |
|
351 |
iTextEditor->ActivateL(); |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
352 |
iTextEditor->SetCursorPosL( 0, EFalse ); |
64 | 353 |
|
354 |
CleanupStack::PopAndDestroy( &inputStream ); |
|
355 |
} |
|
356 |
} |
|
357 |
||
358 |
// ----------------------------------------------------------------------------- |
|
359 |
// CNcsSubjectField::HandleEdwinSizeEventL() |
|
360 |
// ----------------------------------------------------------------------------- |
|
361 |
// |
|
362 |
TBool CNcsSubjectField::HandleEdwinSizeEventL( CEikEdwin* /*aEdwin*/, |
|
363 |
TEdwinSizeEvent /*aEventType*/, TSize aDesirableEdwinSize ) |
|
364 |
{ |
|
365 |
FUNC_LOG; |
|
366 |
TInt ret( EFalse ); |
|
367 |
TInt htLine = iTextEditor->GetLineHeightL(); |
|
368 |
TInt numLinesDesired = aDesirableEdwinSize.iHeight / htLine; |
|
369 |
iEditorLineCount = numLinesDesired; |
|
370 |
if ( iSizeObserver ) |
|
371 |
{ |
|
372 |
ret = iSizeObserver->UpdateFieldSizeL(); |
|
373 |
} |
|
374 |
return ret; |
|
375 |
} |
|
376 |
||
377 |
// ----------------------------------------------------------------------------- |
|
378 |
// CNcsSubjectField::SelectAllTextL() |
|
379 |
// ----------------------------------------------------------------------------- |
|
380 |
// |
|
381 |
void CNcsSubjectField::SelectAllTextL() |
|
382 |
{ |
|
383 |
FUNC_LOG; |
|
384 |
iTextEditor->SelectAllL(); |
|
385 |
} |
|
386 |
||
387 |
// ----------------------------------------------------------------------------- |
|
388 |
// CNcsSubjectField::Editor |
|
389 |
// ----------------------------------------------------------------------------- |
|
390 |
CNcsEditor* CNcsSubjectField::Editor() const |
|
391 |
{ |
|
392 |
FUNC_LOG; |
|
393 |
return iTextEditor; |
|
394 |
} |
|
395 |
||
396 |
// ----------------------------------------------------------------------------- |
|
397 |
// CNcsSubjectField::LineCount |
|
398 |
// ----------------------------------------------------------------------------- |
|
399 |
TInt CNcsSubjectField::LineCount() const |
|
400 |
{ |
|
401 |
FUNC_LOG; |
|
402 |
return iTextEditor->LineCount(); |
|
403 |
} |
|
404 |
||
405 |
// ----------------------------------------------------------------------------- |
|
406 |
// CNcsSubjectField::CursorLineNumber |
|
407 |
// ----------------------------------------------------------------------------- |
|
408 |
TInt CNcsSubjectField::CursorLineNumber() const |
|
409 |
{ |
|
410 |
FUNC_LOG; |
|
411 |
return iTextEditor->CursorLineNumber(); |
|
412 |
} |
|
413 |
||
414 |
// ----------------------------------------------------------------------------- |
|
415 |
// CNcsSubjectField::CursorPosition |
|
416 |
// ----------------------------------------------------------------------------- |
|
417 |
TInt CNcsSubjectField::CursorPosition() const |
|
418 |
{ |
|
419 |
FUNC_LOG; |
|
420 |
TInt pos = iTextEditor->CursorPosition(); |
|
421 |
//Add the delta between the top of the edit control |
|
422 |
//and the top of the parent control |
|
423 |
pos += iTextEditor->Rect().iTl.iY - Rect().iTl.iY; |
|
424 |
return pos; |
|
425 |
} |
|
426 |
||
427 |
// ----------------------------------------------------------------------------- |
|
428 |
// CNcsSubjectField::ScrollableLines |
|
429 |
// ----------------------------------------------------------------------------- |
|
430 |
TInt CNcsSubjectField::ScrollableLines() const |
|
431 |
{ |
|
432 |
FUNC_LOG; |
|
433 |
return iTextEditor->ScrollableLines(); |
|
434 |
} |
|
435 |
||
436 |
// ----------------------------------------------------------------------------- |
|
437 |
// CNcsSubjectField::GetNumChars |
|
438 |
// ----------------------------------------------------------------------------- |
|
439 |
TInt CNcsSubjectField::GetNumChars() const |
|
440 |
{ |
|
441 |
FUNC_LOG; |
|
442 |
return iTextEditor->GetNumChars(); |
|
443 |
} |
|
444 |
||
445 |
// ----------------------------------------------------------------------------- |
|
446 |
// CNcsSubjectField::GetLabelText |
|
447 |
// ----------------------------------------------------------------------------- |
|
448 |
const TDesC& CNcsSubjectField::GetLabelText() const |
|
449 |
{ |
|
450 |
FUNC_LOG; |
|
451 |
return KNullDesC; |
|
452 |
} |
|
453 |
||
454 |
// --------------------------------------------------------------------------- |
|
455 |
// CNcsSubjectField::LayoutLineCount |
|
456 |
// --------------------------------------------------------------------------- |
|
457 |
// |
|
458 |
TInt CNcsSubjectField::LayoutLineCount() const |
|
459 |
{ |
|
460 |
FUNC_LOG; |
|
461 |
return ( IsVisible() ? Max( 1, iEditorLineCount ) : 0 ); |
|
462 |
} |
|
463 |
||
464 |
// ----------------------------------------------------------------------------- |
|
465 |
// CNcsSubjectField::Reposition |
|
466 |
// ----------------------------------------------------------------------------- |
|
467 |
void CNcsSubjectField::Reposition(TPoint& aPt, TInt /*aWidth*/) |
|
468 |
{ |
|
469 |
FUNC_LOG; |
|
470 |
SetPosition( aPt ); |
|
471 |
} |
|
472 |
||
473 |
// ----------------------------------------------------------------------------- |
|
474 |
// CNcsSubjectField::GetLineRectL |
|
475 |
// ----------------------------------------------------------------------------- |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
476 |
void CNcsSubjectField::GetLineRect( TRect& aLineRect ) const |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
477 |
{ |
64 | 478 |
FUNC_LOG; |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
479 |
return iTextEditor->GetLineRect( aLineRect ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
480 |
} |
64 | 481 |
|
482 |
// ----------------------------------------------------------------------------- |
|
483 |
// CNcsSubjectField::SetMaxLabelLength |
|
484 |
// ----------------------------------------------------------------------------- |
|
485 |
void CNcsSubjectField::SetMaxLabelLength( TInt aMaxLength ) |
|
486 |
{ |
|
487 |
FUNC_LOG; |
|
488 |
iMaximumLabelLength = aMaxLength; |
|
489 |
} |
|
490 |
||
491 |
// ----------------------------------------------------------------------------- |
|
492 |
// CNcsSubjectField::SetTextColorL |
|
493 |
// ----------------------------------------------------------------------------- |
|
494 |
void CNcsSubjectField::SetTextColorL( TLogicalRgb aColor ) |
|
495 |
{ |
|
496 |
FUNC_LOG; |
|
497 |
iTextEditor->SetTextColorL( aColor ); |
|
498 |
} |
|
499 |
||
500 |
// --------------------------------------------------------------------------- |
|
501 |
// CNcsSubjectField::UpdateColors() |
|
502 |
// --------------------------------------------------------------------------- |
|
503 |
// |
|
504 |
void CNcsSubjectField::UpdateColors() |
|
505 |
{ |
|
506 |
FUNC_LOG; |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
507 |
|
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
508 |
if ( iLabel ) |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
509 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
510 |
TRgb textColor = KRgbBlack; |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
511 |
if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), textColor, |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
512 |
KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 ) != KErrNone ) |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
513 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
514 |
textColor = KRgbBlack; |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
515 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
516 |
TRAP_IGNORE( iLabel->OverrideColorL( EColorLabelText, textColor ) ); |
64 | 517 |
} |
518 |
} |
|
519 |
||
520 |
// --------------------------------------------------------------------------- |
|
521 |
// CNcsSubjectField::UpdateFontSize() |
|
522 |
// --------------------------------------------------------------------------- |
|
523 |
// |
|
524 |
void CNcsSubjectField::UpdateFontSize() |
|
525 |
{ |
|
526 |
FUNC_LOG; |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
527 |
CCoeControl* control = |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
528 |
iButton ? ( CCoeControl* )iButton : ( CCoeControl* )iLabel; |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
529 |
iFont = NcsUtility::GetLayoutFont( |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
530 |
control->Rect(), NcsUtility::ENcsHeaderCaptionFont ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
531 |
if( control == iButton ) |
64 | 532 |
{ |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
533 |
iButton->SetTextFont( iFont ); |
64 | 534 |
} |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
535 |
else |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
536 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
537 |
iLabel->SetFont( iFont ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
538 |
} |
64 | 539 |
iTextEditor->UpdateFontSize(); |
540 |
UpdateColors(); |
|
541 |
} |
|
542 |
||
543 |
// --------------------------------------------------------------------------- |
|
544 |
// CNcsSubjectField::HandleResourceChange() |
|
545 |
// --------------------------------------------------------------------------- |
|
546 |
// |
|
547 |
void CNcsSubjectField::HandleResourceChange( TInt aType ) |
|
548 |
{ |
|
549 |
FUNC_LOG; |
|
550 |
CCoeControl::HandleResourceChange( aType ); |
|
551 |
if ( aType == KAknsMessageSkinChange || |
|
552 |
aType == KEikMessageColorSchemeChange ) |
|
553 |
{ |
|
554 |
UpdateFontSize(); |
|
555 |
UpdateColors(); |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
556 |
iTextEditor->HandleResourceChange( aType ); |
64 | 557 |
} |
558 |
} |
|
559 |
||
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
560 |
// --------------------------------------------------------------------------- |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
561 |
// CNcsSubjectField::EnableKineticScrollingL() |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
562 |
// --------------------------------------------------------------------------- |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
563 |
// |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
564 |
void CNcsSubjectField::EnableKineticScrollingL( CAknPhysics* aPhysics ) |
64 | 565 |
{ |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
566 |
iTextEditor->EnableKineticScrollingL( aPhysics ); |
64 | 567 |
iTextEditor->TextLayout()->RestrictScrollToTopsOfLines( ETrue ); |
568 |
} |
|
569 |
||
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
570 |
// --------------------------------------------------------------------------- |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
571 |
// CNcsSubjectField::SetPhysicsEmulationOngoing() |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
572 |
// --------------------------------------------------------------------------- |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
573 |
// |
64 | 574 |
void CNcsSubjectField::SetPhysicsEmulationOngoing( TBool aPhysOngoing ) |
575 |
{ |
|
576 |
iTextEditor->SetPhysicsEmulationOngoing( aPhysOngoing ); |
|
577 |
} |