コード例 #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Makes a call to MakeSubordinateView, to add a view containing footnotes.
        /// </summary>
        /// <param name="div">The PrintLayout manager object</param>
        /// ------------------------------------------------------------------------------------
        public override void ConfigureSubordinateViews(DivisionLayoutMgr div)
        {
            int hvoScripture = m_fdoCache.LangProject.TranslatedScriptureOAHvo;

            BtFootnotePrintLayoutSideBySideVc footnoteVc = new BtFootnotePrintLayoutSideBySideVc(
                TeStVc.LayoutViewTarget.targetPrint, div.FilterInstance, m_styleSheet,
                m_fdoCache, m_ws);
            NLevelOwnerSvd ownerSvd = new NLevelOwnerSvd(2, m_fdoCache.MainCacheAccessor,
                                                         hvoScripture);

            IVwVirtualHandler vh =
                FilteredScrBooks.GetFilterInstance(m_fdoCache, div.FilterInstance);

            if (vh != null)
            {
                ownerSvd.AddTagLookup((int)Scripture.ScriptureTags.kflidScriptureBooks,
                                      vh.Tag);
            }

            div.AddSubordinateStream(hvoScripture, (int)FootnoteFrags.kfrScripture,
                                     footnoteVc, ownerSvd);
        }
コード例 #2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Makes a call to MakeSubordinateView, to add a view containing footnotes.
        /// </summary>
        /// <param name="div">The division layout manager</param>
        /// ------------------------------------------------------------------------------------
        public virtual void ConfigureSubordinateViews(DivisionLayoutMgr div)
        {
            int hvoScripture = m_fdoCache.LangProject.TranslatedScriptureOAHvo;
            int wsDefault    = ((m_viewType & TeViewType.BackTranslation) != 0 ?
                                m_fdoCache.DefaultAnalWs : m_fdoCache.DefaultVernWs);

            NLevelOwnerSvd ownerSvd = new NLevelOwnerSvd(2, m_fdoCache.MainCacheAccessor,
                                                         hvoScripture);

            IVwVirtualHandler vh =
                FilteredScrBooks.GetFilterInstance(m_fdoCache, div.FilterInstance);

            if (vh != null)
            {
                ownerSvd.AddTagLookup((int)Scripture.ScriptureTags.kflidScriptureBooks,
                                      vh.Tag);
            }

            if (m_sharedStream == null)
            {
                FootnoteVc footnoteVc = new FootnoteVc(div.FilterInstance,
                                                       TeStVc.LayoutViewTarget.targetPrint, wsDefault);
                footnoteVc.Cache = m_fdoCache;
                footnoteVc.DisplayTranslation = (m_viewType & TeViewType.BackTranslation) != 0;

                div.AddSubordinateStream(hvoScripture, (int)FootnoteFrags.kfrScripture,
                                         footnoteVc, ownerSvd);
            }
            else
            {
                int hvoRoot;
                IVwViewConstructor vc;
                int           frag;
                IVwStylesheet stylesheet;
                ((IVwRootBox)m_sharedStream).GetRootObject(out hvoRoot, out vc, out frag, out stylesheet);
                div.AddSharedSubordinateStream(m_sharedStream, vc, ownerSvd);
            }
        }