Пример #1
0
        /// <summary>
        /// Create cells for the provided state view.
        /// </summary>
        /// <param name="context">Context used to build the cell view tree.</param>
        /// <param name="parentCellView">The parent cell view.</param>
        public virtual IFrameCellView BuildNodeCells(IFrameCellViewTreeContext context, IFrameCellViewCollection parentCellView)
        {
            IFrameNodeState State = context.StateView.State;

            Debug.Assert(State != null);
            Debug.Assert(State.InnerTable != null);
            Debug.Assert(State.InnerTable.ContainsKey(PropertyName));

            IFramePlaceholderInner <IFrameBrowsingPlaceholderNodeIndex> Inner = State.InnerTable[PropertyName] as IFramePlaceholderInner <IFrameBrowsingPlaceholderNodeIndex>;

            Debug.Assert(Inner != null);
            Debug.Assert(Inner.ChildState != null);
            IFrameNodeState ChildState = Inner.ChildState;

            IFrameStateViewDictionary StateViewTable = context.ControllerView.StateViewTable;

            Debug.Assert(StateViewTable.ContainsKey(ChildState));

            IFrameNodeStateView StateView      = context.StateView;
            IFrameNodeStateView ChildStateView = StateViewTable[ChildState];

            Debug.Assert(ChildStateView.RootCellView == null);
            context.SetChildStateView(ChildStateView);
            ChildStateView.BuildRootCellView(context);
            context.RestoreParentStateView(StateView);
            Debug.Assert(ChildStateView.RootCellView != null);

            IFrameContainerCellView EmbeddingCellView = CreateFrameCellView(context.StateView, parentCellView, ChildStateView);

            ValidateContainerCellView(context.StateView, parentCellView, ChildStateView, EmbeddingCellView);

            ChildStateView.SetContainerCellView(EmbeddingCellView);

            AssignEmbeddingCellView(context.StateView, EmbeddingCellView);

            return(EmbeddingCellView);
        }
Пример #2
0
 /// <summary>
 /// Builds the cell view tree for this view.
 /// </summary>
 /// <param name="context">Context used to build the cell view tree.</param>
 public abstract void BuildRootCellView(IFrameCellViewTreeContext context);
Пример #3
0
 private protected virtual void ValidateEmbeddingCellView(IFrameCellViewTreeContext context, IFrameCellViewCollection embeddingCellView)
 {
     Debug.Assert(embeddingCellView.StateView == context.StateView);
     IFrameCellViewCollection ParentCellView = embeddingCellView.ParentCellView;
 }
 private protected override void CloseCellViewTreeContext(IFrameCellViewTreeContext context)
 {
     Debug.Assert(((IFocusCellViewTreeContext)context).ForcedCommentStateView == null);
 }
 private protected override void ValidateVisibleCellView(IFrameCellViewTreeContext context, IFrameVisibleCellView cellView)
 {
     Debug.Assert(((IFocusVisibleCellView)cellView).StateView == ((IFocusCellViewTreeContext)context).StateView);
     Debug.Assert(((IFocusVisibleCellView)cellView).Frame == this);
     IFocusCellViewCollection ParentCellView = ((IFocusVisibleCellView)cellView).ParentCellView;
 }
Пример #6
0
 private protected virtual void ValidateVisibleCellView(IFrameCellViewTreeContext context, IFrameVisibleCellView cellView)
 {
     Debug.Assert(cellView.StateView == context.StateView);
     Debug.Assert(cellView.Frame == this);
     IFrameCellViewCollection ParentCellView = cellView.ParentCellView;
 }
 /// <summary>
 /// Create cells for the provided state view.
 /// </summary>
 /// <param name="context">Context used to build the cell view tree.</param>
 /// <param name="parentCellView">The collection of cell views containing this view. Null for the root of the cell tree.</param>
 public abstract override IFrameCellView BuildBlockCells(IFrameCellViewTreeContext context, IFrameCellViewCollection parentCellView);
Пример #8
0
 /// <summary></summary>
 protected virtual bool IsDisplayed(IFrameCellViewTreeContext context, string text)
 {
     return(context.ControllerView.CommentDisplayMode == Constants.CommentDisplayModes.All && text != null);
 }
Пример #9
0
 /// <summary>
 /// Builds the cell view tree for this view.
 /// </summary>
 /// <param name="context">Context used to build the cell view tree.</param>
 public override void BuildRootCellView(IFrameCellViewTreeContext context)
 {
     base.BuildRootCellView(context);
 }
Пример #10
0
 private protected override void ValidateEmptyCellView(IFrameCellViewTreeContext context, IFrameEmptyCellView emptyCellView)
 {
     Debug.Assert(((IFocusEmptyCellView)emptyCellView).StateView == ((IFocusCellViewTreeContext)context).StateView);
     IFocusCellViewCollection ParentCellView = ((IFocusEmptyCellView)emptyCellView).ParentCellView;
 }