/// ------------------------------------------------------------------------------------ /// <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); }
/// ------------------------------------------------------------------------------------ /// <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.TranslatedScriptureOA.Hvo; ISilDataAccess decorator; if (m_divisionPortion != PrintLayoutPortion.AllContent) decorator = new PrintLayoutDataByFlidDecorator(m_fdoCache, m_bookFilterInstance, m_divisionPortion == PrintLayoutPortion.TitleAndIntro); else decorator = new ScrBookFilterDecorator(m_fdoCache, m_bookFilterInstance); NLevelOwnerSvd ownerSvd = new NLevelOwnerSvd(2, decorator, hvoScripture); if (m_sharedStream == null) { FootnoteVc footnoteVc = new FootnoteVc(TeStVc.LayoutViewTarget.targetPrint, div.FilterInstance); footnoteVc.DefaultWs = DefaultWs; 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); } }
/// ------------------------------------------------------------------------------------ /// <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.TranslatedScriptureOA.Hvo; BtFootnotePrintLayoutSideBySideVc footnoteVc = new BtFootnotePrintLayoutSideBySideVc( TeStVc.LayoutViewTarget.targetPrint, div.FilterInstance, m_styleSheet, m_fdoCache, m_ws); NLevelOwnerSvd ownerSvd = new NLevelOwnerSvd(2, new ScrBookFilterDecorator(m_fdoCache, m_bookFilterInstance), hvoScripture); div.AddSubordinateStream(hvoScripture, (int)FootnoteFrags.kfrScripture, footnoteVc, ownerSvd); }
/// ------------------------------------------------------------------------------------ /// <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); } }