uifw/AvKon/src/akngridview.cpp
branchRCL_3
changeset 56 d48ab3b357f1
parent 55 aecbbf00d063
equal deleted inserted replaced
55:aecbbf00d063 56:d48ab3b357f1
    75 EXPORT_C CAknGridView::CAknGridView()
    75 EXPORT_C CAknGridView::CAknGridView()
    76     {
    76     {
    77     iScrollingType = EScrollFollowsItemsAndLoops;
    77     iScrollingType = EScrollFollowsItemsAndLoops;
    78     iScrollInSecondaryDimension = EScrollFollowsItemsAndLoops;
    78     iScrollInSecondaryDimension = EScrollFollowsItemsAndLoops;
    79     iGridDetails.iGridDimensions = TSize(1,1);
    79     iGridDetails.iGridDimensions = TSize(1,1);
       
    80     iGridDetails.iColsInView = 1;
       
    81     iGridDetails.iRowsInView = 1;
    80     }
    82     }
    81 
    83 
    82 /**
    84 /**
    83  * Destructor
    85  * Destructor
    84  */
    86  */
  1923 	TRect blankRect;
  1925 	TRect blankRect;
  1924 	for (TInt i = aStartItemIndex; i <= aEndItemIndex; i++)
  1926 	for (TInt i = aStartItemIndex; i <= aEndItemIndex; i++)
  1925 		{
  1927 		{
  1926 		blankRect.SetRect(ItemPos(i), ItemSize());
  1928 		blankRect.SetRect(ItemPos(i), ItemSize());
  1927 		blankRect.Intersection(iViewRect);
  1929 		blankRect.Intersection(iViewRect);
  1928 
  1930 		if ( blankRect.Width() > 0 && blankRect.Height() > 0 )
  1929 		MAknsSkinInstance *skin = AknsUtils::SkinInstance();
  1931 		    {
  1930 		CFormattedCellListBoxItemDrawer *id = (CFormattedCellListBoxItemDrawer*)ItemDrawer();
  1932 		    MAknsSkinInstance *skin = AknsUtils::SkinInstance();
  1931 		if (id->FormattedCellData()->Control())
  1933 		    CFormattedCellListBoxItemDrawer *id = 
  1932 			{
  1934                 (CFormattedCellListBoxItemDrawer*)ItemDrawer();
  1933 			MAknsControlContext *cc = AknsDrawUtils::ControlContext( id->FormattedCellData()->Control() );
  1935 		    if ( id->FormattedCellData()->Control())
  1934 			if ( !cc )
  1936 		    	{
  1935 			    {
  1937 		        MAknsControlContext *cc = 
  1936 			    cc = id->FormattedCellData()->SkinBackgroundContext();
  1938                     AknsDrawUtils::ControlContext( id->FormattedCellData()->Control() );
  1937 			    }
  1939 		        if ( !cc )
  1938 			AknsDrawUtils::Background( skin, cc, id->FormattedCellData()->Control(), *iGc, blankRect );
  1940 		        	{
  1939 			}
  1941 		            cc = id->FormattedCellData()->SkinBackgroundContext();
  1940 		else
  1942 		        	}
  1941 			{
  1943 		        AknsDrawUtils::Background( skin, 
  1942 			iGc->Clear(blankRect);
  1944                                            cc, 
  1943 			}
  1945                                            id->FormattedCellData()->Control(), 
       
  1946                                            *iGc, 
       
  1947                                            blankRect );
       
  1948 		    	}
       
  1949 		    else
       
  1950 		    	{
       
  1951 		        iGc->Clear(blankRect);
       
  1952 		    	}
       
  1953 		   	}
  1944 		}
  1954 		}
  1945 	_AKNTRACE_FUNC_EXIT;
  1955 	_AKNTRACE_FUNC_EXIT;
  1946 	}
  1956 	}
  1947 
  1957 
  1948 EXPORT_C void CAknGridView::UpdateHScrollOffsetBasedOnTopItemIndex()
  1958 EXPORT_C void CAknGridView::UpdateHScrollOffsetBasedOnTopItemIndex()