26
|
1 |
/*
|
|
2 |
* Copyright (c) 2008-2009 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: Carousel control class
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef C_GLXCLOUDVIEWCONTROL_H
|
|
22 |
#define C_GLXCLOUDVIEWCONTROL_H
|
|
23 |
|
|
24 |
// INCLUDES
|
|
25 |
|
|
26 |
#include <alf/ialfwidgeteventhandler.h>
|
|
27 |
#include <osn/ustring.h>
|
|
28 |
#include <alf/alfscrollevents.h>
|
|
29 |
#include <alf/ialfscrollbarwidget.h>
|
|
30 |
|
|
31 |
//use includes
|
|
32 |
#include <mglxmedialistobserver.h>
|
|
33 |
#include "glxcontainerinfobubble.h"
|
|
34 |
#include "glxbubbletimer.h" //for timer functionality
|
|
35 |
#include "glxcloudinfo.h"
|
|
36 |
#include <alf/alfeventhandler.h>
|
|
37 |
|
|
38 |
#include <AknLayout2Def.h>
|
|
39 |
#include <aknphysicsobserveriface.h> //Physics - Kinetic scrolling listener
|
|
40 |
using namespace Alf;
|
|
41 |
|
|
42 |
|
|
43 |
// FORWARD DECLARATION
|
|
44 |
class MMPXViewUtility;
|
|
45 |
class MGlxUiCommandHandler;
|
|
46 |
class CAlfAnchorLayout;
|
|
47 |
class CAlfViewportLayout;
|
|
48 |
class CAlfControl;
|
|
49 |
class MGlxMediaList;
|
|
50 |
class CGlxDefaultAttributeContext;
|
|
51 |
class MMPXCollectionUtility;
|
|
52 |
class CGlxContainerInfoBubble;
|
|
53 |
class MTouchFeedback;
|
|
54 |
class MGlxCloudViewMskObserver;
|
|
55 |
class MGlxEnterKeyEventObserver;
|
|
56 |
class MGlxCloudViewLayoutObserver;
|
|
57 |
class CAknPhysics;
|
|
58 |
class CGlxTagsContextMenuControl ;
|
|
59 |
class MGlxItemMenuObserver;
|
|
60 |
|
|
61 |
enum TTagEventType
|
|
62 |
{
|
|
63 |
ECustomEventFocusDragScroll
|
|
64 |
};
|
|
65 |
/**
|
|
66 |
* CGlxCloudViewControl
|
|
67 |
* Alf-based Cloud control
|
|
68 |
* Creates a weighted list of items based on the associations.
|
|
69 |
*
|
|
70 |
*/
|
|
71 |
|
|
72 |
class CGlxCloudViewControl : public CAlfControl,public IAlfWidgetEventHandler
|
|
73 |
,public MGlxMediaListObserver
|
|
74 |
,public MAknPhysicsObserver
|
|
75 |
,public MGlxTimerNotifier
|
|
76 |
{
|
|
77 |
public:
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Perform the two phase construction
|
|
81 |
* @param aEnv - Env Variable of Alf
|
|
82 |
* @param aEmptyText - Specifies the text for the empty list
|
|
83 |
* @param aMediaList - medialist from which attributes will be fetched
|
|
84 |
* @return Pointer to newly created object
|
|
85 |
*/
|
|
86 |
static CGlxCloudViewControl *NewL(CAlfDisplay& aDisplay, CAlfEnv &aEnv,
|
|
87 |
MGlxMediaList& aMediaList, const TDesC& aEmptyText
|
|
88 |
,MGlxCloudViewMskObserver& aObserver
|
|
89 |
,MGlxEnterKeyEventObserver& aObserverEnterKeyEvent,
|
|
90 |
CAlfAnchorLayout *aAnchorLayout,
|
|
91 |
MGlxCloudViewLayoutObserver& aLayoutObserver
|
|
92 |
,MGlxItemMenuObserver& aItemMenuObserver);
|
|
93 |
|
|
94 |
/**
|
|
95 |
* Perform the two phase construction
|
|
96 |
* @param aEnv - Env Variable of Alf
|
|
97 |
* @param aEmptyText - Specifies the text for the empty list
|
|
98 |
* @param aMediaList - medialist from which attributes will be fetched
|
|
99 |
* @return Pointer to newly created object
|
|
100 |
*/
|
|
101 |
static CGlxCloudViewControl *NewLC(CAlfDisplay& aDisplay, CAlfEnv &aEnv,
|
|
102 |
MGlxMediaList& aMediaList, const TDesC& aEmptyText
|
|
103 |
,MGlxCloudViewMskObserver& aObserver
|
|
104 |
,MGlxEnterKeyEventObserver& aObserverEnterKeyEvent,
|
|
105 |
CAlfAnchorLayout *aAnchorLayout,MGlxCloudViewLayoutObserver& aLayoutObserver
|
|
106 |
,MGlxItemMenuObserver& aItemMenuObserver);
|
|
107 |
|
|
108 |
/**
|
|
109 |
* Destroy the object and release all memory objects
|
|
110 |
*/
|
|
111 |
~CGlxCloudViewControl();
|
|
112 |
|
|
113 |
public:
|
|
114 |
/**
|
|
115 |
* Used to identify event handlers that are capable of handling
|
|
116 |
* a specified key or custom event. Pointer event handlers cannot be
|
|
117 |
* identified directly, since they are dependent on the presentation.
|
|
118 |
* Therefore, pointer event handlers should be associated with
|
|
119 |
* a custom event ID that can be used to simulate the actual pointer event.
|
|
120 |
*
|
|
121 |
* @since S60 ?S60_version
|
|
122 |
* @param aEvent The event.
|
|
123 |
* @return <code>ETrue</code> if the event can be processed. Otherwise <code>EFalse</code>.
|
|
124 |
*/
|
|
125 |
bool accept ( CAlfWidgetControl& aControl, const TAlfEvent& aEvent ) const;
|
|
126 |
|
|
127 |
/**
|
|
128 |
* @see IAlfWidgetEventHandler
|
|
129 |
*/
|
|
130 |
virtual AlfEventStatus offerEvent ( CAlfWidgetControl& aControl, const TAlfEvent& aEvent );
|
|
131 |
|
|
132 |
|
|
133 |
/**
|
|
134 |
* Sets AlfWidgetEventHandlerInitData to event handler.
|
|
135 |
*
|
|
136 |
* @param aData A data structure which contains for example id of the event
|
|
137 |
* handler.
|
|
138 |
*/
|
|
139 |
virtual void setEventHandlerData( const AlfWidgetEventHandlerInitData& /*aData*/ )
|
|
140 |
{
|
|
141 |
}
|
|
142 |
|
|
143 |
/**
|
|
144 |
* Defines the widget states, where the event handler is active.
|
|
145 |
* By default, if this method is not called, the event handler is expected
|
|
146 |
* to be active in all states.
|
|
147 |
*
|
|
148 |
* @param aStates A bitmask defining the widget states, where the event
|
|
149 |
* handler is active. The low 16 bits are reserved for the states
|
|
150 |
* defined by the framework in <TODO: add reference>. The high 16 bits are
|
|
151 |
* available for states defined by the client code.
|
|
152 |
*/
|
|
153 |
void setActiveStates ( unsigned int aStates );
|
|
154 |
|
|
155 |
IAlfInterfaceBase* makeInterface ( const IfId& aType );
|
|
156 |
|
|
157 |
/**
|
|
158 |
* Returns the type of EventHandler.
|
|
159 |
* @see IAlfWidgetEventHandler::AlfEventHandlerType
|
|
160 |
*
|
|
161 |
* @return The type of event handler.
|
|
162 |
*/
|
|
163 |
AlfEventHandlerType eventHandlerType();
|
|
164 |
|
|
165 |
/**
|
|
166 |
* Returns information about the phase in the event handling cycle in
|
|
167 |
* which the event hadler will be executed.
|
|
168 |
* @see IAlfWidgetEventHandler::AlfEventHandlerExecutionPhase
|
|
169 |
*
|
|
170 |
* @return Event handler execution phase.
|
|
171 |
*/
|
|
172 |
AlfEventHandlerExecutionPhase eventExecutionPhase();
|
|
173 |
|
|
174 |
/**
|
|
175 |
* Returns AlfWidgetEventHandlerInitData.
|
|
176 |
*
|
|
177 |
* @return A pointer to AlfWidgetEventHandlerInitData structure which contains
|
|
178 |
* for example id of the event handler.
|
|
179 |
*/
|
|
180 |
virtual AlfWidgetEventHandlerInitData* eventHandlerData()
|
|
181 |
{
|
|
182 |
return NULL;
|
|
183 |
}
|
|
184 |
|
|
185 |
/**
|
|
186 |
* initialises data for scrollbar model
|
|
187 |
* @param scrollbar widget
|
|
188 |
*/
|
|
189 |
void InitializeScrollBar(IAlfScrollBarWidget* aScrollBarWidget);
|
|
190 |
|
|
191 |
/**
|
|
192 |
* Hides/shows the grid layout
|
|
193 |
* @param aShow - Show value
|
|
194 |
*/
|
|
195 |
void ShowContextItemMenuL(TBool aShow);
|
|
196 |
|
|
197 |
public://MGlxTimernotifier
|
|
198 |
/**
|
|
199 |
* Virtual Function from MGlxTimernotifier
|
|
200 |
*/
|
|
201 |
void TimerCompleteL();
|
|
202 |
|
|
203 |
private:
|
|
204 |
/**
|
|
205 |
* Perform the two phase construction
|
|
206 |
* @param aEvent - key Event to handle
|
|
207 |
* @return EKeyWasConsumed if key event is processed,
|
|
208 |
* otherwise EKeyWasNotConsumed
|
|
209 |
*/
|
|
210 |
TBool OfferEventL(const TAlfEvent &aEvent);
|
|
211 |
|
|
212 |
/**
|
|
213 |
* @function HandleKeyUp
|
|
214 |
*
|
|
215 |
*/
|
|
216 |
void HandleKeyUpL();
|
|
217 |
|
|
218 |
|
|
219 |
/**
|
|
220 |
* @since S60 3.2
|
|
221 |
*
|
|
222 |
*/
|
|
223 |
void HandleLayoutFocusChange();
|
|
224 |
|
|
225 |
/**
|
|
226 |
* @since S60 3.2
|
|
227 |
*
|
|
228 |
*/
|
|
229 |
void HandleKeyDownL();
|
|
230 |
/**
|
|
231 |
/**
|
|
232 |
* @since S60 3.2
|
|
233 |
*
|
|
234 |
*/
|
|
235 |
void UpdateLayout();
|
|
236 |
|
|
237 |
/**
|
|
238 |
* Displays the empty cloud view when there are no tags to diplay
|
|
239 |
*/
|
|
240 |
void DisplayEmptyCloudViewL();
|
|
241 |
|
|
242 |
|
|
243 |
/**
|
|
244 |
* constructor
|
|
245 |
* @param aEnv - Env Variable of Alf
|
|
246 |
* @param aMediaList - medialist from which attributes will be fetched
|
|
247 |
* @param aMediaList - medialist from which attributes will be fetched
|
|
248 |
*/
|
|
249 |
CGlxCloudViewControl(CAlfEnv &aEnv,
|
|
250 |
MGlxMediaList& aMediaList,MGlxCloudViewMskObserver& aObserver,MGlxEnterKeyEventObserver& aObserverEnterKeyEvent
|
|
251 |
,MGlxCloudViewLayoutObserver& aLayoutObserver);
|
|
252 |
|
|
253 |
/**
|
|
254 |
* Perform the two phase construction
|
|
255 |
* @param aStartPoint - start point for draeing the row
|
|
256 |
* @param aRowHeight - height of the row
|
|
257 |
* @param aRowStartIndex - start index of row
|
|
258 |
* @param aRowEndIndex- Index upto which items will be drawn
|
|
259 |
* @return
|
|
260 |
*/
|
|
261 |
TInt LayoutVisibleRows(TPoint aStartPoint,TInt aRowStartIndex, TInt
|
|
262 |
aRowEndIndex);
|
|
263 |
|
|
264 |
|
|
265 |
|
|
266 |
/**
|
|
267 |
* Perform the two phase construction
|
|
268 |
* @param aStartRowIndex - row index
|
|
269 |
* @return
|
|
270 |
*/
|
|
271 |
void LayoutVisibleArea(/*TInt aStartRowIndex*/);
|
|
272 |
|
|
273 |
/**
|
|
274 |
* returns the rownumber for a particular index.
|
|
275 |
* @param aItemIndex - row index
|
|
276 |
* @return rownum
|
|
277 |
*/
|
|
278 |
TInt RowNumber(TInt aItemIndex) const;
|
|
279 |
|
|
280 |
/**
|
|
281 |
* Updates the focus whenever there is a change in focus of the item.
|
|
282 |
*/
|
|
283 |
void FocusUpdate();
|
|
284 |
|
|
285 |
/**
|
|
286 |
* Perform the second phase of two phase construction
|
|
287 |
* @param aEmptyText - Specifies the text for the empty list
|
|
288 |
*/
|
|
289 |
void ConstructL(const TDesC& aEmptyText,CAlfDisplay& aDisplay,
|
|
290 |
CAlfAnchorLayout *aAnchorLayout,MGlxItemMenuObserver& aItemMenuObserver);
|
|
291 |
|
|
292 |
/**
|
|
293 |
* Updates Row Structure
|
|
294 |
*
|
|
295 |
*/
|
|
296 |
void UpdateRowDataL();
|
|
297 |
|
|
298 |
|
|
299 |
/**
|
|
300 |
* Returns maximum value of usage Count
|
|
301 |
*
|
|
302 |
*/
|
|
303 |
TInt MaxUsageCount();
|
|
304 |
|
|
305 |
|
|
306 |
/**
|
|
307 |
* @param aIndex - Media List Index
|
|
308 |
* Returns usage count for a given index
|
|
309 |
* */
|
|
310 |
TInt UsageCount(TInt aIndex);
|
|
311 |
|
|
312 |
|
|
313 |
|
|
314 |
/**
|
|
315 |
* @function FetchAttributeFromCacheL
|
|
316 |
*
|
|
317 |
* */
|
|
318 |
void FetchAttributeFromCacheL();
|
|
319 |
|
|
320 |
|
|
321 |
/**
|
|
322 |
* Utility method to add a TGlxCloudInfo struct into iCloudInfo array
|
|
323 |
* @param aCloudInfo The next item to add into iCloudinfo
|
|
324 |
* @param aRowHeight value of aCloudInfo.iRowHeight
|
|
325 |
* @param aStartIndex value of aCloudInfo.iStartIndex
|
|
326 |
* @param aEndIndex value of aCloudInfo.iEndIndex
|
|
327 |
* */
|
|
328 |
void AppendToCloudArrayL( TGlxCloudInfo& aCloudInfo,
|
|
329 |
const TInt& aStartIndex, const TInt& aEndIndex );
|
|
330 |
|
|
331 |
private: // from MAknPhysicsObserver
|
|
332 |
|
|
333 |
/*
|
|
334 |
* Observer to get notified about new position to be displayed in
|
|
335 |
* @param aNewPosition The new point where the virtual port should start from
|
|
336 |
* @param aDrawNow value to determine whether to draw at new position or not
|
|
337 |
* @param aFags Special value (not used here)
|
|
338 |
*/
|
|
339 |
void ViewPositionChanged( const TPoint& aNewPosition, TBool aDrawNow, TUint /*aFlags*/ );
|
|
340 |
|
|
341 |
/*
|
|
342 |
* Obsrever to get notified whether the physics emulation ended
|
|
343 |
*/
|
|
344 |
void PhysicEmulationEnded();
|
|
345 |
|
|
346 |
/*
|
|
347 |
* Observer callback used by CAknPhysics to know our current viewposition
|
|
348 |
* (which is with reference to displayable viewportposition + screeenheight/2)
|
|
349 |
* Returns current viewposition point
|
|
350 |
*/
|
|
351 |
TPoint ViewPosition() const;
|
|
352 |
|
|
353 |
|
|
354 |
private:
|
|
355 |
|
|
356 |
TBool IsLandscape();
|
|
357 |
|
|
358 |
/*
|
|
359 |
* Initializes the physcs library with total size, displayable size, etc
|
|
360 |
*/
|
|
361 |
void InitPhysicsL();
|
|
362 |
|
|
363 |
/**
|
|
364 |
* Sets focused item color
|
|
365 |
**/
|
|
366 |
void SetFocusColor();
|
|
367 |
|
|
368 |
|
|
369 |
/**
|
|
370 |
* Set the middle point of the infobuble
|
|
371 |
**/
|
|
372 |
void SetBubleMidPoint(TPoint& aMidPoint);
|
|
373 |
|
|
374 |
/**
|
|
375 |
* Move the viewport up depending on the condition
|
|
376 |
*
|
|
377 |
**/
|
|
378 |
void MoveUpIfRequired();
|
|
379 |
|
|
380 |
/**
|
|
381 |
* Move the viewport down depending on the condition
|
|
382 |
**/
|
|
383 |
void MoveDownIfRequired();
|
|
384 |
|
|
385 |
/**
|
|
386 |
* calculate the mid point of the bubble
|
|
387 |
**/
|
|
388 |
void CalculateBubleMidPoint();
|
|
389 |
|
|
390 |
public:
|
|
391 |
|
|
392 |
void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex,
|
|
393 |
MGlxMediaList* aList);
|
|
394 |
|
|
395 |
/**
|
|
396 |
* Notification that media object is now available for an item
|
|
397 |
* @param Index of the item
|
|
398 |
* @param aList List that this callback relates to
|
|
399 |
*/
|
|
400 |
void HandleMediaL(TInt aListIndex, MGlxMediaList* aList);
|
|
401 |
|
|
402 |
|
|
403 |
/**
|
|
404 |
* Notification that media item was removed from the list
|
|
405 |
* @param aStartIndex First item that was removed
|
|
406 |
* @param aEndIndex Last item that was removed
|
|
407 |
* @param aList List that this callback relates to
|
|
408 |
*/
|
|
409 |
void HandleItemRemovedL(TInt aStartIndex, TInt aEndIndex,
|
|
410 |
MGlxMediaList* aList);
|
|
411 |
|
|
412 |
/**
|
|
413 |
* Notification that media item was changed
|
|
414 |
* @param aItemIndexes Indexes of items that were changed
|
|
415 |
* @param aList List that this callback relates to
|
|
416 |
*/
|
|
417 |
void HandleItemModifiedL(const RArray<TInt>& aItemIndexes,
|
|
418 |
MGlxMediaList* aList);
|
|
419 |
|
|
420 |
/**
|
|
421 |
* Notification that an attribute is available
|
|
422 |
* @param aItemIndex Index of the for which the thumbnail is available
|
|
423 |
* @param aAttributes Array of attributes that have become available
|
|
424 |
* @param aList List that this callback relates to
|
|
425 |
*/
|
|
426 |
void HandleAttributesAvailableL(TInt aItemIndex,
|
|
427 |
const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList);
|
|
428 |
|
|
429 |
/**
|
|
430 |
* Notification that focus has moved
|
|
431 |
* @param aType the direction of the focus change
|
|
432 |
* @param aNewIndex the new index after the focus change
|
|
433 |
* @param aOldIndex the old index before the focus change
|
|
434 |
* @param aList List that this callback relates to
|
|
435 |
*/
|
|
436 |
void HandleFocusChangedL(NGlxListDefs::TFocusChangeType aType, TInt aNewIndex,
|
|
437 |
TInt aOldIndex, MGlxMediaList* aList);
|
|
438 |
|
|
439 |
/**
|
|
440 |
* Notification that an item has been selected/deselected
|
|
441 |
* @param aIndex Index of the item that has been selected/deselected
|
|
442 |
* @param aSelected Boolean to indicate selection/deselection
|
|
443 |
* @param aList List that the selection relates to
|
|
444 |
*/
|
|
445 |
void HandleItemSelectedL(TInt aIndex, TBool aSelected, MGlxMediaList* aList);
|
|
446 |
|
|
447 |
/**
|
|
448 |
* Notification from the collection. E.g. Items added/modified/deleted and progress notifications
|
|
449 |
* @param aMessage Message notification from the collection
|
|
450 |
* @param aList List that the notification relates to
|
|
451 |
*/
|
|
452 |
void HandleMessageL(const CMPXMessage& aMessage, MGlxMediaList* aList);
|
|
453 |
|
|
454 |
/**
|
|
455 |
* Notification from the collection that the medialist is populated
|
|
456 |
* @param aList List that the notification relates to
|
|
457 |
*/
|
|
458 |
void HandlePopulatedL(MGlxMediaList* /*aList*/);
|
|
459 |
|
|
460 |
/**
|
|
461 |
* Notification from the collection. E.g. Items added/modified/deleted and progress notifications
|
|
462 |
* @param aIndex Index of the item for which property needs to be set
|
|
463 |
* @param aScale Scale parameter to decide the properties of item
|
|
464 |
*/
|
|
465 |
void SetPropertiesL(TInt aIndex, TInt aScale);
|
|
466 |
|
|
467 |
/**
|
|
468 |
* Called whenever the resolution is changed
|
|
469 |
*/
|
|
470 |
void VisualLayoutUpdated(CAlfVisual & aVisual);
|
|
471 |
|
|
472 |
private:
|
|
473 |
|
|
474 |
/**
|
|
475 |
* Handle the pointer event
|
|
476 |
* @param aEvent event describing the gesture
|
|
477 |
*/
|
|
478 |
TBool HandlePointerEventL( const TAlfEvent &aEvent );
|
|
479 |
|
|
480 |
/**
|
|
481 |
* Handles the drag events
|
|
482 |
* @param pointer event generated because of drag
|
|
483 |
* @return returns whether the pointer event is consumed or not
|
|
484 |
*/
|
|
485 |
TBool HandleDragL(const TPointerEvent& aPointerEvent);
|
|
486 |
|
|
487 |
/**
|
|
488 |
* checks the visual on which the drag event is generated
|
|
489 |
* @param position where the drag event has ocuured
|
|
490 |
* @return the index of the visual that needs to be focused
|
|
491 |
*/
|
|
492 |
TInt GetAbsoluteIndex(const TPoint& aPosition);
|
|
493 |
|
|
494 |
/**
|
|
495 |
* Checks which visual lies below/above the focused item and sets the focus
|
|
496 |
* @param the row number that needs to be checked for getting the overlaping visual
|
|
497 |
*/
|
|
498 |
void SetRelativeFocusL(TInt aRowNumber);
|
|
499 |
|
|
500 |
/**
|
|
501 |
* Updates layout when orientation is changed
|
|
502 |
*/
|
|
503 |
void UpdateLayoutL();
|
|
504 |
|
|
505 |
private:
|
|
506 |
/**
|
|
507 |
* Send the scroll custom event to scrollbar widget
|
|
508 |
*/
|
|
509 |
void Scroll();
|
|
510 |
|
|
511 |
/**
|
|
512 |
* decide the scrollbar new position
|
|
513 |
* @param number of steps which is used to determine the amout to be scrolled
|
|
514 |
*/
|
|
515 |
void UpdateScrollBar(TInt aNumberOfSteps, TBool aDiff = ETrue);
|
|
516 |
|
|
517 |
/**
|
|
518 |
* Display the scrollbar only if there are items
|
|
519 |
* @param visibility
|
|
520 |
*/
|
|
521 |
void DisplayScrollBar();
|
|
522 |
|
|
523 |
private:
|
|
524 |
|
|
525 |
// The Alf Environment
|
|
526 |
CAlfEnv& iEnv;
|
|
527 |
|
|
528 |
//Parent layout for viewportayout
|
|
529 |
CAlfAnchorLayout* iViewPortParentLayout;
|
|
530 |
|
|
531 |
//ViewPortLayout
|
|
532 |
CAlfViewportLayout* iViewPortLayout;
|
|
533 |
|
|
534 |
//Anchor layout for tags
|
|
535 |
CAlfAnchorLayout *iLayout;
|
|
536 |
|
|
537 |
//medialist not owned
|
|
538 |
MGlxMediaList& iMediaList;
|
|
539 |
|
|
540 |
//Array of Cloud visuals.
|
|
541 |
RPointerArray <CAlfTextVisual> iLabels;
|
|
542 |
|
|
543 |
// Array for information of cloud visuals.
|
|
544 |
RArray <TGlxCloudInfo> iCloudInfo;
|
|
545 |
|
|
546 |
//Ui Utility
|
|
547 |
CGlxUiUtility* iUiUtility;
|
|
548 |
|
|
549 |
// Visual for empty string display
|
|
550 |
CAlfTextVisual *iEmptyString;
|
|
551 |
|
|
552 |
// FocusIndex keeps track of the focussed item
|
|
553 |
TInt iScrollDirection;
|
|
554 |
|
|
555 |
// FocusIndex keeps track of the focussed row
|
|
556 |
TInt iFocusRowIndex;
|
|
557 |
|
|
558 |
// EndRowindex keeps track of the end row
|
|
559 |
TInt iEndRowIndex;
|
|
560 |
|
|
561 |
//keeps track of the end row
|
|
562 |
TInt iLayoutIndex;
|
|
563 |
|
|
564 |
// Fetch context for list item attributes
|
|
565 |
CGlxDefaultAttributeContext* iAttributeContext;
|
|
566 |
|
|
567 |
// for storing screen height
|
|
568 |
TInt iScreenHeight;
|
|
569 |
|
|
570 |
// List event observer
|
|
571 |
MGlxCloudViewMskObserver& iObserver;
|
|
572 |
|
|
573 |
// stores the text for empty view
|
|
574 |
HBufC* iEmptyText;
|
|
575 |
|
|
576 |
//Viewport position
|
|
577 |
TAlfRealPoint iViewPortPosition;
|
|
578 |
|
|
579 |
//observer to inform "open" command cloudviewimp class so that it opens the next view
|
|
580 |
MGlxEnterKeyEventObserver& iObserverEnterKeyEvent;
|
|
581 |
|
|
582 |
//observer to inform command cloudviewimp class that layout is changed
|
|
583 |
MGlxCloudViewLayoutObserver& iLayoutObserver;
|
|
584 |
//Viewport size
|
|
585 |
TAlfRealSize iViewPortSize;
|
|
586 |
|
|
587 |
//Viewport virtual size
|
|
588 |
TAlfRealSize iViewPortVirtualSize;
|
|
589 |
|
|
590 |
//Width of the screen in which is available for tags to fit in
|
|
591 |
TInt iTagScreenWidth;
|
|
592 |
|
|
593 |
//Height of the screen in which is available for tags to fit in
|
|
594 |
TInt iTagScreenHeight;
|
|
595 |
|
|
596 |
//Touch feedback instance
|
|
597 |
MTouchFeedback* iTouchFeedback;
|
|
598 |
|
|
599 |
//parent layout for all the layout's
|
|
600 |
CAlfLayout* iParentLayout;
|
|
601 |
|
|
602 |
//data structure for scrollbar
|
|
603 |
ScrollModelChangedEventData iScrollEventData;
|
|
604 |
|
|
605 |
//scrollbar element
|
|
606 |
IAlfWidgetEventHandler *iScrollbarElement;
|
|
607 |
|
|
608 |
//scrollbar widget
|
|
609 |
IAlfScrollBarWidget *iScrollBarWidget;
|
|
610 |
|
|
611 |
//direction of dragging
|
|
612 |
TInt iIsDragging;
|
|
613 |
|
|
614 |
TAknWindowLineLayout iScrollPaneHandle;
|
|
615 |
|
|
616 |
//View position w.r.t. viewportposition + (screeenwidth/2, screenheight/2)
|
|
617 |
TPoint iViewPosition;
|
|
618 |
|
|
619 |
//determins whether dragging is currently going on or not
|
|
620 |
TBool iDragging;
|
|
621 |
|
|
622 |
//Notes the time before dragging, when pointer down event happens
|
|
623 |
TTime iStartTime;
|
|
624 |
|
|
625 |
//Notes the last pointer co-ordinates
|
|
626 |
TPoint iPrev;
|
|
627 |
|
|
628 |
//The pointer coordinates before dragging when pointerDown event happened
|
|
629 |
TPoint iStart;
|
|
630 |
|
|
631 |
//owning - Physics library object
|
|
632 |
CAknPhysics* iPhysics;
|
|
633 |
|
|
634 |
//boolean to check whether physics emulation is going on or not
|
|
635 |
TBool iPhysicsStarted;
|
|
636 |
|
|
637 |
//boolean to check if dragging really happened
|
|
638 |
TBool iViewDragged;
|
|
639 |
|
|
640 |
/**variable used for providing delay */
|
|
641 |
CGlxBubbleTimer* iTimer;
|
|
642 |
|
|
643 |
//Alfcontrol to draw grid layout for handling floating bar menu items
|
|
644 |
CGlxTagsContextMenuControl* iTagsContextMenuControl;
|
|
645 |
|
|
646 |
/**flag for Timer completion */
|
|
647 |
TBool iTimerComplete;
|
|
648 |
|
|
649 |
/**flag to identify the next down event */
|
|
650 |
TBool iDownEventReceived;
|
|
651 |
};
|
|
652 |
|
|
653 |
#endif // C_GLXCLOUDVIEWCONTROL_H
|
|
654 |
|