|
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: |
|
15 * |
|
16 */ |
|
17 #ifndef C_CAKNFEPCTRLRAWKEYBUTTON_H |
|
18 #define C_CAKNFEPCTRLRAWKEYBUTTON_H |
|
19 |
|
20 // system includes |
|
21 #include <AknsConstants.h> |
|
22 #include <peninputlayoutbasecontrol.h> |
|
23 #include <peninputlayoutbutton.h> |
|
24 #include <peninputcommonbutton.h> |
|
25 |
|
26 // forward declarations |
|
27 class TResourceReader; |
|
28 |
|
29 class CAknFepCtrlRawKeyButton : public CAknFepCtrlCommonButton |
|
30 { |
|
31 public: |
|
32 |
|
33 IMPORT_C static CAknFepCtrlRawKeyButton* NewL(CFepUiLayout* aUiLayout, |
|
34 TInt aControlId, |
|
35 TAknsItemID aNormalID, |
|
36 TAknsItemID aPressedID, |
|
37 TAknsItemID aInactiveID, |
|
38 TInt aDownEvent = 0xffff, |
|
39 TInt aUpEvent = 0xffff, |
|
40 TInt aScanCode = 0); |
|
41 |
|
42 IMPORT_C static CAknFepCtrlRawKeyButton* NewLC(CFepUiLayout* aUiLayout, |
|
43 TInt aControlId, |
|
44 TAknsItemID aNormalID, |
|
45 TAknsItemID aPressedID, |
|
46 TAknsItemID aInactiveID, |
|
47 TInt aDownEvent = 0xffff, |
|
48 TInt aUpEvent = 0xffff, |
|
49 TInt aScanCode = 0); |
|
50 |
|
51 IMPORT_C virtual ~CAknFepCtrlRawKeyButton(); |
|
52 |
|
53 IMPORT_C CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint); |
|
54 IMPORT_C CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPoint); |
|
55 IMPORT_C void HandlePointerLeave(const TPoint& aPoint); |
|
56 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); |
|
57 IMPORT_C void ConstructFromResourceL(); |
|
58 IMPORT_C void OnDeActivate(); |
|
59 |
|
60 inline void SetDownEvent(TInt aEvent); |
|
61 inline void SetUpEvent(TInt aEvent); |
|
62 inline TInt DownEvent() const; |
|
63 inline TInt UpEvent() const; |
|
64 inline TInt ScanCode() const; |
|
65 inline void SetScanCode(TInt aScanCode); |
|
66 |
|
67 protected: |
|
68 |
|
69 IMPORT_C CAknFepCtrlRawKeyButton(CFepUiLayout* aUiLayout, |
|
70 TInt aControlId, |
|
71 TAknsItemID aNormalID, |
|
72 TAknsItemID aPressedID, |
|
73 TAknsItemID aInactiveID, |
|
74 TInt aDownEvent, |
|
75 TInt aUpEvent, |
|
76 TInt aScanCode); |
|
77 |
|
78 private: |
|
79 |
|
80 TInt iDownEvent; |
|
81 TInt iUpEvent; |
|
82 TInt iScanCode; |
|
83 // indicate whether last event is pointer down event |
|
84 TBool iLastPntDownEvent; |
|
85 }; |
|
86 |
|
87 #include "peninputrawkeybutton.inl" |
|
88 #endif // C_CAKNFEPCTRLRAWKEYBUTTON_H |
|
89 |
|
90 // End Of File |