|
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: Alert dialog implementation for Series 60 |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMIDALERTDIALOG_H |
|
20 #define CMIDALERTDIALOG_H |
|
21 |
|
22 // INCLUDES |
|
23 // using MMIDGaugeToAlertListner interface in class declaration |
|
24 // and CMIDNonInteractiveGauge as iGauge member |
|
25 #include "CMIDGaugeItem.h" |
|
26 #include <lcdui.h> |
|
27 #include <AknPopupform.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CMIDAlert; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 NONSHARABLE_CLASS(CMIDAlertDialog) : public CAknPopupForm, public MMIDGaugeToAlertListner |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 static CMIDAlertDialog* NewL(CMIDAlert* aAlert,CMIDDisplayable* aDisplayable); |
|
39 |
|
40 CMIDAlertDialog(CMIDAlert* aAlert,CMIDDisplayable* aDisplayable); |
|
41 ~CMIDAlertDialog(); |
|
42 void SetGaugeL(CMIDGaugeItem* aGauge); |
|
43 void PreLayoutDynInitL(); |
|
44 void PostLayoutDynInitL(); |
|
45 |
|
46 void UpdateCbasL(); |
|
47 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
48 TBool OkToExitL(TInt aCommandId); |
|
49 |
|
50 void InsertGaugeIntoDialogL(); |
|
51 void CheckAndSetAnimationModeL(); |
|
52 |
|
53 // from MMIDGaugeToAlertListner |
|
54 void UpdateGaugeInAlert(TInt aValue); |
|
55 void GaugeTypeInAlertChangedL(); |
|
56 |
|
57 void ShowL(TBool aShow); |
|
58 void DisableVisibilityChange(TBool aDisable); |
|
59 |
|
60 public: // from CCoeControl |
|
61 void MakeVisible(TBool aVisible); |
|
62 void SizeChanged(); |
|
63 #ifdef RD_SCALABLE_UI_V2 |
|
64 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
65 #endif |
|
66 |
|
67 protected: //MMIDGaugeToAlertListner |
|
68 void UpdateGaugeInAlertL(TInt aValue); |
|
69 |
|
70 void HandleResourceChange(TInt aType); |
|
71 |
|
72 #ifdef RD_SCALABLE_UI_V2 |
|
73 private: |
|
74 /** |
|
75 * Checks if the point given as a parameter belongs to the dialog region. |
|
76 * @param aPoint The point |
|
77 * @return TBool indicating if the point is in the dialog region. |
|
78 */ |
|
79 TBool AlertRegionContains(const TPoint& aPoint); |
|
80 #endif |
|
81 |
|
82 private: |
|
83 CMIDAlert* iParent; |
|
84 CMIDDisplayable* iDisplayable; |
|
85 |
|
86 CMIDNonInteractiveGauge* iGauge; |
|
87 TPopupFormControlType iGaugeResourceType; |
|
88 |
|
89 TInt iGaugeFrameCount; |
|
90 TInt iIncrementalFrameCounter; |
|
91 |
|
92 TBool iShowing; |
|
93 |
|
94 TBool iVisibilityChangeDisabled; |
|
95 #ifdef RD_SCALABLE_UI_V2 |
|
96 // When closing timed alerts, this boolean is needed in tracking |
|
97 // that at least one EButton1Down has been received |
|
98 TBool iButtonDownReceived; |
|
99 #endif |
|
100 }; |
|
101 |
|
102 #endif // CMIDALERTDIALOG_H |
|
103 |
|
104 // End of File |