1 /* |
|
2 * Copyright (c) 2002-2004 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 the License "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: Hari and Billa |
|
13 * |
|
14 * Description: Stylus Popup Menu Containing Download UI Options |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CDlTYLUSPOPUPMENU_H_ |
|
19 #define CDlTYLUSPOPUPMENU_H_ |
|
20 |
|
21 #include <aknlongtapdetector.h> |
|
22 #include <aknstyluspopupmenu.h> |
|
23 #include <coecntrl.h> |
|
24 #include <coemain.h> |
|
25 #include <barsread.h> |
|
26 #include <EIKMOBS.H> |
|
27 #include <aknpopup.h> |
|
28 #include <CDownloadsListDlg.h> |
|
29 class CDownloadsListDlg; |
|
30 |
|
31 _LIT8(KAudio, "audio/"); |
|
32 _LIT8(KVideo, "video/"); |
|
33 _LIT8(KImage, "image/"); |
|
34 _LIT8(KFlash, "application/x-shockwave-flash"); |
|
35 _LIT8(Ksdp, "application/sdp"); |
|
36 _LIT8(Krng, "application/vnd.nokia.ringing-tone"); |
|
37 _LIT8(Krn, "application/vnd.rn-realmedia"); |
|
38 _LIT8(Kpn, "application/x-pn-realmedia"); |
|
39 _LIT8(KSisxContentType, "x-epoc/x-sisx-app"); |
|
40 |
|
41 #define KLONG_TAP_TIMER_DELAY 0.4000000 //0.4 seconds |
|
42 |
|
43 // CLASS DECLARATION |
|
44 class CDlStylusPopupMenu : public CCoeControl, public MAknLongTapDetectorCallBack, public MEikMenuObserver |
|
45 { |
|
46 public: |
|
47 static CDlStylusPopupMenu* NewL(); |
|
48 void ConstructL(); |
|
49 void HandlePointerEventL(const TPointerEvent& aPointerEvent,CDownloadsListDlg* view); |
|
50 virtual void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ); |
|
51 void ProcessCommandL(TInt aCommandId); |
|
52 void SetEmphasis(CCoeControl* /*aMenuControl*/,TBool /*aEmphasis*/) { } |
|
53 void cancelLongTapL(); |
|
54 TBool islongtapRunning(); |
|
55 void reSetLongTapFlag(); |
|
56 ~CDlStylusPopupMenu(); |
|
57 |
|
58 private: |
|
59 CAknLongTapDetector* iLongTapDetector; |
|
60 CAknStylusPopUpMenu* iStylusPopupMenu; |
|
61 TInt iCount; |
|
62 TBool ilongtapRunning; |
|
63 CDownloadsListDlg *iDlView; |
|
64 }; |
|
65 #endif /* CDlTYLUSPOPUPMENU_H_ */ |
|