/// <summary> /// Prints the selection. /// </summary> public virtual void Print() { ILayoutNodeState State = StateView.State; ILayoutListInner ParentInner = State.PropertyToInner(PropertyName) as ILayoutListInner; Debug.Assert(ParentInner != null); LayoutControllerView ControllerView = StateView.ControllerView; Debug.Assert(ControllerView.PrintContext != null); ControllerView.UpdateLayout(); Debug.Assert(StartIndex <= EndIndex); ILayoutNodeStateView FirstStateView = (ILayoutNodeStateView)ControllerView.StateViewTable[ParentInner.StateList[StartIndex]]; Point Origin = FirstStateView.CellOrigin.Opposite; for (int i = StartIndex; i < EndIndex; i++) { ILayoutNodeStateView StateView = (ILayoutNodeStateView)ControllerView.StateViewTable[ParentInner.StateList[i]]; Debug.Assert(RegionHelper.IsValid(StateView.ActualCellSize)); StateView.PrintCells(Origin); } }
/// <summary> /// Prints all visible cells in a view using <see cref="PrintContext"/>. /// </summary> /// <param name="stateView">The view to print.</param> /// <param name="origin">The origin from where to start printing.</param> public virtual void Print(ILayoutNodeStateView stateView, Point origin) { UpdateLayout(); Debug.Assert(RegionHelper.IsValid(stateView.ActualCellSize)); stateView.PrintCells(origin); if (ShowLineNumber) { DisplayLineNumber(PrintCellViewLineNumber); } }