SIL.FieldWorks.SharpViews.Box.NextInSelectionSequence C# (CSharp) Method

NextInSelectionSequence() public method

Answer the next box in which to draw a selection after the current one. This is basically a sequence which considers a box to be come immediately before - its first child, if it has one, and if includeChildren is true; - otherwise, its Next box, if any; - otherwise, the Next box of its closest ancestor that has one. Todo JohnT: eventually will be able to be constrained to the same column.
public NextInSelectionSequence ( bool includeChildren ) : Box
includeChildren bool
return Box
		public virtual Box NextInSelectionSequence(bool includeChildren)
		{
				if (Next != null)
					return Next;
				foreach (var group in AllContainers)
					if (group.Next != null)
						return group.Next;
				return null;
		}