equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
107 const TPoint& aPoint ) const; |
107 const TPoint& aPoint ) const; |
108 |
108 |
109 |
109 |
110 public: // data |
110 public: // data |
111 TInt iFlags; |
111 TInt iFlags; |
112 // EMMA-7A8B9F.Ugly hack. Prevent MopSupplyObject being invoked |
112 |
113 // from CEikListBox::MopGetObject() |
113 // This is used to prevent MopSupplyObject being invoked |
|
114 // from CEikListBox::MopGetObject(). |
114 TBool iIsFromBaseClass; |
115 TBool iIsFromBaseClass; |
|
116 |
115 TPoint iLastPoint; |
117 TPoint iLastPoint; |
116 TBool iKineticScrolling; |
|
117 TBool iSingleClickEnabled; |
118 TBool iSingleClickEnabled; |
118 }; |
119 }; |
119 |
120 |
120 CAknGridExtension::CAknGridExtension() |
121 CAknGridExtension::CAknGridExtension() |
121 : |
122 : |
122 iFlags(0), |
123 iFlags(0), |
123 iIsFromBaseClass( EFalse ), |
124 iIsFromBaseClass( EFalse ), |
124 iLastPoint( 0, 0 ), |
125 iLastPoint( 0, 0 ), |
125 iKineticScrolling( CAknPhysics::FeatureEnabled() ), |
|
126 iSingleClickEnabled( iAvkonAppUi->IsSingleClickCompatible() ) |
126 iSingleClickEnabled( iAvkonAppUi->IsSingleClickCompatible() ) |
127 { |
127 { |
128 } |
128 } |
129 |
129 |
130 CAknGridExtension::~CAknGridExtension() |
130 CAknGridExtension::~CAknGridExtension() |
1505 newTopRow = currRow - rowsFitInView + 1; |
1505 newTopRow = currRow - rowsFitInView + 1; |
1506 newTopRow = Max( 0, newTopRow ); |
1506 newTopRow = Max( 0, newTopRow ); |
1507 |
1507 |
1508 // and calculate new top item index |
1508 // and calculate new top item index |
1509 TInt topItemIndex = newTopRow * iNumOfColsInView ; |
1509 TInt topItemIndex = newTopRow * iNumOfColsInView ; |
1510 iView->SetItemOffsetInPixels(0); |
1510 if ( topItemIndex > KErrNotFound |
1511 SetTopItemIndex(topItemIndex); |
1511 && topItemIndex < iModel->NumberOfItems() ) |
|
1512 { |
|
1513 iView->SetItemOffsetInPixels( 0 ); |
|
1514 SetTopItemIndex( topItemIndex ); |
|
1515 } |
1512 } |
1516 } |
1513 _AKNTRACE_FUNC_EXIT; |
1517 _AKNTRACE_FUNC_EXIT; |
1514 } |
1518 } |
1515 |
1519 |
1516 EXPORT_C void CAknGrid::HandleDragEventL(TPoint aPointerPos) |
1520 EXPORT_C void CAknGrid::HandleDragEventL(TPoint aPointerPos) |
1867 |
1871 |
1868 vSbarModel.iThumbPosition = row; |
1872 vSbarModel.iThumbPosition = row; |
1869 // EHXA-7AQ8N4. Only set it to 0 can make scrollbar empty. |
1873 // EHXA-7AQ8N4. Only set it to 0 can make scrollbar empty. |
1870 vSbarModel.iScrollSpan = GridModel()->NumberOfItems() >0 ? |
1874 vSbarModel.iScrollSpan = GridModel()->NumberOfItems() >0 ? |
1871 gridSize.iHeight : 0; |
1875 gridSize.iHeight : 0; |
1872 vSbarModel.iThumbSpan = gridView->NumberOfRowsInView(); |
|
1873 vSbarModel.iScrollSpan = GridModel()->NumberOfItems() >0 ? |
1876 vSbarModel.iScrollSpan = GridModel()->NumberOfItems() >0 ? |
1874 gridSize.iHeight*iView->ItemHeight() : 0; |
1877 gridSize.iHeight*iView->ItemHeight() : 0; |
1875 vSbarModel.iThumbSpan = rect.Height(); |
1878 vSbarModel.iThumbSpan = rect.Height(); |
1876 |
1879 |
1877 if (iSBFrame->TypeOfVScrollBar() == CEikScrollBarFrame::EDoubleSpan) |
1880 if (iSBFrame->TypeOfVScrollBar() == CEikScrollBarFrame::EDoubleSpan) |