示例#1
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.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);
			}
		}
示例#2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Makes a call to MakeSubordinateView, to add a views containing footnotes.
		/// </summary>
		/// <param name="div">The division layout manager</param>
		/// ------------------------------------------------------------------------------------
		public virtual void ConfigureSubordinateViews(DivisionLayoutMgr div)
		{
			int hvoScr = m_fdoCache.LangProject.TranslatedScriptureOA.Hvo;
			if (m_sharedStream == null)
			{
				div.AddSubordinateStream(hvoScr,
					DummyFirstSubViewVc.kfragScrFootnotes,
					new DummyFirstSubViewVc(),
					new NLevelOwnerSvd(2, m_fdoCache.MainCacheAccessor, hvoScr));
			}
			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,
					new NLevelOwnerSvd(2, m_fdoCache.MainCacheAccessor, hvoScr));
			}
		}
示例#3
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);
			}
		}