Esempio n. 1
0
		void CreateAnchor()
		{
			if (document != null) {
				LineSegment line = document.GetLineSegment(Math.Max(0, Math.Min(location.Line, document.TotalNumberOfLines-1)));
				anchor = line.CreateAnchor(Math.Max(0, Math.Min(location.Column, line.Length)));
				// after insertion: keep bookmarks after the initial whitespace (see DefaultFormattingStrategy.SmartReplaceLine)
				anchor.MovementType = AnchorMovementType.AfterInsertion;
				anchor.Deleted += AnchorDeleted;
			}
		}
		public void AddDeletedAnchor(TextAnchor anchor)
		{
			if (textAnchor == null)
				textAnchor = new List<TextAnchor>();
			textAnchor.Add(anchor);
		}
Esempio n. 3
0
		void AddAnchor(TextAnchor anchor)
		{
			Debug.Assert(anchor.Line == this);
			
			if (anchors == null)
				anchors = new Util.WeakCollection<TextAnchor>();
			
			anchors.Add(anchor);
		}
Esempio n. 4
0
		public TextAnchor CreateAnchor(int column)
		{
			TextAnchor anchor = new TextAnchor(this, column);
			AddAnchor(anchor);
			return anchor;
		}
 public TextAnchor CreateAnchor(int column)
 {
     if (column < 0 || column > Length)
         throw new ArgumentOutOfRangeException("column");
     TextAnchor anchor = new TextAnchor(this, column);
     AddAnchor(anchor);
     return anchor;
 }
Esempio n. 6
0
			public AnchorWrapper(TextAnchor anchor)
			{
				this.Anchor = anchor;
			}