LayoutFarm.Text.InternalTextLayerController.AddTextRunToCurrentLine C# (CSharp) Method

AddTextRunToCurrentLine() public method

public AddTextRunToCurrentLine ( EditableRun t ) : void
t EditableRun
return void
        public void AddTextRunToCurrentLine(EditableRun t)
        {
            updateJustCurrentLine = true;
            RemoveSelectedText();
            int startLineNum = textLineWriter.LineNumber;
            int startCharIndex = textLineWriter.CharIndex;
            bool isRecordingHx = EnableUndoHistoryRecording;
            EnableUndoHistoryRecording = false;
            if (t.IsLineBreak)
            {
                textLineWriter.SplitToNewLine();
                CurrentLineNumber++;
            }
            else
            {
                textLineWriter.AddTextSpan(t);
            }

            EnableUndoHistoryRecording = isRecordingHx;
            commandHistory.AddDocAction(
                new DocActionInsertRuns(t, startLineNum, startCharIndex,
                    textLineWriter.LineNumber, textLineWriter.CharIndex));
            updateJustCurrentLine = false;
            TextEditRenderBox.NotifyTextContentSizeChanged(visualTextSurface);
        }
        public void CopyAllToPlainText(StringBuilder output)

Usage Example

Esempio n. 1
0
 public override void InvokeRedo(InternalTextLayerController textdom)
 {
     textdom.CurrentLineNumber = startLineNumber;
     textdom.CharIndex         = startCharIndex;
     if (singleInsertTextRun != null)
     {
         textdom.AddTextRunToCurrentLine(singleInsertTextRun);
     }
     else
     {
         textdom.AddTextRunsToCurrentLine(insertingTextRuns);
     }
 }
All Usage Examples Of LayoutFarm.Text.InternalTextLayerController::AddTextRunToCurrentLine