|
1 /* |
|
2 * Copyright (c) 2002-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: Implementation of the hwr ui state machine (Pen Standby State) |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // System includes |
|
20 #include <peninputuistatemgr.h> |
|
21 |
|
22 // user includes |
|
23 #include "peninputhwrevent.h" |
|
24 #include "peninputhwrboxlayout.h" |
|
25 #include "peninputhwrboxuistatetype.h" // UI state |
|
26 #include "peninputhwrboxwindow.h" // use hwr window, which derived from base window |
|
27 #include "peninputhwrboxuistatepenstandby.h" |
|
28 |
|
29 // ======== MEMBER FUNCTIONS ======== |
|
30 |
|
31 // Implementation of Class CPeninputHwrBoxUiStatePenStandby |
|
32 |
|
33 // ----------------------------------------------------------------------------- |
|
34 // CPeninputHwrBoxUiStatePenStandby::NewL |
|
35 // (other items were commented in a header). |
|
36 // ----------------------------------------------------------------------------- |
|
37 // |
|
38 CPeninputHwrBoxUiStatePenStandby* CPeninputHwrBoxUiStatePenStandby::NewL(MPeninputUiStateMgr* aUiStateMgr, |
|
39 MPeninputLayoutContext* aContext) |
|
40 { |
|
41 CPeninputHwrBoxUiStatePenStandby* self = new ( ELeave ) CPeninputHwrBoxUiStatePenStandby(aUiStateMgr,aContext); |
|
42 CleanupStack::PushL(self); |
|
43 self->Construct(); |
|
44 CleanupStack::Pop(self); |
|
45 return self; |
|
46 } |
|
47 |
|
48 // ----------------------------------------------------------------------------- |
|
49 // CPeninputHwrBoxUiStatePenStandby::~CPeninputHwrBoxUiStatePenStandby |
|
50 // (other items were commented in a header). |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 CPeninputHwrBoxUiStatePenStandby::~CPeninputHwrBoxUiStatePenStandby() |
|
54 { |
|
55 } |
|
56 |
|
57 // --------------------------------------------------------------------------- |
|
58 // CPeninputHwrBoxUiStatePenStandby::HandleControlEventPenL |
|
59 // (other items were commented in a header). |
|
60 // --------------------------------------------------------------------------- |
|
61 // |
|
62 void CPeninputHwrBoxUiStatePenStandby::HandleControlEventPenL(TInt aEventType |
|
63 , const TDesC& /*aEventData*/ |
|
64 , CPeninputHwrBoxLayout& aUiLayout |
|
65 , TDes& /*aCharCode*/ |
|
66 , TBool& aHandled) |
|
67 { |
|
68 aHandled = ETrue; |
|
69 switch (aEventType) |
|
70 { |
|
71 case EPeninputLayoutHwrEventBeginWriting: |
|
72 { |
|
73 aUiLayout.CompleteIfConvertingL(); |
|
74 iUiStateMgr->SetCurrentUiState(EPeninputHwrUiStatePenBeginWriting); |
|
75 aUiLayout.HwrBoxWindow()->DimInputContextField(ETrue); // BeginWriting::OnEntry() |
|
76 } |
|
77 break; |
|
78 default: |
|
79 aHandled = EFalse; |
|
80 break; |
|
81 } |
|
82 } |
|
83 |
|
84 // ----------------------------------------------------------------------------- |
|
85 // CPeninputHwrBoxUiStatePenStandby::CPeninputHwrBoxUiStatePenStandby |
|
86 // (other items were commented in a header). |
|
87 // ----------------------------------------------------------------------------- |
|
88 // |
|
89 CPeninputHwrBoxUiStatePenStandby::CPeninputHwrBoxUiStatePenStandby(MPeninputUiStateMgr* aUiStateMgr, |
|
90 MPeninputLayoutContext* aContext) |
|
91 :CPeninputHwrBoxUiState(aUiStateMgr,aContext) |
|
92 { |
|
93 } |
|
94 |
|
95 // End Of File |