/// <summary> Creates a new command that moves out from a box into its parent box.  </summary>
			/// <param name="command"> The command enum to be passed to the command to create. </param>
			/// <param name="requirements"> The requirements determining whether the command can execute. </param>
			/// <param name="traversalDirection"> The direction in which the caret moves out of the box (true for right, false for left). </param>
			public static KeyboardCommand CreateOut(SelectionOption command, CanExecuteRequirement requirements, bool traversalDirection)
			{
				Func<InputCommandParameter, bool> canExecute = null;

				if (requirements.HasFlag(CanExecuteRequirement.RequireSingleStep))
					canExecute = glyphRun => getAdjacentBox(glyphRun, traversalDirection) == null;
				return new KeyboardCommand(command, requirements | CanExecuteRequirement.NoRoot, canExecute, caretState => boxOut(caretState, traversalDirection));
			}
			/// <summary> Creates a new command representing moving from a box to an adjacent box in the same box composition. </summary>
			/// <param name="command"> The parameters to create the command with. </param>
			/// <param name="requirements"> The requirements determining whether the command can execute. </param>
			/// <param name="boxesTraversalDirection"> Indicates whether the traversal from box to adjacent box is from left to right. </param>
			public static KeyboardCommand CreateAdjacent(SelectionOption command, CanExecuteRequirement requirements, bool boxesTraversalDirection)
			{
				return new KeyboardCommand(command, requirements | CanExecuteRequirement.NoRoot,
					glyphRun => getAdjacentBox(glyphRun, boxesTraversalDirection) != null,
					glyphRun => Focus(getAdjacentBox(glyphRun, boxesTraversalDirection), boxesTraversalDirection));
			}