Ejemplo n.º 1
0
        private void Navigator_NavNewColumn(HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPixelPos, Point aBoxPos, Size aDimensions, Size aBoxSize, Size aPadding)
        {
            System.Diagnostics.Debug.Assert(iCell != null && iCell.Address == aCell.Address);

            // Indicate that we're processing a new box
            ++CellBoxIndex;
            iAddress = aAddress;

            // Set our box coordinates
            iBoxCoordinates = aBoxPos;

            // Get current raw item if we're in the payload section
            iRawItem = null;
            try
            {
                HeapCell.TRegion region = Region;
                if (region == HeapCell.TRegion.EPayload)
                {
                    iRawItem = iCell[aAddress];
                }
            }
            catch (ArgumentException)
            {
            }


            // Some up front calculations that we'll need below...
            RemainingBytes = aCell.Remainder(aAddress);
            int remainingBoxesForThisLine = (aDimensions.Width - BoxCoordinates.X);

            RemainingBoxes             = (int)(RemainingBytes / SymbianUtils.RawItems.RawItem.KSizeOfOneRawItemInBytes);
            RemainingBoxesAfterThisRow = Math.Max(0, RemainingBoxes - remainingBoxesForThisLine);

            // If we can render all the remaining boxes in the not-yet-drawn
            // boxes from this row, we don't need anymore rows.
            RemainingRows = 0;
            if (RemainingBoxesAfterThisRow > 0)
            {
                // Otherwise, we need to identify how many more rows we will need
                // in order to complete the remaining boxes that are left over
                // after this row's boxes.
                RemainingRows = (RemainingBoxesAfterThisRow / aDimensions.Width) + 1;
            }

            // Work out the borders that should be enabled for the cell
            CalculateBorders(aCell, aAddress, aDimensions);
        }
        public void Navigator_NavNewRowBody(HeapCellMetaData aMetaData, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding)
        {
            if (aAddress == 0x700144)
            {
                int x = 0; x++;
            }

            if (!iFoundMaximumSize)
            {
                if (aMetaData.CellRowIndex == 1)
                {
                    // If the last row was just a few items and this second row has
                    // more (or it is a complete row) then we start the tracing again
                    // from the beginning.
                    int remaining = aMetaData.RemainingBoxes;
                    if (remaining > iMaxRunLength)
                    {
                        // Reset - this row is longer
                        if (iMaxRunLength < aDimensions.Width)
                        {
                            iMaxRunLength = 0;
                            iPosition     = aPosition;
                            iSize         = new Size(0, aBoxSize.Height + aPadding.Height); // aBoxSize + aPadding;
                        }
                        else
                        {
                            iSize.Width   = 0;
                            iSize.Height += aBoxSize.Height + aPadding.Height;
                        }
                    }
                    else
                    {
                        iFoundMaximumSize = true;
                    }
                }
                else if (aMetaData.RemainingBoxes > aDimensions.Width)
                {
                    iSize.Width   = 0;
                    iSize.Height += aBoxSize.Height + aPadding.Height;
                }
                else
                {
                    iFoundMaximumSize = true;
                }
            }
        }
        public void Navigator_NavNewColumn(HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPixelPos, Point aBoxPos, Size aDimensions, Size aBoxSize, Size aPadding)
        {
            if (aCell.Address == 0x700144)
            {
                int x = 0; x++;
            }

            if (!iFoundMaximumSize)
            {
                // If we must exclude the first box from our rectangle calculations,
                // then begin the capture process again.
                if (aMetaData.CellBoxIndex == iStartingBoxNumber)
                {
                    CaptureStart(aPixelPos, aBoxSize, aPadding);
                }
                //
                ++iMaxRunLength;
                iSize.Width += aBoxSize.Width + aPadding.Width;
            }
        }
Ejemplo n.º 4
0
 private void Navigator_NavNewRowBody(HeapCellMetaData aMetaData, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding)
 {
     ++CellRowIndex;
 }
Ejemplo n.º 5
0
 private void Navigator_NavHeapCellEnd(HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding)
 {
     // Finished with the cell...
     iCell = null;
 }
 public void Navigator_NavHeapCellEnd(HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding)
 {
 }
 public HeapRenderingNavigator(HeapCellArray aCells)
 {
     iCells = aCells;
     //
     iMetaData = new HeapCellMetaData(this);
 }