|
1 /* |
|
2 * Copyright (c) 2008-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: CoeControl utility |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_GLXUIUTILITYCOECONTROL_H |
|
22 #define C_GLXUIUTILITYCOECONTROL_H |
|
23 |
|
24 #include <aknutils.h> |
|
25 #include <uiacceltk/huidisplaycoecontrol.h> |
|
26 #include <uiacceltk/huienv.h> |
|
27 |
|
28 /** |
|
29 * CGlxUiUtilityCoeControl |
|
30 * |
|
31 * Utility to handle display orientation changes. |
|
32 * |
|
33 * @lib glxhuiutils.lib |
|
34 * |
|
35 * @internal reviewed 12/06/2007 by Dave Schofield |
|
36 */ |
|
37 NONSHARABLE_CLASS( CGlxUiUtilityCoeControl ) : public CHuiDisplayCoeControl |
|
38 { |
|
39 public: // the API |
|
40 |
|
41 /** |
|
42 * Static factory method for constructing a new instance of |
|
43 * CGlxUiUtilityCoeControl. |
|
44 * @param aEnv the HUI environment |
|
45 * @param aArea the area for the control |
|
46 * @ref AknLayoutUtils::TAknLayoutMetrics |
|
47 * @param aFlags the screen creation flag |
|
48 * @ref CHuiEnv::TNewDisplayFlags |
|
49 */ |
|
50 static CGlxUiUtilityCoeControl* NewL( |
|
51 CHuiEnv& aEnv, |
|
52 AknLayoutUtils::TAknLayoutMetrics aArea = AknLayoutUtils::EScreen, |
|
53 TInt aFlags = CHuiEnv::ENewDisplayFullScreen ); |
|
54 |
|
55 /** |
|
56 * Destructor |
|
57 */ |
|
58 ~CGlxUiUtilityCoeControl(); |
|
59 |
|
60 /** |
|
61 * Set the area for the control. |
|
62 * @param aArea the area for the control |
|
63 * @ref AknLayoutUtils::TAknLayoutMetrics |
|
64 * @return aRect the rect corresponding to the area |
|
65 */ |
|
66 TRect SetArea( AknLayoutUtils::TAknLayoutMetrics aArea ); |
|
67 |
|
68 private: // Implementation |
|
69 |
|
70 /** |
|
71 * C++ constructor |
|
72 * @param aEnv the Hui environment |
|
73 */ |
|
74 CGlxUiUtilityCoeControl( CHuiEnv& aEnv ); |
|
75 |
|
76 /** |
|
77 * Second-phase constructor |
|
78 * @param aArea the area for the control |
|
79 * @ref AknLayoutUtils::TAknLayoutMetrics |
|
80 * @param aFlags the screen creation flag |
|
81 * @ref CHuiEnv::TNewDisplayFlags |
|
82 */ |
|
83 void ConstructL( AknLayoutUtils::TAknLayoutMetrics aArea, TInt aFlags ); |
|
84 |
|
85 /** |
|
86 * Handles resource change. From CCoeControl |
|
87 * |
|
88 * @ref CCoeControl::HandleResourceChange |
|
89 */ |
|
90 void HandleResourceChange( TInt aType ); |
|
91 |
|
92 private: |
|
93 |
|
94 /// Own: the area for the display |
|
95 AknLayoutUtils::TAknLayoutMetrics iArea; |
|
96 |
|
97 /** Pointer to the appui (not owned) */ |
|
98 CCoeAppUi* iAppUi; |
|
99 |
|
100 }; |
|
101 |
|
102 |
|
103 #endif // C_GLXUIUTILITYCOECONTROL_H |
|
104 |