|
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: Manages preview pane, info bar and toolbar for calendar views |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CALENCONTAINERLAYOUTMANAGER_H |
|
21 #define CALENCONTAINERLAYOUTMANAGER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <calenservices.h> // Calendar services |
|
25 #include "calencontainer.h" // CCalenContainer |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CAknToolbar; |
|
29 |
|
30 /** |
|
31 * CCalenNativeViewExtension |
|
32 * This class decides if a calendar view should additionally display a |
|
33 * preview pane or an info bar |
|
34 */ |
|
35 NONSHARABLE_CLASS( CCalenContainerLayoutManager ) : public CBase |
|
36 { |
|
37 public: |
|
38 |
|
39 enum TCalenContainerLayout |
|
40 { |
|
41 ECalenContainerToolbar, |
|
42 ECalenContainerInfobar, |
|
43 ECalenContainerPreview |
|
44 }; |
|
45 |
|
46 static CCalenContainerLayoutManager* NewL( |
|
47 MCalenServices& aServices, CCalenContainer& aContainer ); |
|
48 |
|
49 ~CCalenContainerLayoutManager(); |
|
50 |
|
51 public: |
|
52 TBitFlags LayoutFlags(); |
|
53 CCoeControl* ControlOrNull(); |
|
54 void GetLayoutAndExtensionL(); |
|
55 CAknToolbar* ToolbarOrNull(); |
|
56 void SetToolbarVisibility( TBool aVisible ); |
|
57 |
|
58 void HandleResourceChange( TInt aType ); |
|
59 |
|
60 private: |
|
61 CCalenContainerLayoutManager( MCalenServices& aServices, CCalenContainer& aContainer ); |
|
62 void ConstructL(); |
|
63 |
|
64 void CheckPreviewL(); |
|
65 void CheckInfobarL(); |
|
66 void CheckToolbarL(); |
|
67 |
|
68 private: |
|
69 CCalenContainer& iContainer; // Calendar Container |
|
70 MCalenServices& iServices; // Calendar Services |
|
71 CCoeControl* iInfobar; // Info bar, owned by a plugin |
|
72 CAknToolbar* iToolbar; // Toolbar, owned by the appui |
|
73 TBitFlags iLayoutFlags; // Bitfield for current layout |
|
74 }; |
|
75 |
|
76 #endif // CALENCONTAINERLAYOUTMANAGER_H |
|
77 |
|
78 |
|
79 // End of file |