|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * STM's Received Calls view control container |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __Logs_App_CLogsRecentListControlContainer_H__ |
|
21 #define __Logs_App_CLogsRecentListControlContainer_H__ |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include "CLogsBaseControlContainer.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CCoeControl; |
|
29 class CAknDoubleGraphicStyleListBox; |
|
30 class CLogsRecentListView; |
|
31 class MLogsUiControlExtension; |
|
32 class CLogsRecentListAdapter; |
|
33 |
|
34 // CLASS DECLARATIONS |
|
35 |
|
36 /** |
|
37 * STM's Received Calls view control container |
|
38 */ |
|
39 class CLogsRecentListControlContainer : public CLogsBaseControlContainer |
|
40 { |
|
41 public: // interface |
|
42 /** |
|
43 * Create the STM app view control container |
|
44 * |
|
45 * @param aRecentView, pointer to view |
|
46 * @param aRect, client rect size |
|
47 * |
|
48 * @return New STM app view control container object |
|
49 */ |
|
50 static CLogsRecentListControlContainer* NewL |
|
51 ( CLogsRecentListView* aView |
|
52 , const TRect& aRect |
|
53 ); |
|
54 |
|
55 /** |
|
56 * Destructor |
|
57 */ |
|
58 ~CLogsRecentListControlContainer(); |
|
59 |
|
60 private: |
|
61 /** |
|
62 * C++ Constructor |
|
63 * |
|
64 * @param aAppView Application view's pointer |
|
65 */ |
|
66 CLogsRecentListControlContainer( CLogsRecentListView* aView ); |
|
67 |
|
68 /** |
|
69 * Constructor - Second Phase |
|
70 * |
|
71 * @param aRect, client rect size. |
|
72 */ |
|
73 void ConstructL( const TRect& aRect ); |
|
74 |
|
75 public: |
|
76 /** |
|
77 * Get method to iListBox |
|
78 * |
|
79 * @return iListBox |
|
80 */ |
|
81 CAknDoubleGraphicStyleListBox* ListBox(); |
|
82 |
|
83 /** |
|
84 * Force an empty listbox text |
|
85 */ |
|
86 void ForceEmptyTextListBox(); |
|
87 |
|
88 /** |
|
89 * Return empty listbox resource id |
|
90 * @return recent list specific emptylistbox resource id |
|
91 */ |
|
92 TInt EmptyListboxResourceL() const; |
|
93 |
|
94 /** |
|
95 * ControlExtension |
|
96 * @return ControlExtension |
|
97 */ |
|
98 MLogsUiControlExtension* ControlExtension(); |
|
99 |
|
100 /** |
|
101 * CLogsRecentListView |
|
102 * @return CLogsRecentListView |
|
103 */ |
|
104 CLogsRecentListView* View(); |
|
105 |
|
106 /** |
|
107 * Disabled, possible future need: Initiate some other type of call |
|
108 * with a long tap event (like video call). |
|
109 * |
|
110 * Overrides baseclass callback function for CAknLongTapDetector member object. |
|
111 * |
|
112 * @param aPenEventLocation Long tap event location relative to parent control |
|
113 * @param aPenEventScreenLocation Long tap event location relative to screen |
|
114 */ |
|
115 //void HandleLongTapEventL( const TPoint& aPenEventLocation, |
|
116 // const TPoint& aPenEventScreenLocation ); |
|
117 |
|
118 private: |
|
119 /** |
|
120 * Append Phone type icons to icon array |
|
121 * |
|
122 * @param aIcons Icon array |
|
123 */ |
|
124 /********************************************************************** |
|
125 //Not in use anymore, Phonebook icons replaced by own icons |
|
126 void AddPhoneTypeIconsL( CAknIconArray* aIcons ); |
|
127 **********************************************************************/ |
|
128 |
|
129 /** |
|
130 * Create extension control |
|
131 */ |
|
132 void CreateControlExtensionL(); |
|
133 |
|
134 /** |
|
135 * Handles focus change events. This will hand over focus changes to list so that |
|
136 * focus animations are displayed on the list. |
|
137 */ |
|
138 void FocusChanged(TDrawNow aDrawNow); |
|
139 |
|
140 protected: // from CCoeControl |
|
141 /** |
|
142 * Get the sub control at aIndex |
|
143 * |
|
144 * @param aIndex Pointer aIndex |
|
145 * |
|
146 * @return Sub control at aIndex |
|
147 */ |
|
148 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
149 |
|
150 /** |
|
151 * Called when the control's size has changed |
|
152 */ |
|
153 void SizeChanged(); |
|
154 |
|
155 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
156 |
|
157 protected: // CLogsBaseControlContainer |
|
158 /** |
|
159 * Called from HandleResourceChange. Calls AddIconL funtion |
|
160 * for each icon in the list box. |
|
161 * |
|
162 */ |
|
163 void AddControlContainerIconsL(); |
|
164 |
|
165 public: |
|
166 /** |
|
167 * Update contents |
|
168 */ |
|
169 void UpdateL(); |
|
170 |
|
171 private: // data |
|
172 /// Received control's pointer |
|
173 CAknDoubleGraphicStyleListBox* iListBox; |
|
174 |
|
175 /// Ref: Recent view |
|
176 CLogsRecentListView* iView; |
|
177 |
|
178 /// Own: control extension |
|
179 MLogsUiControlExtension* iControlExtension; |
|
180 |
|
181 // Offset n of last own icon in icon array (icons 0 to n). Note, in the |
|
182 // same icon array may be additional icons that are loaded and used by |
|
183 // control extension (icons n+1 to m). |
|
184 TInt iLastOwnIconOffset; |
|
185 |
|
186 //Ref: listbox adapter |
|
187 CLogsRecentListAdapter* iAdapter; |
|
188 |
|
189 }; |
|
190 |
|
191 #endif // __Logs_App_CLogsRecentListControlContainer_H__ |
|
192 |
|
193 // End of File |