/// ------------------------------------------------------------------------------------ /// <summary> /// Constructs a TePrintLayoutConfig to configure the main print layout /// </summary> /// <param name="cache">The cache.</param> /// <param name="styleSheet">The style sheet.</param> /// <param name="publication">The publication.</param> /// <param name="viewType">Type of the view.</param> /// <param name="filterInstance">the book filter instance in effect</param> /// <param name="printDateTime">printing date and time</param> /// <param name="divisionPortion">portion of the book to be layed out in this division</param> /// <param name="hvoBook">The hvo of the book we're displaying.</param> /// <param name="sharedStream">A layout stream used for footnotes which is shared across /// multiple divisions</param> /// <param name="ws">The writing system to use for the view.</param> /// ------------------------------------------------------------------------------------ public TePrintLayoutConfig(FdoCache cache, IVwStylesheet styleSheet, IPublication publication, TeViewType viewType, int filterInstance, DateTime printDateTime, PrintLayoutPortion divisionPortion, int hvoBook, IVwLayoutStream sharedStream, int ws) { m_fdoCache = cache; m_scr = m_fdoCache.LangProject.TranslatedScriptureOA; m_styleSheet = styleSheet; m_pub = publication; m_viewType = viewType; m_bookFilterInstance = filterInstance; m_printDateTime = printDateTime; m_divisionPortion = divisionPortion; m_hvoBook = hvoBook; m_sharedStream = sharedStream; m_ws = ws; m_paraCounter = cache.ServiceLocator.GetInstance <IParagraphCounterRepository>().GetParaCounter((int)TeViewGroup.Scripture); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Gets the print layout configurer. /// </summary> /// <param name="divisionPortion">division portion - not used since BT layouts out all content</param> /// <param name="hvoBook">The hvo of the book.</param> /// <param name="sharedStream">A layout stream used for footnotes which is shared across /// multiple divisions</param> /// <param name="ws">The writing system</param> /// <returns>A print layout configurer</returns> /// ------------------------------------------------------------------------------------ protected override TePrintLayoutConfig GetPrintLayoutConfigurer(PrintLayoutPortion divisionPortion, int hvoBook, IVwLayoutStream sharedStream, int ws) { return new TeBtPrintLayoutConfig(m_cache, m_stylesheet, m_publication, m_viewType, m_filterInstance, m_printDateTime, hvoBook, sharedStream, ws); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Gets a DivisionLayoutMgr for a division. /// </summary> /// <param name="divisionPortion">portion of book to be layed out in divsion</param> /// <param name="hvoBook">The hvo of the book.</param> /// <returns></returns> /// <remarks> /// Allows sub classes to override the type of DivisionLayoutMgr that is created. /// </remarks> /// ------------------------------------------------------------------------------------ protected virtual DivisionLayoutMgr GetDivisionLayoutMgr(PrintLayoutPortion divisionPortion, int hvoBook) { // An intro division always has just one column IPubDivision pubDivision = m_publication.DivisionsOS[0]; int numberOfColumns = divisionPortion == PrintLayoutPortion.TitleAndIntro ? 1 : pubDivision.NumColumns; IVwLayoutStream sharedStream = GetSharedSubstream(); return new TeDivisionLayoutMgr( GetPrintLayoutConfigurer(divisionPortion, hvoBook, sharedStream, m_BackTranslationWS), pubDivision, m_filterInstance, numberOfColumns, divisionPortion == PrintLayoutPortion.TitleAndIntro); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Constructs a TePrintLayoutConfig to configure the main print layout /// </summary> /// <param name="cache">The cache.</param> /// <param name="styleSheet">The style sheet.</param> /// <param name="publication">The publication.</param> /// <param name="viewType">Type of the view.</param> /// <param name="filterInstance">the book filter instance in effect</param> /// <param name="printDateTime">printing date and time</param> /// <param name="divisionPortion">portion of the book to be layed out in this division</param> /// <param name="hvoBook">The hvo of the book we're displaying.</param> /// <param name="sharedStream">A layout stream used for footnotes which is shared across /// multiple divisions</param> /// <param name="ws">The writing system to use for the view.</param> /// ------------------------------------------------------------------------------------ public TePrintLayoutConfig(FdoCache cache, IVwStylesheet styleSheet, IPublication publication, TeViewType viewType, int filterInstance, DateTime printDateTime, PrintLayoutPortion divisionPortion, int hvoBook, IVwLayoutStream sharedStream, int ws) { m_fdoCache = cache; m_scr = m_fdoCache.LangProject.TranslatedScriptureOA; m_styleSheet = styleSheet; m_pub = publication; m_viewType = viewType; m_bookFilterInstance = filterInstance; m_printDateTime = printDateTime; m_divisionPortion = divisionPortion; m_hvoBook = hvoBook; m_sharedStream = sharedStream; m_ws = ws; m_paraCounter = cache.ServiceLocator.GetInstance<IParagraphCounterRepository>().GetParaCounter((int)TeViewGroup.Scripture); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Gets the print layout configurer. /// </summary> /// <param name="divisionPortion">division portion - not used since BT layouts out all content</param> /// <param name="hvoBook">The hvo of the book.</param> /// <param name="sharedStream">A layout stream used for footnotes which is shared across /// multiple divisions</param> /// <param name="ws">The writing system</param> /// <returns>A print layout configurer</returns> /// ------------------------------------------------------------------------------------ protected override TePrintLayoutConfig GetPrintLayoutConfigurer(PrintLayoutPortion divisionPortion, int hvoBook, IVwLayoutStream sharedStream, int ws) { return(new TeBtPrintLayoutConfig(m_cache, m_stylesheet, m_publication, m_viewType, m_filterInstance, m_printDateTime, hvoBook, sharedStream, ws)); }