|
1 /* |
|
2 * Copyright (c) 2005 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 the License "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 * Declaration of class CBrowserWindowSelectionContainer. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef BROWSERWINDOWSELECTIONCONTAINER_H |
|
22 #define BROWSERWINDOWSELECTIONCONTAINER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <coecntrl.h> |
|
26 #include <AknTabObserver.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CBrowserWindowSelectionView; |
|
30 class CAknNavigationControlContainer; |
|
31 class CAknNavigationDecorator; |
|
32 class CAknTabGroup; |
|
33 class CEikImage; |
|
34 class CGulIcon; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * CBrowserWindowSelectionContainer container control class. |
|
40 * |
|
41 */ |
|
42 class CBrowserWindowSelectionContainer : public CCoeControl, |
|
43 MCoeControlObserver, MAknTabObserver |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * default constructor. |
|
49 * @param aRect Frame rectangle for container. |
|
50 */ |
|
51 void ConstructL(const TRect& aRect); |
|
52 |
|
53 /** |
|
54 * Constructor |
|
55 */ |
|
56 CBrowserWindowSelectionContainer( CBrowserWindowSelectionView *aView ); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 ~CBrowserWindowSelectionContainer(); |
|
62 |
|
63 public: // New functions |
|
64 |
|
65 /** |
|
66 * Gets a pointer to the tab group on navi pane. |
|
67 * @return Pointer to the tab group. |
|
68 */ |
|
69 inline CAknTabGroup* GetTabGroup() { return iTabGroup; } |
|
70 |
|
71 /** |
|
72 * Gets a pointer to the decorator on navi pane. |
|
73 * @return Pointer to the decorator. |
|
74 */ |
|
75 inline CAknNavigationDecorator* GetNaviDecorator() { return iNaviDecorator; } |
|
76 |
|
77 /** |
|
78 * Creates tabs on navipane, from the array of strings. |
|
79 * @param An array containing the name of the windows. |
|
80 * @param The tab index, that will be activated after creation. |
|
81 */ |
|
82 void ChangeTabL( CArrayFixFlat<HBufC*>* aTabTexts, TInt aActivateTab ); |
|
83 |
|
84 /** |
|
85 * The id of the window, which thumbnail to get. |
|
86 * @param aWindowId Window id. |
|
87 */ |
|
88 void GetWindowThumbnailL( TInt aWindowId ); |
|
89 |
|
90 public: // Functions from base classes |
|
91 /** |
|
92 * HandlePointerEventL |
|
93 * From CCoeControl |
|
94 * |
|
95 */ |
|
96 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
97 |
|
98 /** |
|
99 * TabChangedL |
|
100 * From MAknTabObserver |
|
101 * |
|
102 */ |
|
103 void TabChangedL(TInt aIndex); |
|
104 |
|
105 private: // Functions from base classes |
|
106 |
|
107 /** |
|
108 * From CoeControl,SizeChanged. |
|
109 */ |
|
110 void SizeChanged(); |
|
111 |
|
112 /** |
|
113 * From CoeControl,CountComponentControls. |
|
114 */ |
|
115 TInt CountComponentControls() const; |
|
116 |
|
117 /** |
|
118 * From CCoeControl,ComponentControl. |
|
119 */ |
|
120 CCoeControl* ComponentControl(TInt aIndex) const; |
|
121 |
|
122 /** |
|
123 * From CCoeControl,Draw. |
|
124 */ |
|
125 void Draw(const TRect& aRect) const; |
|
126 |
|
127 /** |
|
128 * From CCoeControl Handles key events |
|
129 */ |
|
130 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
131 |
|
132 /** |
|
133 * From MCoeControlObserver |
|
134 * Acts upon changes in the hosted control's state. |
|
135 * |
|
136 * @param aControl The control changing its state |
|
137 * @param aEventType The type of control event |
|
138 */ |
|
139 void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
|
140 |
|
141 private: //data |
|
142 CBrowserWindowSelectionView* iView; // not owned |
|
143 CAknNavigationDecorator* iNaviDecorator; // not owned |
|
144 CAknTabGroup* iTabGroup; // not owned |
|
145 CGulIcon* iThumbnail; |
|
146 //test |
|
147 //CFbsBitmap* iThumbnail; |
|
148 //CEikImage* iTabIcon; |
|
149 }; |
|
150 |
|
151 #endif |
|
152 |
|
153 // End of File |