Ejemplo n.º 1
0
        public GuideFrame SplitFrame(GuidePage newPage)
        {
            GuideFrame newFrame = newPage.CreateTextFrame(this.mode, this.type);

            // thread the current frame to the next, and set it to the end of page
            textFrame.NextTextFrame   = newFrame.textFrame;
            bounds.bottom             = page.contentBounds.bottom;
            textFrame.GeometricBounds = bounds.raw;

            // size the new frame

            //Bounds newBounds = newFrame.bounds;
            newFrame.ResizeToFit();

            //currentPage.currentY = newBounds.bottom;

            return(newFrame);
        }
Ejemplo n.º 2
0
        GuideFrame GetTextFrame(Mode mode, FrameType type, bool forceNew)
        {
            if (forceNew || currentPage.currentFrame == null || mode != currentPage.currentMode)
            {
                // create a new frame
                CloseCurrentFrame();
                currentPage.CreateTextFrame(mode, type);
            }

            return(currentPage.currentFrame);

            /*
             * if (mode == currentPage.currentMode && !forceNew)
             * {
             *  if (currentPage.currentFrame == null)
             *  {
             *      //global.currentFrame = createTextFrame(type, global.currentPage, global.currentY);
             *      currentPage.CreateTextFrame(mode);
             *  }
             *  return currentPage.currentMode;
             * }
             * else
             * {
             *  if (global.currentFrame != null)
             *  {
             *      resizeToFit(global.currentFrame, false);
             *
             *      var newBounds = global.currentFrame.geometricBounds;
             *      global.currentY = newBounds[2];
             *  }
             *
             *  global.currentFrame = createTextFrame(type, global.currentPage, global.currentY);
             *
             *  global.currentType = type;
             *  return global.currentFrame;
             * }
             */
        }