Various improvements for IP2 and IP3
This commit is contained in:
parent
17801bf257
commit
ba04116c02
@ -49,7 +49,9 @@ namespace Volian.Print.Library
|
|||||||
if (childItemInfo.Notes != null && (childItemInfo.IsCaution || childItemInfo.IsNote))
|
if (childItemInfo.Notes != null && (childItemInfo.IsCaution || childItemInfo.IsNote))
|
||||||
yoff = Add(cb, childItemInfo.Notes, xoff, yoff, yoffRight, rnoLevel, maxRNO, formatInfo);
|
yoff = Add(cb, childItemInfo.Notes, xoff, yoff, yoffRight, rnoLevel, maxRNO, formatInfo);
|
||||||
int? bxIndx = childItemInfo.FormatStepData==null?-1:childItemInfo.FormatStepData.StepLayoutData.STBoxindex;
|
int? bxIndx = childItemInfo.FormatStepData==null?-1:childItemInfo.FormatStepData.StepLayoutData.STBoxindex;
|
||||||
if (!childItemInfo.IsHigh && (bxIndx != -1 && (bxIndex != bxIndx || childItemInfo.FormatStepData.BoxIt)))
|
bool boxHLS = false;
|
||||||
|
|
||||||
|
if ((bxIndx != -1 && (bxIndex != bxIndx || childItemInfo.FormatStepData.BoxIt)))
|
||||||
{
|
{
|
||||||
if (childItemInfo.FormatStepData.BoxIt) // this is a boxed HLS
|
if (childItemInfo.FormatStepData.BoxIt) // this is a boxed HLS
|
||||||
{
|
{
|
||||||
@ -64,6 +66,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
else if (bxIndex == null) // First boxed step
|
else if (bxIndex == null) // First boxed step
|
||||||
{
|
{
|
||||||
|
if (childItemInfo.IsHigh) boxHLS = true;
|
||||||
box = new vlnBox();
|
box = new vlnBox();
|
||||||
box.MyBox = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
|
box.MyBox = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
|
||||||
if (box.MyBox != null)
|
if (box.MyBox != null)
|
||||||
@ -71,29 +74,29 @@ namespace Volian.Print.Library
|
|||||||
box.YOffset = yoff;
|
box.YOffset = yoff;
|
||||||
int ln = 1; // a format flag determines whether there is a space before the note/caution.
|
int ln = 1; // a format flag determines whether there is a space before the note/caution.
|
||||||
if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
|
if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
|
||||||
yoff += ln * vlnPrintObject.SixLinesPerInch;
|
if (boxHLS && !childItemInfo.HasCautionOrNote) yoff += ln * vlnPrintObject.SixLinesPerInch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Change Box Style
|
else // Change Box Style
|
||||||
{
|
{
|
||||||
if (bxIndx != null)
|
if (bxIndx != null)
|
||||||
{
|
{
|
||||||
if (box != null) box.Height = yoff - box.YOffset; // new height, with children
|
if (box != null) box.Height = yoff - box.YOffset; // new height, with children
|
||||||
box = new vlnBox();
|
box = new vlnBox();
|
||||||
box.MyBox = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
|
box.MyBox = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
|
||||||
int ln = 1; // a format flag determines whether there is a space before the note/caution.
|
int ln = 1; // a format flag determines whether there is a space before the note/caution.
|
||||||
if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
|
if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
|
||||||
if (childItemInfo.MixCautionNotesDiffType()) ln += 2;
|
if (childItemInfo.MixCautionNotesDiffType()) ln += 2;
|
||||||
box.YOffset = yoff + ((ln - 1) * vlnPrintObject.SixLinesPerInch);
|
box.YOffset = yoff + ((ln - 1) * vlnPrintObject.SixLinesPerInch);
|
||||||
yoff += ln * vlnPrintObject.SixLinesPerInch;
|
yoff += ln * vlnPrintObject.SixLinesPerInch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bxIndex = bxIndx;
|
bxIndex = bxIndx;
|
||||||
}
|
}
|
||||||
if (childItemInfo is SectionInfo) formatInfo = (childItemInfo as SectionInfo).LocalFormat ?? formatInfo;
|
if (childItemInfo is SectionInfo) formatInfo = (childItemInfo as SectionInfo).LocalFormat ?? formatInfo;
|
||||||
if (rnoLevel < maxRNO && childItemInfo.RNOs != null) yoff = Math.Max(yoff, yoffRight);
|
if (rnoLevel < maxRNO && childItemInfo.RNOs != null) yoff = Math.Max(yoff, yoffRight);
|
||||||
|
|
||||||
vlnParagraph para = new vlnParagraph(Parent, cb, childItemInfo, xoff, yoff, rnoLevel, maxRNO, formatInfo, null, null);
|
vlnParagraph para = new vlnParagraph(Parent, cb, childItemInfo, xoff, yoff, rnoLevel, maxRNO, formatInfo, null, null);
|
||||||
|
|
||||||
if (box != null && box.MyParent == null)
|
if (box != null && box.MyParent == null)
|
||||||
{
|
{
|
||||||
box.MyParent = para;
|
box.MyParent = para;
|
||||||
@ -110,6 +113,13 @@ namespace Volian.Print.Library
|
|||||||
box.Height = yoff - box.YOffset - (1.1F * vlnPrintObject.SixLinesPerInch);
|
box.Height = yoff - box.YOffset - (1.1F * vlnPrintObject.SixLinesPerInch);
|
||||||
box = null; // if doing boxed steps, only do single sibling at a time.
|
box = null; // if doing boxed steps, only do single sibling at a time.
|
||||||
}
|
}
|
||||||
|
if (boxHLS)
|
||||||
|
{
|
||||||
|
box.YOffset = para.YTop;
|
||||||
|
box.Height = para.YBottomMost - para.YTop - (1.1F * vlnPrintObject.SixLinesPerInch);
|
||||||
|
box = null;
|
||||||
|
}
|
||||||
|
boxHLS = false;
|
||||||
lastChild = childItemInfo;
|
lastChild = childItemInfo;
|
||||||
}
|
}
|
||||||
if (box != null && box.MyBox != null)
|
if (box != null && box.MyBox != null)
|
||||||
@ -1064,6 +1074,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
AdjustWidth(itemInfo, maxRNO, formatInfo, mytab);
|
AdjustWidth(itemInfo, maxRNO, formatInfo, mytab);
|
||||||
AdjustXOffsetForTab(itemInfo, maxRNO, formatInfo, mytab, xMetaAdj);
|
AdjustXOffsetForTab(itemInfo, maxRNO, formatInfo, mytab, xMetaAdj);
|
||||||
|
|
||||||
if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab)
|
if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab)
|
||||||
yoff += SetHeader(this, cb, itemInfo, formatInfo);
|
yoff += SetHeader(this, cb, itemInfo, formatInfo);
|
||||||
float yoffLeft = yoff;
|
float yoffLeft = yoff;
|
||||||
@ -1115,10 +1126,12 @@ namespace Volian.Print.Library
|
|||||||
vlnText myAsterisk = new vlnText(cb, this, "*", "*", mytab.XOffset - 24, YOffset+4, astFont);
|
vlnText myAsterisk = new vlnText(cb, this, "*", "*", mytab.XOffset - 24, YOffset+4, astFont);
|
||||||
PartsLeft.Add(myAsterisk);
|
PartsLeft.Add(myAsterisk);
|
||||||
}
|
}
|
||||||
if (itemInfo.IsRNOPart)
|
if (itemInfo.IsRNOPart && rnoLevel > maxRNO)
|
||||||
{
|
{
|
||||||
// there may be other places that double space, but this supports it for RNOs (the DoubleRNOspace flag)
|
// the DoubleSpace & SpaceDouble flags seem redundant. The 2nd line was added for foldout
|
||||||
if (rnoLevel > maxRNO && itemInfo.FormatStepData.DoubleSpace) yoff = YOffset = yoff + SixLinesPerInch;
|
// line spacing for IP2 foldouts (one example can be found in E-1)
|
||||||
|
if (itemInfo.FormatStepData.DoubleSpace && itemInfo.FormatStepData.SpaceDouble) yoff = YOffset = yoff + SixLinesPerInch;
|
||||||
|
if (!itemInfo.FormatStepData.SpaceDouble && itemInfo.MyParent.IsHigh) yoff = YOffset = yoff - SixLinesPerInch;
|
||||||
}
|
}
|
||||||
AddMacros(itemInfo, mytab);
|
AddMacros(itemInfo, mytab);
|
||||||
if (mytab != null)
|
if (mytab != null)
|
||||||
@ -1200,7 +1213,7 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
Rtf = GetRtf(itemInfo, prefix, suffix);
|
Rtf = GetRtf(itemInfo, prefix, suffix);
|
||||||
// Need the following with some modifications for WCNCKL format:
|
// Need the following with some modifications for WCNCKL format:
|
||||||
if (Rtf.Contains("{Backspace}"))
|
while (Rtf.Contains("{Backspace}"))
|
||||||
{
|
{
|
||||||
XOffset -= 25;
|
XOffset -= 25;
|
||||||
Width += 24;
|
Width += 24;
|
||||||
@ -1333,7 +1346,8 @@ namespace Volian.Print.Library
|
|||||||
yoff = Math.Max(yoff, yOffRight);
|
yoff = Math.Max(yoff, yOffRight);
|
||||||
// TODO - use RNOSepAfterAER flag too:
|
// TODO - use RNOSepAfterAER flag too:
|
||||||
string tmpRnoSepStr = formatInfo.MyStepSectionPrintData.RNOSepString;
|
string tmpRnoSepStr = formatInfo.MyStepSectionPrintData.RNOSepString;
|
||||||
if (rnoLevel < maxRNO && itemInfo.RNOs != null && tmpRnoSepStr != null)
|
float tmpRnoSepLen = formatInfo.MyStepSectionPrintData.RNOSepLineLength??0;
|
||||||
|
if (rnoLevel < maxRNO && itemInfo.RNOs != null && (tmpRnoSepStr != null || tmpRnoSepLen != 0))
|
||||||
{
|
{
|
||||||
vlnParagraph rno = ChildrenRight[0];
|
vlnParagraph rno = ChildrenRight[0];
|
||||||
vlnParagraph bottomChild = BottomChild;
|
vlnParagraph bottomChild = BottomChild;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user