equal
deleted
inserted
replaced
71 |
71 |
72 /** |
72 /** |
73 * Contains the visual structure of the list. |
73 * Contains the visual structure of the list. |
74 * |
74 * |
75 */ |
75 */ |
|
76 |
|
77 enum TUpdatedByPhysic{ |
|
78 ENotUpdatedByPhisic = 0, |
|
79 EUpdatedByPhisic, |
|
80 EUpdatedByPhisicEnd |
|
81 }; |
|
82 |
76 NONSHARABLE_CLASS( TWorld ) |
83 NONSHARABLE_CLASS( TWorld ) |
77 { |
84 { |
78 |
85 |
79 public: |
86 public: |
80 |
87 |
331 public: |
338 public: |
332 |
339 |
333 /** |
340 /** |
334 * This method is called when the viewport changes. |
341 * This method is called when the viewport changes. |
335 */ |
342 */ |
336 virtual void ViewPortUpdatedL( TViewPort& aViewPort ) = 0; |
343 virtual void ViewPortUpdatedL( TViewPort& aViewPort, TUpdatedByPhysic aUpdateByPhysic = ENotUpdatedByPhisic ) = 0; |
337 |
344 |
338 }; |
345 }; |
339 |
346 |
340 public: |
347 public: |
341 |
348 |
352 |
359 |
353 /** |
360 /** |
354 * Center viewport around position aPosition. If aInformUpdate is set to ETrue, observer |
361 * Center viewport around position aPosition. If aInformUpdate is set to ETrue, observer |
355 * will be signalled. |
362 * will be signalled. |
356 */ |
363 */ |
357 void SetCenterPositionL( const TPoint& aPosition, TBool aInformUpdate = ETrue ); |
364 void SetCenterPositionL( const TPoint& aPosition, TBool aInformUpdate = ETrue, TUpdatedByPhysic aUpdateByPhysic = ENotUpdatedByPhisic ); |
358 |
365 |
359 /** |
366 /** |
360 * Returns viewport position (i.e. topleft corner). |
367 * Returns viewport position (i.e. topleft corner). |
361 */ |
368 */ |
362 const TPoint& Position() const; |
369 const TPoint& Position() const; |
379 /** |
386 /** |
380 * Get items visible in viewport's area. |
387 * Get items visible in viewport's area. |
381 */ |
388 */ |
382 void GetVisibleItemsL( RArray<TFsTreeItemId>& aItemsToBeRemoved, RArray<TFsTreeItemId>& aItemsToBeAdded, TInt& aOffset, TBool& aFullUpdate ); |
389 void GetVisibleItemsL( RArray<TFsTreeItemId>& aItemsToBeRemoved, RArray<TFsTreeItemId>& aItemsToBeAdded, TInt& aOffset, TBool& aFullUpdate ); |
383 |
390 |
|
391 /** |
|
392 * Get items visible in viewport's area. |
|
393 */ |
|
394 void GetVisibleItemsL(RArray<TFsTreeItemId>& aVisible, TInt& aOffset); |
|
395 |
384 /** |
396 /** |
385 * Returns ETrue if the world is higher than viewport. |
397 * Returns ETrue if the world is higher than viewport. |
386 */ |
398 */ |
387 TBool IsScrollBarNeeded() const; |
399 TBool IsScrollBarNeeded() const; |
388 |
400 |
453 private: |
465 private: |
454 |
466 |
455 /** |
467 /** |
456 * Called when viewport is updated. |
468 * Called when viewport is updated. |
457 */ |
469 */ |
458 void UpdatedL(); |
470 void UpdatedL(TUpdatedByPhysic aUpdateByPhysic = ENotUpdatedByPhisic); |
|
471 |
|
472 |
459 |
473 |
460 private: // from TWorld::MObserver |
474 private: // from TWorld::MObserver |
461 |
475 |
462 /** |
476 /** |
463 * @see TWorld::MObserver::WorldUpdatedL |
477 * @see TWorld::MObserver::WorldUpdatedL |
1903 virtual void WorldUpdatedL( const TWorld& aWorld ); |
1917 virtual void WorldUpdatedL( const TWorld& aWorld ); |
1904 |
1918 |
1905 |
1919 |
1906 private: // from TViewPort::MObserver |
1920 private: // from TViewPort::MObserver |
1907 |
1921 |
1908 virtual void ViewPortUpdatedL( TViewPort& aViewPort ); |
1922 virtual void ViewPortUpdatedL( TViewPort& aViewPort, TUpdatedByPhysic aUpdateByPhysic = ENotUpdatedByPhisic); |
1909 |
1923 |
1910 // TREE OPTIMIZATIONS |
1924 // TREE OPTIMIZATIONS |
1911 |
1925 |
1912 /** |
1926 /** |
1913 * Updates world size and view position. |
1927 * Updates world size and view position. |