B2015-103: indents (strip out rtf indent commands)
B2015-103: indents (handle rtf indent commands) B2015-103: indents (set/clear ribbon button for indents) B2015-103: setup rtf string for indents; display small identifying marks for indents B2015-103: remove page break from ribbon; move indent; support new indent; support for table grid indent B2015-103: Print for new indents in tables B2015-103: Print for new indents in paragraphs
This commit is contained in:
@@ -449,7 +449,7 @@ namespace Volian.Controls.Library
|
||||
bool allow = (_MyStepRTB.TextLength > 0 && (MyEditItem == null || MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit));
|
||||
|
||||
// turn ribbon items on/off base on whether there is text in the edit window
|
||||
rbnSiblings.Enabled = rbnBreaks.Enabled = rbnStepParts.Enabled = allow;
|
||||
rbnSiblings.Enabled = rbnParagraph.Enabled = rbnStepParts.Enabled = allow;
|
||||
// only turn on the Insert Before/After and the CopyStep buttons if on a step part
|
||||
btnInsAftH.Enabled = btnInsBefH.Enabled = btnInsAfter.Enabled = btnInsBefore.Enabled = btnCpyStp.Enabled =
|
||||
allow && !(MyItemInfo.IsProcedure || MyItemInfo.IsSection || MyItemInfo.IsFigure || MyItemInfo.IsTable || MyItemInfo.IsRNOPart);
|
||||
@@ -1118,6 +1118,8 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
btnInsPgBrk.Enabled = MyItemInfo.IsHigh;
|
||||
btnPageBreak.Enabled = MyItemInfo.IsHigh; // edit context menu
|
||||
|
||||
btnIndent.Checked = (_MyStepRTB.EditMode && _MyStepRTB.SelectionHangingIndent != 0);
|
||||
btnEditMode.Checked = btnCMEditMode1.Checked = MyEditItem.MyStepPanel.VwMode == E_ViewMode.View;
|
||||
// if on procedure, 'Delete' buttons should be disabled.
|
||||
btnDelelete.Enabled = btnDelStep.Enabled = !MyItemInfo.IsProcedure;
|
||||
@@ -1493,12 +1495,22 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
private void btnIndent_Click(object sender, EventArgs e)
|
||||
{
|
||||
StartGridEditing(SelectionOption.Start);
|
||||
_MyStepRTB.InsertIndent(MyEditItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IndentToken);
|
||||
if (MyItemInfo.IsProcedure || MyItemInfo.IsSection) return;
|
||||
// For now, use the button as a toggle, i.e. if indent is on - turn it off. If indent is off, use the current cursor location to
|
||||
// turn it on. Later, we may want to allow for multiple indents using the DisplayTags panel.
|
||||
if (_MyStepRTB.SelectionHangingIndent != 0)
|
||||
_MyStepRTB.SelectionHangingIndent = 0;
|
||||
else
|
||||
_MyStepRTB.SelectionHangingIndent = _MyStepRTB.GetPositionFromCharIndex(_MyStepRTB.SelectionStart).X;
|
||||
btnIndent.Checked = _MyStepRTB.SelectionHangingIndent != 0;
|
||||
}
|
||||
private void btnCMIndent_Click(object sender, EventArgs e)
|
||||
{
|
||||
_MyStepRTB.InsertIndent(MyEditItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IndentToken);
|
||||
if (_MyStepRTB.SelectionHangingIndent != 0)
|
||||
_MyStepRTB.SelectionHangingIndent = 0;
|
||||
else
|
||||
_MyStepRTB.SelectionHangingIndent = _MyStepRTB.GetPositionFromCharIndex(_MyStepRTB.SelectionStart).X;
|
||||
btnIndent.Checked = _MyStepRTB.SelectionHangingIndent != 0;
|
||||
}
|
||||
#endregion
|
||||
#region Home Tab
|
||||
@@ -2841,6 +2853,15 @@ namespace Volian.Controls.Library
|
||||
btnTblDgnPaste.Enabled = ((VlnFlexGrid.MyCopyInfo.MyCopiedFlexGrid != null) && enable);
|
||||
btnTblDgnSplitCells.Enabled = enable;
|
||||
}
|
||||
public void SetRibbonForGridCellIndent()
|
||||
{
|
||||
if (_MyStepRTB != null)
|
||||
btnIndent.Checked = _MyStepRTB.SelectionHangingIndent != 0;
|
||||
}
|
||||
public void SetRibbonForGridCellIndentClear()
|
||||
{
|
||||
btnIndent.Checked = false;
|
||||
}
|
||||
public void SetRibbonForGrid()
|
||||
{
|
||||
// for paste, see if there is clipboard data, & if so, of a type we can use.
|
||||
|
Reference in New Issue
Block a user