Esempio n. 1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Creates and returns the primary view construtor for the main view in the layout.
        /// This is only called once.
        /// </summary>
        /// <param name="div"></param>
        /// <returns>The view constructor to be used for the main view</returns>
        /// ------------------------------------------------------------------------------------
        public virtual IVwViewConstructor MakeMainVc(DivisionLayoutMgr div)
        {
            DraftViewVc vc;

            if (m_divisionPortion == PrintLayoutPortion.TitleAndIntro)
            {
                vc = new ScriptureBookIntroVc(TeStVc.LayoutViewTarget.targetPrint,
                                              div.FilterInstance, m_styleSheet, false);
            }
            else if (m_divisionPortion == PrintLayoutPortion.ScriptureSections)
            {
                vc = new ScriptureBodyVc(TeStVc.LayoutViewTarget.targetPrint,
                                         div.FilterInstance, m_styleSheet, false);
            }
            else
            {
                vc = new DraftViewVc(TeStVc.LayoutViewTarget.targetPrint, div.FilterInstance,
                                     m_styleSheet, false);
            }
            vc.HeightEstimator = this;
            if ((m_viewType & TeViewType.BackTranslation) != 0)
            {
                vc.ContentType = Options.UseInterlinearBackTranslation ? StVc.ContentTypes.kctSegmentBT : StVc.ContentTypes.kctSimpleBT;
                vc.DefaultWs   = m_ws;
            }
            vc.Cache       = m_fdoCache;
            vc.PrintLayout = true;
            return(vc);
        }
Esempio n. 2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates and returns the primary view construtor for the main view in the layout.
		/// This is only called once.
		/// </summary>
		/// <param name="div"></param>
		/// <returns>The view constructor to be used for the main view</returns>
		/// ------------------------------------------------------------------------------------
		public virtual IVwViewConstructor MakeMainVc(DivisionLayoutMgr div)
		{
			DraftViewVc vc;
			if (m_divisionPortion == PrintLayoutPortion.TitleAndIntro)
			{
				vc = new ScriptureBookIntroVc(TeStVc.LayoutViewTarget.targetPrint,
					div.FilterInstance, m_styleSheet, false);
			}
			else if (m_divisionPortion == PrintLayoutPortion.ScriptureSections)
			{
				vc = new ScriptureBodyVc(TeStVc.LayoutViewTarget.targetPrint,
					div.FilterInstance, m_styleSheet, false);
			}
			else
			{
				vc = new DraftViewVc(TeStVc.LayoutViewTarget.targetPrint, div.FilterInstance,
					m_styleSheet, false);
			}
			vc.HeightEstimator = this;
			if ((m_viewType & TeViewType.BackTranslation) != 0)
			{
				vc.ContentType = Options.UseInterlinearBackTranslation ? StVc.ContentTypes.kctSegmentBT : StVc.ContentTypes.kctSimpleBT;
				vc.DefaultWs = m_ws;
			}
			vc.Cache = m_fdoCache;
			vc.PrintLayout = true;
			return vc;
		}