|
1 /* |
|
2 * Copyright (c) 2003 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: Manages popups |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMIDPOPUPNOTECONTROLLER_H |
|
20 #define CMIDPOPUPNOTECONTROLLER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <lcdui.h> |
|
24 |
|
25 class CAknInfoPopupNoteController; |
|
26 |
|
27 // normal way to show (delay 1 second, show 5 seconds ) |
|
28 /* Time the popup will be visible in ms */ |
|
29 const TInt KPopupNoteVisibleDelayMs = 1000; // 1 second in ms |
|
30 /* Time the popup will be visible in ms */ |
|
31 const TInt KPopupNoteVisibleTimeMs = 5000; // 5 seconds in ms |
|
32 |
|
33 // fast way to show (delay 1 second, show 1 second ), used for example, when scrolling |
|
34 /* Time the popup will be visible in ms */ |
|
35 const TInt KPopupNoteShortVisibleDelayMs = 1000; // 1 seconds in ms |
|
36 /* Time the popup will be visible in ms */ |
|
37 const TInt KPopupNoteShortVisibleTimeMs = 5000; // 5 seconds in ms |
|
38 |
|
39 NONSHARABLE_CLASS(CMIDPopupNoteController): public CBase |
|
40 { |
|
41 public: |
|
42 //Public constructor an destructor |
|
43 static CMIDPopupNoteController* NewL(); |
|
44 virtual ~CMIDPopupNoteController(); |
|
45 |
|
46 public: |
|
47 /** |
|
48 * Brings popup with text. The popup is shown for KPopupNoteVisibleTimeMs (5 seconds) |
|
49 * |
|
50 * @param aText The text inside the popup. |
|
51 * @param aRect a rectangle for the popup |
|
52 * @param isShortPopup if ETrue then time is decreased to KPopupNoteShortVisibleTimeMs |
|
53 */ |
|
54 void ShowPopupL(const TDesC& aText, const TRect aRect, TBool isShortPopup=EFalse); |
|
55 /** |
|
56 * Hides popup |
|
57 */ |
|
58 void HidePopup(); |
|
59 |
|
60 private: |
|
61 //Private two phase constructor and destructor |
|
62 CMIDPopupNoteController(); |
|
63 void ConstructL(); |
|
64 |
|
65 private: |
|
66 CAknInfoPopupNoteController* iPopupController; |
|
67 }; |
|
68 |
|
69 #endif // CMIDPOPUPNOTECONTROLLER_H |