|
1 /* |
|
2 * Copyright (c) 2007 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: A control for action menu component |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "emailtrace.h" |
|
20 #include "fsactionmenucontrol.h" |
|
21 #include "fsactionmenu.h" |
|
22 // <cmail> SF |
|
23 |
|
24 #include <alf/alfenv.h> |
|
25 #include <alf/alfvisual.h> |
|
26 // </cmail> |
|
27 |
|
28 // --------------------------------------------------------------------------- |
|
29 // C++ constructor. |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 CFsActionMenuControl::CFsActionMenuControl( CFsActionMenu* aActionMenu ) |
|
33 :iActionMenu ( aActionMenu ) |
|
34 { |
|
35 FUNC_LOG; |
|
36 |
|
37 } |
|
38 |
|
39 |
|
40 // --------------------------------------------------------------------------- |
|
41 // Second-phase constructor. |
|
42 // --------------------------------------------------------------------------- |
|
43 // |
|
44 void CFsActionMenuControl::ConstructL( CAlfEnv& aEnv ) |
|
45 { |
|
46 FUNC_LOG; |
|
47 CAlfControl::ConstructL( aEnv ); |
|
48 } |
|
49 |
|
50 |
|
51 // --------------------------------------------------------------------------- |
|
52 // Destructor. |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 CFsActionMenuControl::~CFsActionMenuControl() |
|
56 { |
|
57 FUNC_LOG; |
|
58 |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 // --------------------------------------------------------------------------- |
|
64 // |
|
65 void CFsActionMenuControl::SetRootVisual( CAlfVisual* aVisual ) |
|
66 { |
|
67 FUNC_LOG; |
|
68 iVisual = aVisual; |
|
69 } |
|
70 |
|
71 |
|
72 // --------------------------------------------------------------------------- |
|
73 // From CAlfControl. |
|
74 // Notifies the owner that the layout of a visual has been recalculated. |
|
75 // --------------------------------------------------------------------------- |
|
76 // |
|
77 void CFsActionMenuControl::VisualLayoutUpdated( CAlfVisual& aVisual ) |
|
78 { |
|
79 FUNC_LOG; |
|
80 if ( &aVisual == iVisual ) |
|
81 { |
|
82 iVisual->ClearFlag(EAlfVisualFlagLayoutUpdateNotification); |
|
83 TRAP_IGNORE( iActionMenu->RootLayoutUpdatedL() ); // <cmail> |
|
84 iVisual->SetFlag(EAlfVisualFlagLayoutUpdateNotification); |
|
85 } |
|
86 } |
|
87 |
|
88 // End of File |
|
89 |