Equation Editor interface support

This commit is contained in:
2016-11-17 15:05:15 +00:00
parent 3e212834ea
commit 0b7371367c
26 changed files with 2129 additions and 855 deletions

View File

@@ -997,6 +997,8 @@ namespace Volian.Controls.Library
EditItem child = null;
if (MyItemInfo.IsFigure)
child = new ImageItem(MyItemInfo, MyStepPanel, this, ChildRelation.After, expand);
else if (MyItemInfo.IsRtfRaw)
child = new RtfRawItem(MyItemInfo, MyStepPanel, this, ChildRelation.After, expand);
else if (MyItemInfo.MyContent.MyGrid != null)
child = new GridItem(MyItemInfo, MyStepPanel, this, ChildRelation.After, expand);
else
@@ -1007,9 +1009,9 @@ namespace Volian.Controls.Library
{
EditItem child = null;
if (MyItemInfo.IsFigure)
{
child = new ImageItem(MyItemInfo, MyStepPanel, this, ChildRelation.After, true, nextEditItem, FigInsType);
}
else if (MyItemInfo.IsRtfRaw)
child = new RtfRawItem(MyItemInfo, MyStepPanel, this, ChildRelation.After, true, nextEditItem);
else if (MyItemInfo.MyContent.MyGrid != null)
child = new GridItem(MyItemInfo, MyStepPanel, this, ChildRelation.After, true, nextEditItem);
else
@@ -1021,6 +1023,8 @@ namespace Volian.Controls.Library
EditItem child = null;
if (MyItemInfo.IsFigure)
child = new ImageItem(MyItemInfo, MyStepPanel, this, ChildRelation.Before, true, nextEditItem, FigInsType);
else if (MyItemInfo.IsRtfRaw)
child = new RtfRawItem(MyItemInfo, MyStepPanel, this, ChildRelation.Before, true, nextEditItem);
if(MyItemInfo.MyContent.MyGrid != null)
child = new GridItem(MyItemInfo, MyStepPanel, this, ChildRelation.Before, true, nextEditItem);
else
@@ -2536,13 +2540,17 @@ namespace Volian.Controls.Library
{
AdjustTableWidthAndLocation();
}
else if (MyItemInfo.IsRtfRaw)
{
AdjustTableWidthAndLocation();
}
else
{
if (MyItemInfo.FormatStepData.StepLayoutData.AlignWithParentTab)
// Paul Linn made the request on 6/4/12 to align the Component Description &
// Required Position under the Component Number.
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X, _MyParentEditItem.Bottom);
else if (MyItemInfo.FormatStepData.Type == "TitleWithTextRight" && (MyItemInfo.Steps == null || MyItemInfo.Steps.Count==0)) // this code is run for siblings within a HLS (but not last sibling).
else if (MyItemInfo.FormatStepData.Type == "TitleWithTextRight" && (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0)) // this code is run for siblings within a HLS (but not last sibling).
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X, _MyParentEditItem.Bottom);
else if (MyItemInfo.MyParent.FormatStepData.Type == "TitleWithTextRight")
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X + _MyParentEditItem.ItemWidth, _MyParentEditItem.ItemLocation.Y);
@@ -2557,7 +2565,7 @@ namespace Volian.Controls.Library
else
ItemLocation = new Point(_MyParentEditItem.ContentLeft, _MyParentEditItem.Bottom);
}
bool specialTplSupport =((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd) ||
bool specialTplSupport = ((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd) ||
(MyItemInfo.MyDocStyle.LandscapePageList && MyItemInfo.MyDocStyle.ComponentList);
bool wecTplSupport = ((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_ChklstEditSize) == E_DocStructStyle.DSS_ChklstEditSize);
if (MyItemInfo.FormatStepData.ReadOnly)
@@ -2723,7 +2731,8 @@ namespace Volian.Controls.Library
_IgnoreResize = true;
// the table code goes through the following, rather than 'istablepart'
if (MyStepData != null && ((MyStepData.Type.ToLower().Contains("table") || MyStepData.ParentType.ToLower().Contains("table"))||
(MyStepData.Type.ToLower().Contains("figure") || MyStepData.ParentType.ToLower().Contains("figure"))))
(MyStepData.Type.ToLower().Contains("figure") || MyStepData.ParentType.ToLower().Contains("figure"))||
(MyStepData.Type.ToLower().Contains("equation") || MyStepData.ParentType.ToLower().Contains("equation"))))
{
ItemWidth = TableWidth;
Location = new Point(_MyPreviousEditItem.Left, FindTop(_MyPreviousEditItem.BottomMostEditItem.Bottom));
@@ -3045,6 +3054,12 @@ namespace Volian.Controls.Library
X = gi.MyFlexGrid.Right+2;
H = gi.MyFlexGrid.Height;
}
else if (this is RtfRawItem)
{
RtfRawItem ri = this as RtfRawItem;
X = ri.MyStepRTB.Right + 4;
H = ri.MyStepRTB.Height;
}
else if (this is ImageItem)
{
ImageItem ii = this as ImageItem;
@@ -3054,7 +3069,7 @@ namespace Volian.Controls.Library
else
{
RTBItem ri = this as RTBItem;
X = ri.MyStepRTB.Right+2;
X = ri.MyStepRTB.Right + 2;
H = ri.MyStepRTB.Height;
}
g.DrawLine(penCB, X, ContentTop, X, ContentTop+H); //Height);
@@ -3068,7 +3083,17 @@ namespace Volian.Controls.Library
GridItem gi = this as GridItem;
location = new PointF(gi.MyFlexGrid.Left + gi.MyFlexGrid.Width + 2, gi.MyFlexGrid.Top);
}
else
else if (this is RtfRawItem)
{
RtfRawItem rr = this as RtfRawItem;
// SkipSpaces puts the checkoff macro (if specified in the format) next to the step tab
// this is used for Bryon and Braidwood
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.SkipSpaces)
location = new PointF(rr.MyStepRTB.Left - 50, rr.MyStepRTB.Top);
else
location = new PointF(rr.MyStepRTB.Left + rr.MyStepRTB.Width + 2, rr.MyStepRTB.Top);
}
else
{
RTBItem ri = this as RTBItem;
// SkipSpaces puts the checkoff macro (if specified in the format) next to the step tab