public override bool DeletePrevious()
        {
            if (TextView.Selection.IsEmpty)
            {
                if (AdvancedCaret.InVirtualSpace)
                {
                    AdvancedCaret.MoveToPreviousCaretPosition();
                }
                else
                {
                    if (!CaretPoint.DeletePrevious())
                    {
                        return(false);
                    }
                    if (AdvancedCaret.InVirtualSpace)
                    {
                        AdvancedCaret.MoveTo(AdvancedCaret.Position.BufferPosition);
                    }
                }
            }
            else
            {
                if (!TextView.Selection.Delete())
                {
                    return(false);
                }
            }

            AdvancedCaret.EnsureVisible();

            return(true);
        }
        public override bool InsertIndent()
        {
            if (!CaretPoint.InsertIndent())
            {
                return(false);
            }

            AdvancedCaret.EnsureVisible();

            return(true);
        }
        public override bool RemovePreviousIndent()
        {
            if (!CaretPoint.RemovePreviousIndent())
            {
                return(false);
            }

            AdvancedCaret.EnsureVisible();

            return(true);
        }
        public override bool TransposeCharacter()
        {
            if (!CaretPoint.TransposeCharacter())
            {
                return(false);
            }

            TextView.Selection.Clear();
            AdvancedCaret.EnsureVisible();

            return(true);
        }
        public override bool TransposeLine(int lineNumber)
        {
            if (!TextView.Selection.IsEmpty)
            {
                return(true);
            }

            if (!CaretPoint.TransposeLine(lineNumber))
            {
                return(false);
            }

            AdvancedCaret.EnsureVisible();

            return(true);
        }
        public override bool InsertText(string text)
        {
            if (!TextView.Selection.IsEmpty)
            {
                if (!TextView.Selection.Delete())
                {
                    return(false);
                }
            }

            if (!CaretPoint.InsertText(text))
            {
                return(false);
            }

            AdvancedCaret.EnsureVisible();

            return(true);
        }
        public override bool DeleteNext()
        {
            if (TextView.Selection.IsEmpty)
            {
                if (!CaretPoint.DeleteNext())
                {
                    return(false);
                }
            }
            else
            {
                if (!TextView.Selection.Delete())
                {
                    return(false);
                }
            }

            AdvancedCaret.EnsureVisible();

            return(true);
        }
 public override Collection <TextRange> FindAll(string pattern, FindOptions findOptions)
 {
     return(CaretPoint.FindAll(pattern, findOptions));
 }
 public override Collection <TextRange> FindAll(string pattern, TextPoint endPoint)
 {
     return(CaretPoint.FindAll(pattern, endPoint));
 }
 public override TextRange Find(string pattern)
 {
     return(CaretPoint.Find(pattern));
 }
 public override TextRange Find(string pattern, FindOptions findOptions)
 {
     return(CaretPoint.Find(pattern, findOptions));
 }
 public override TextRange Find(string pattern, TextPoint endPoint)
 {
     return(CaretPoint.Find(pattern, endPoint));
 }
 public override string GetPreviousCharacter()
 {
     return(CaretPoint.GetPreviousCharacter());
 }
 public override string GetNextCharacter()
 {
     return(CaretPoint.GetNextCharacter());
 }
 protected override DisplayTextPoint CloneDisplayTextPointInternal()
 {
     return(CaretPoint.Clone());
 }
 public override TextPoint GetFirstNonWhiteSpaceCharacterOnLine()
 {
     return(CaretPoint.GetFirstNonWhiteSpaceCharacterOnLine());
 }
 public override TextRange GetTextRange(int otherPosition)
 {
     return(CaretPoint.GetTextRange(otherPosition));
 }
 public override TextRange GetTextRange(TextPoint otherPoint)
 {
     return(CaretPoint.GetTextRange(otherPoint));
 }
 public override TextRange GetPreviousWord()
 {
     return(CaretPoint.GetPreviousWord());
 }
 public override TextRange GetNextWord()
 {
     return(CaretPoint.GetNextWord());
 }
Exemplo n.º 21
0
 public static extern bool GetCaretPos(out CaretPoint lpPoint);
 public override DisplayTextRange GetDisplayTextRange(DisplayTextPoint otherPoint)
 {
     return(CaretPoint.GetDisplayTextRange(otherPoint));
 }