|
1 /* |
|
2 * Copyright (c) 2009 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: Focus strategy for editor implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "cmrfocusstrategyeditor.h" |
|
19 #include "emailtrace.h" |
|
20 |
|
21 // --------------------------------------------------------------------------- |
|
22 // CMRFocusStrategyEditor::NewL |
|
23 // --------------------------------------------------------------------------- |
|
24 // |
|
25 CMRFocusStrategyEditor* CMRFocusStrategyEditor::NewL( MESMRFieldStorage& aFactory ) |
|
26 { |
|
27 FUNC_LOG; |
|
28 |
|
29 CMRFocusStrategyEditor* self = |
|
30 new ( ELeave ) CMRFocusStrategyEditor( aFactory ); |
|
31 return self; |
|
32 } |
|
33 |
|
34 // --------------------------------------------------------------------------- |
|
35 // CMRFocusStrategyEditor::CMRFocusStrategyEditor |
|
36 // --------------------------------------------------------------------------- |
|
37 // |
|
38 CMRFocusStrategyEditor::CMRFocusStrategyEditor( MESMRFieldStorage& aFactory ) |
|
39 : CMRFocusStrategyBase( aFactory ) |
|
40 { |
|
41 FUNC_LOG; |
|
42 // Do nothing |
|
43 } |
|
44 |
|
45 // --------------------------------------------------------------------------- |
|
46 // CMRFocusStrategyEditor::~CMRFocusStrategyEditor |
|
47 // --------------------------------------------------------------------------- |
|
48 // |
|
49 CMRFocusStrategyEditor::~CMRFocusStrategyEditor() |
|
50 { |
|
51 FUNC_LOG; |
|
52 // Do nothing |
|
53 } |
|
54 |
|
55 // --------------------------------------------------------------------------- |
|
56 // CMRFocusStrategyEditor::EventOccured |
|
57 // --------------------------------------------------------------------------- |
|
58 // |
|
59 void CMRFocusStrategyEditor::EventOccured( TFocusEventType aEventType ) |
|
60 { |
|
61 FUNC_LOG; |
|
62 |
|
63 if ( aEventType == MMRFocusStrategy::EFocusKeyEvent ) |
|
64 { |
|
65 CMRFocusStrategyBase::ShowFocus(); |
|
66 } |
|
67 if ( aEventType == MMRFocusStrategy::EFocusPointerEvent ) |
|
68 { |
|
69 // We don't hide focus in editor |
|
70 iVisibleFocusOn = ETrue; |
|
71 } |
|
72 } |
|
73 |
|
74 // --------------------------------------------------------------------------- |
|
75 // CMRFocusStrategyEditor::InitializeFocus |
|
76 // --------------------------------------------------------------------------- |
|
77 // |
|
78 void CMRFocusStrategyEditor::InitializeFocus() |
|
79 { |
|
80 FUNC_LOG; |
|
81 |
|
82 // Our focus is always on in editor |
|
83 CMRFocusStrategyBase::ShowFocus(); |
|
84 } |
|
85 |
|
86 // End of file |
|
87 |