コード例 #1
0
        /// <summary>
        /// Prints the cell.
        /// </summary>
        /// <param name="origin">The origin from where to start printing.</param>
        public virtual void Print(Point origin)
        {
            Debug.Assert(RegionHelper.IsValid(ActualCellSize));

            Debug.Assert(BlockStateView != null);
            BlockStateView.PrintCells(origin);
        }
コード例 #2
0
        /// <summary>
        /// Draws the cell.
        /// </summary>
        public virtual void Draw()
        {
            Debug.Assert(RegionHelper.IsValid(ActualCellSize));

            Debug.Assert(BlockStateView != null);
            BlockStateView.DrawCells();
        }
コード例 #3
0
        /// <summary>
        /// Checks if the tree of cell views under this state is valid.
        /// </summary>
        /// <param name="expectedCellViewTable">Cell views that are associated to a property of the node.</param>
        /// <param name="actualCellViewTable">Cell views that are found in the tree.</param>
        public override bool IsCellViewTreeValid(FrameAssignableCellViewReadOnlyDictionary <string> expectedCellViewTable, FrameAssignableCellViewDictionary <string> actualCellViewTable)
        {
            bool IsValid = true;

            IsValid &= BlockStateView.IsCellViewTreeValid();

            return(IsValid);
        }
コード例 #4
0
        /// <summary>
        /// Updates the actual size of the cell.
        /// </summary>
        public virtual void UpdateActualSize()
        {
            Debug.Assert(BlockStateView != null);
            BlockStateView.UpdateActualCellsSize();

            Debug.Assert(RegionHelper.IsValid(BlockStateView.ActualCellSize));
            ActualCellSize = BlockStateView.ActualCellSize;

            Debug.Assert(Size.IsEqual(CellRect.Size, ActualCellSize));
        }
コード例 #5
0
        /// <summary>
        /// Arranges the cell.
        /// </summary>
        /// <param name="origin">The cell location.</param>
        public virtual void Arrange(Point origin)
        {
            CellOrigin = origin;

            Point OriginWithPadding = origin.Moved(CellPadding.Left, Controller.Measure.Zero);

            Debug.Assert(BlockStateView != null);
            BlockStateView.ArrangeCells(OriginWithPadding);

            Debug.Assert(RegionHelper.IsValid(CellOrigin));
        }
コード例 #6
0
        /// <summary>
        /// Measures the cell.
        /// </summary>
        /// <param name="collectionWithSeparator">A collection that can draw separators around the cell.</param>
        /// <param name="referenceContainer">The cell view in <paramref name="collectionWithSeparator"/> that contains this cell.</param>
        /// <param name="separatorLength">The length of the separator in <paramref name="collectionWithSeparator"/>.</param>
        public virtual void Measure(ILayoutCellViewCollection collectionWithSeparator, ILayoutCellView referenceContainer, Measure separatorLength)
        {
            CollectionWithSeparator = collectionWithSeparator;
            ReferenceContainer      = referenceContainer;
            SeparatorLength         = separatorLength;

            Debug.Assert(BlockStateView != null);
            BlockStateView.MeasureCells(collectionWithSeparator, referenceContainer, separatorLength);

            CellSize       = BlockStateView.CellSize;
            ActualCellSize = RegionHelper.InvalidSize;

            Debug.Assert(RegionHelper.IsValid(CellSize));
        }
コード例 #7
0
 /// <summary>
 /// Updates the focus chain with cells in the tree.
 /// </summary>
 /// <param name="focusChain">The list of focusable cell views found in the tree.</param>
 /// <param name="focusedNode">The currently focused node.</param>
 /// <param name="focusedFrame">The currently focused frame in the template associated to <paramref name="focusedNode"/>.</param>
 /// <param name="matchingFocus">The focus in <paramref name="focusChain"/> that match <paramref name="focusedNode"/> and <paramref name="focusedFrame"/> upon return.</param>
 public virtual void UpdateFocusChain(IFocusFocusList focusChain, INode focusedNode, IFocusFrame focusedFrame, ref IFocusFocus matchingFocus)
 {
     BlockStateView.UpdateFocusChain(focusChain, focusedNode, focusedFrame, ref matchingFocus);
 }
コード例 #8
0
 /// <summary>
 /// Enumerate all visible cell views. Enumeration is interrupted if <paramref name="handler"/> returns true.
 /// </summary>
 /// <param name="handler">A handler to execute for each cell view.</param>
 /// <param name="cellView">The cell view for which <paramref name="handler"/> returned true. Null if none.</param>
 /// <param name="reversed">If true, search in reverse order.</param>
 /// <returns>The last value returned by <paramref name="handler"/>.</returns>
 public override bool EnumerateVisibleCellViews(Func <IFrameVisibleCellView, bool> handler, out IFrameVisibleCellView cellView, bool reversed)
 {
     return(BlockStateView.EnumerateVisibleCellViews(handler, out cellView, reversed));
 }
コード例 #9
0
 /// <summary>
 /// Update line numbers in the cell view.
 /// </summary>
 /// <param name="lineNumber">The current line number, updated upon return.</param>
 /// <param name="maxLineNumber">The maximum line number observed, updated upon return.</param>
 /// <param name="columnNumber">The current column number, updated upon return.</param>
 /// <param name="maxColumnNumber">The maximum column number observed, updated upon return.</param>
 public override void UpdateLineNumbers(ref int lineNumber, ref int maxLineNumber, ref int columnNumber, ref int maxColumnNumber)
 {
     BlockStateView.UpdateLineNumbers(ref lineNumber, ref maxLineNumber, ref columnNumber, ref maxColumnNumber);
 }
コード例 #10
0
 /// <summary>
 /// Clears all views (cells and states) within this cell view.
 /// </summary>
 public override void ClearCellTree()
 {
     BlockStateView.ClearRootCellView(StateView);
 }