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