|
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: |
|
15 * A foreground observer control in the status pane's navigation pane. |
|
16 * |
|
17 * |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef AKNNAVIFOREGROUNDOBSERVER_H |
|
23 #define AKNNAVIFOREGROUNDOBSERVER_H |
|
24 |
|
25 #include <coecntrl.h> |
|
26 #include <coemain.h> |
|
27 #include "aknnavi.h" |
|
28 |
|
29 class MAknTabObserver; |
|
30 |
|
31 /** |
|
32 * Observer which holds the status of the foreground/background state of the |
|
33 * navipane. |
|
34 * |
|
35 */ |
|
36 NONSHARABLE_CLASS(CAknNaviForegroundObserver) : public CCoeControl, |
|
37 public MCoeForegroundObserver |
|
38 { |
|
39 public: |
|
40 /** Destructor */ |
|
41 ~CAknNaviForegroundObserver(); |
|
42 |
|
43 static CAknNaviForegroundObserver* NewL(CAknNavigationControlContainer* aParent); |
|
44 static CAknNaviForegroundObserver* NewLC(CAknNavigationControlContainer* aParent); |
|
45 |
|
46 /** Control is in foreground or not */ |
|
47 TBool HasForegroundGained(); |
|
48 |
|
49 public: // From MCoeForegroundObserver |
|
50 |
|
51 /** Handles the application coming to the foreground. */ |
|
52 void HandleGainingForeground(); |
|
53 /** Handles the application going into the background. */ |
|
54 void HandleLosingForeground(); |
|
55 |
|
56 private: |
|
57 /** Standard constructor */ |
|
58 CAknNaviForegroundObserver(); |
|
59 |
|
60 void ConstructL(CAknNavigationControlContainer* aParent); |
|
61 |
|
62 private: |
|
63 TBool iHasForegroundGained; |
|
64 CAknNavigationControlContainer* iParent; |
|
65 }; |
|
66 |
|
67 #endif // AKNNAVIFOREGROUNDOBSERVER_H |