|
1 /* |
|
2 * Copyright (c) 2006 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: Location Notation Preferences Plugin View's container |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_LOCNOTPREFPLUGINCONTAINER_H_ |
|
19 #define C_LOCNOTPREFPLUGINCONTAINER_H_ |
|
20 |
|
21 // System Includes |
|
22 #include <e32base.h> |
|
23 #include <coecntrl.h> |
|
24 #include <eiklbo.h> |
|
25 |
|
26 // Forward Declarations |
|
27 class MDesCArray; |
|
28 class MLocNotPrefPluginCmdHdlr; |
|
29 class CAknSettingStyleListBox; |
|
30 |
|
31 // Class Definition |
|
32 |
|
33 /** |
|
34 * Container for the CLocNotPrefPluginView. |
|
35 */ |
|
36 class CLocNotPrefPluginContainer : public CCoeControl, |
|
37 public MEikListBoxObserver |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Static Two phase contructor that instantiates the CLocNotPrefPluginContainer |
|
42 * |
|
43 * @param aRect Client rectangle |
|
44 * @param aListBoxModel Model for the container's list box |
|
45 * @param aCmdHandler List box command handler |
|
46 * @return CLocNotPrefPluginContainer* Reference to the object created |
|
47 */ |
|
48 static CLocNotPrefPluginContainer* NewL( |
|
49 const TRect& aRect, |
|
50 MDesCArray& aListBoxModel, |
|
51 MLocNotPrefPluginCmdHdlr& aCmdHandler ); |
|
52 |
|
53 /** |
|
54 * Static Two phase contructor that instantiates the CLocNotPrefPluginContainer |
|
55 * Leaves the object on the Cleanup stack |
|
56 * |
|
57 * @param aRect Client rectangle |
|
58 * @param aListBoxModel Model for the container's list box |
|
59 * @param aCmdHandler List box command handler |
|
60 * @return CLocNotPrefPluginContainer* Reference to the object created |
|
61 */ |
|
62 static CLocNotPrefPluginContainer* NewLC( |
|
63 const TRect& aRect, |
|
64 MDesCArray& aListBoxModel, |
|
65 MLocNotPrefPluginCmdHdlr& aCmdHandler ); |
|
66 /** |
|
67 * Destructor |
|
68 */ |
|
69 ~CLocNotPrefPluginContainer(); |
|
70 |
|
71 /** |
|
72 * Returns the currentlt focussed element. |
|
73 * |
|
74 * @return TInt Index of the item selected |
|
75 */ |
|
76 TInt GetFocussedItem(); |
|
77 |
|
78 /** |
|
79 * Inherited from CCoeControl |
|
80 */ |
|
81 void HandleResourceChange(TInt aType); |
|
82 |
|
83 /** |
|
84 * From CoeControl |
|
85 */ |
|
86 TInt CountComponentControls() const; |
|
87 |
|
88 /** |
|
89 * From CCoeControl |
|
90 */ |
|
91 CCoeControl* ComponentControl(TInt aIndex) const; |
|
92 |
|
93 /** |
|
94 * Inherited from CCoeControl |
|
95 */ |
|
96 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
97 TEventCode aType ); |
|
98 |
|
99 /** |
|
100 * Inherited from MEikListBoxObserver |
|
101 */ |
|
102 void HandleListBoxEventL( CEikListBox* aListBox, |
|
103 TListBoxEvent aEventType ); |
|
104 |
|
105 /** |
|
106 * Returns the help context |
|
107 * |
|
108 * @param aContext The help context that has to be determined |
|
109 */ |
|
110 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
111 |
|
112 /** |
|
113 * Handles the pointer events |
|
114 */ |
|
115 void HandlePointerEventL( const TPointerEvent &aPointerEvent ); |
|
116 |
|
117 protected: |
|
118 /** |
|
119 * Handles Focus Change to list |
|
120 */ |
|
121 void FocusChanged(TDrawNow aDrawNow); |
|
122 |
|
123 /** |
|
124 * From CoeControl,SizeChanged. |
|
125 */ |
|
126 void SizeChanged(); |
|
127 |
|
128 private: |
|
129 /** |
|
130 * Overloaded Constructor |
|
131 */ |
|
132 CLocNotPrefPluginContainer( MDesCArray& aListBoxModel, |
|
133 MLocNotPrefPluginCmdHdlr& aCmdHandler ); |
|
134 |
|
135 /** |
|
136 * Second phase of the two phase Construction process |
|
137 */ |
|
138 void ConstructL( const TRect& aRect ); |
|
139 |
|
140 /** |
|
141 * Creates the List box and the Listbox model. Associates the |
|
142 * list box model wit the list box |
|
143 * |
|
144 */ |
|
145 void CreateListboxL(); |
|
146 |
|
147 /** |
|
148 * Sets the Title text |
|
149 * @param aResourceText Resource to create title |
|
150 */ |
|
151 void MakeTitleL( TInt aResourceText ); |
|
152 |
|
153 /** |
|
154 * Returns the Appui's status pane |
|
155 * @return CEikStatusPane* Statuspane pointer |
|
156 */ |
|
157 CEikStatusPane* StatusPane(); |
|
158 |
|
159 private: |
|
160 /** |
|
161 * Reference to the List box model |
|
162 */ |
|
163 MDesCArray& iListBoxModel; |
|
164 |
|
165 /** |
|
166 * Reference to the List box command handler |
|
167 */ |
|
168 MLocNotPrefPluginCmdHdlr& iCmdHandler; |
|
169 |
|
170 /** |
|
171 * Settings list box for SUPL settings |
|
172 * Owns |
|
173 */ |
|
174 CAknSettingStyleListBox* iListBox; |
|
175 |
|
176 /** |
|
177 * Help context |
|
178 */ |
|
179 TCoeContextName iContextName; |
|
180 |
|
181 }; |
|
182 |
|
183 #endif // C_LOCNOTPREFPLUGINCONTAINER_H_ |
|
184 |