/// <summary> /// Prints the selection. /// </summary> public virtual void Print() { ILayoutNodeState State = StateView.State; ILayoutBlockListInner ParentInner = State.PropertyToInner(PropertyName) as ILayoutBlockListInner; Debug.Assert(ParentInner != null); ILayoutControllerView ControllerView = StateView.ControllerView; Debug.Assert(ControllerView.PrintContext != null); ControllerView.UpdateLayout(); Debug.Assert(StartIndex <= EndIndex); ILayoutBlockStateView FirstBlockStateView = ControllerView.BlockStateViewTable[ParentInner.BlockStateList[StartIndex]]; Point Origin = FirstBlockStateView.CellOrigin.Opposite; for (int i = StartIndex; i < EndIndex; i++) { ILayoutBlockStateView BlockStateView = ControllerView.BlockStateViewTable[ParentInner.BlockStateList[i]]; Debug.Assert(RegionHelper.IsValid(BlockStateView.ActualCellSize)); BlockStateView.PrintCells(Origin); } }
/// <summary> /// Initializes a new instance of the <see cref="LayoutBlockState{IInner}"/> class. /// </summary> /// <param name="parentInner">Inner containing the block state.</param> /// <param name="newBlockIndex">Index that was used to create the block state.</param> /// <param name="childBlock">The block.</param> public LayoutBlockState(ILayoutBlockListInner parentInner, ILayoutBrowsingNewBlockNodeIndex newBlockIndex, IBlock childBlock) : base(parentInner, newBlockIndex, childBlock) { }