C# Class SIL.FieldWorks.TE.ScripturePublication

Inheritance: SIL.FieldWorks.Common.PrintLayout.PublicationControl, IxCoreColleague, ILocationTracker, ITeView, IBtAwareView
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Свойство Type Description
m_BackTranslationWS int
m_app IApp
m_bookFilter SIL.FieldWorks.FDO.DomainServices.FilteredScrBooks
m_filterInstance int
m_footnoteVc SIL.FieldWorks.TE.FootnoteVc
m_viewType TeViewType

Private Properties

Свойство Type Description
GetSectionLevel int
GetSharedSubstream IVwLayoutStream
UpdateFindReplaceMenuItem bool

Méthodes publiques

Méthode Description
ActivateView ( ) : void

Perform TE-specific user view activation.

GetBook ( SelectionHelper selHelper, SelectionHelper selLimitType ) : IScrBook

Gets the current book, or null if there is no current book (e.g. no selection or empty view).

GetBookIndex ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int

Get the index of the current book (relative to book filter), or -1 if there is no current book (e.g. no selection or empty view).

The returned value is suitable for making a selection.

GetLevelCount ( int tag ) : int

Gets the number of levels for the given tag.

GetLevelIndex ( int tag ) : int

Gets the index of the level for the given tag based on the current selection.

GetMessageTargets ( ) : IxCoreColleague[]

Get the possible message targets, i.e. the view(s) we are showing

GetSection ( SelectionHelper selHelper, SelectionHelper selLimitType ) : IScrSection

Gets the current section, or null if we're not in a section (e.g. the IP is in a title).

GetSectionIndexInBook ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int

Gets the index of the section relative to the book, or -1 if we're not in a section.

GetSectionIndexInView ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int

Get the index of the section (relative to RootBox), or -1 if we're not in a section (e.g. the IP is in a title).

The returned value is suitable for making a selection.

GetWritingSystemForHvo ( int hvo ) : int

Gets the writing system for the HVO. This could either be the vernacular or analysis writing system.

Init ( XCore.Mediator mediator, System configurationParameters ) : void

Not used

OnInsertDiffPara ( IVwRootBox rootBox, ITsTextProps ttpDest, ITsTextProps ttpSrc, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse

see OnInsertDiffParas

OnInsertDiffParas ( IVwRootBox rootBox, ITsTextProps ttpDest, int cPara, ITsTextProps ttpSrcArray, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse

Handle insertion of paragraphs (i.e., from clipboard) with properties that don't match the properties of the paragraph where they are being inserted. This gives us the opportunity to create/modify the DB structure to recieve the paragraphs being inserted and to reject certain types of paste operations (such as attempting to paste a book).

OnProblemDeletion ( IVwSelection sel, VwDelProbType dpt ) : VwDelProbResponse

Override to pass handling of problem deletion on to editing helper.

ScripturePublication ( FwStyleSheet stylesheet, int filterInstance, IPublication publication, TeViewType viewType, System.DateTime printDateTime, IHelpTopicProvider helpTopicProvider, IApp app, int btWs ) : System

Constructs a general-purpose publication for printing Scripture

SetBookAndSection ( SelectionHelper selHelper, SelectionHelper selLimitType, int iBook, int iSection ) : void

Set both book and section. Don't make a selection; typically the caller will proceed to do that.

This method should change only the book and section levels of the selection, but not any other level.

ShowContextMenu ( Point loc ) : void

Shows the context menu.

Méthodes protégées

Méthode Description
AddDivisionsForBooks ( ) : void

Adds the divisions for books.

ApplyBookFilterAndCreateDivisions ( ) : void

Applies the book filter and creates divisions.

Dispose ( bool disposing ) : void

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.

If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.

GetDivisionLayoutMgr ( PrintLayoutPortion divisionPortion, int hvoBook ) : SIL.FieldWorks.Common.PrintLayout.DivisionLayoutMgr

Gets a DivisionLayoutMgr for a division.

Allows sub classes to override the type of DivisionLayoutMgr that is created.

GetInternalEditingHelper ( ) : SIL.FieldWorks.Common.RootSites.RootSiteEditingHelper

Gets a instance of the EditingHelper used to process editing requests.

GetNonFocusedSelectionState ( Control windowGainingFocus ) : VwSelectionState

If the annotations window is gaining focus, then we don't want the print layout's range selections to be hidden.

GetPrintLayoutConfigurer ( PrintLayoutPortion divisionPortion, int hvoBook, IVwLayoutStream sharedStream, int ws ) : SIL.FieldWorks.TE.TePrintLayoutConfig

Gets the print layout configurer.

OnKeyPress ( System e ) : void

Override to restore prompt selection if relevant (for segmented BT).

OnMouseUp ( MouseEventArgs e ) : void

Process mouse button up event

OnPaint ( PaintEventArgs e ) : void

Override of UserControl.OnPaint

OnUpdateEditFind ( object args ) : bool

Determine if Edit Find menu item should be enabled.

OnUpdateEditFindNext ( object args ) : bool

Determine if Edit Find Next menu item should be enabled.

OnUpdateEditFindPrev ( object args ) : bool

Determine if Edit Find Prev menu item should be enabled.

OnUpdateEditReplace ( object args ) : bool

Determine if Edit Replace menu item should be enabled.

OnUpdateInformationBar ( object args ) : bool

RefreshDisplay ( bool fPreserveSelection ) : void

Refreshes the display.

Private Methods

Méthode Description
GetSectionLevel ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int

Gets the level for the section tag.

GetSharedSubstream ( ) : IVwLayoutStream

Gets the shared substream.

UpdateFindReplaceMenuItem ( SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : bool

Updates any of the Edit/Find,replace menu items based on the selected view

Method Details

ActivateView() public méthode

Perform TE-specific user view activation.
public ActivateView ( ) : void
Résultat void

AddDivisionsForBooks() protected méthode

Adds the divisions for books.
protected AddDivisionsForBooks ( ) : void
Résultat void

ApplyBookFilterAndCreateDivisions() protected méthode

Applies the book filter and creates divisions.
protected ApplyBookFilterAndCreateDivisions ( ) : void
Résultat void

Dispose() protected méthode

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.
If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GetBook() public méthode

Gets the current book, or null if there is no current book (e.g. no selection or empty view).
public GetBook ( SelectionHelper selHelper, SelectionHelper selLimitType ) : IScrBook
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
Résultat IScrBook

GetBookIndex() public méthode

Get the index of the current book (relative to book filter), or -1 if there is no current book (e.g. no selection or empty view).
The returned value is suitable for making a selection.
public GetBookIndex ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
Résultat int

GetDivisionLayoutMgr() protected méthode

Gets a DivisionLayoutMgr for a division.
Allows sub classes to override the type of DivisionLayoutMgr that is created.
protected GetDivisionLayoutMgr ( PrintLayoutPortion divisionPortion, int hvoBook ) : SIL.FieldWorks.Common.PrintLayout.DivisionLayoutMgr
divisionPortion PrintLayoutPortion portion of book to be layed out in divsion
hvoBook int The hvo of the book.
Résultat SIL.FieldWorks.Common.PrintLayout.DivisionLayoutMgr

GetInternalEditingHelper() protected méthode

Gets a instance of the EditingHelper used to process editing requests.
protected GetInternalEditingHelper ( ) : SIL.FieldWorks.Common.RootSites.RootSiteEditingHelper
Résultat SIL.FieldWorks.Common.RootSites.RootSiteEditingHelper

GetLevelCount() public méthode

Gets the number of levels for the given tag.
public GetLevelCount ( int tag ) : int
tag int The tag.
Résultat int

GetLevelIndex() public méthode

Gets the index of the level for the given tag based on the current selection.
public GetLevelIndex ( int tag ) : int
tag int The tag.
Résultat int

GetMessageTargets() public méthode

Get the possible message targets, i.e. the view(s) we are showing
public GetMessageTargets ( ) : IxCoreColleague[]
Résultat IxCoreColleague[]

GetNonFocusedSelectionState() protected méthode

If the annotations window is gaining focus, then we don't want the print layout's range selections to be hidden.
protected GetNonFocusedSelectionState ( Control windowGainingFocus ) : VwSelectionState
windowGainingFocus System.Windows.Forms.Control
Résultat VwSelectionState

GetPrintLayoutConfigurer() protected méthode

Gets the print layout configurer.
protected GetPrintLayoutConfigurer ( PrintLayoutPortion divisionPortion, int hvoBook, IVwLayoutStream sharedStream, int ws ) : SIL.FieldWorks.TE.TePrintLayoutConfig
divisionPortion PrintLayoutPortion portion of book to be layed out in division
hvoBook int The hvo of the book.
sharedStream IVwLayoutStream A layout stream used for footnotes which is shared across /// multiple divisions
ws int The writing system.
Résultat SIL.FieldWorks.TE.TePrintLayoutConfig

GetSection() public méthode

Gets the current section, or null if we're not in a section (e.g. the IP is in a title).
public GetSection ( SelectionHelper selHelper, SelectionHelper selLimitType ) : IScrSection
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
Résultat IScrSection

GetSectionIndexInBook() public méthode

Gets the index of the section relative to the book, or -1 if we're not in a section.
public GetSectionIndexInBook ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
Résultat int

GetSectionIndexInView() public méthode

Get the index of the section (relative to RootBox), or -1 if we're not in a section (e.g. the IP is in a title).
The returned value is suitable for making a selection.
public GetSectionIndexInView ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
Résultat int

GetWritingSystemForHvo() public méthode

Gets the writing system for the HVO. This could either be the vernacular or analysis writing system.
public GetWritingSystemForHvo ( int hvo ) : int
hvo int HVO
Résultat int

Init() public méthode

Not used
public Init ( XCore.Mediator mediator, System configurationParameters ) : void
mediator XCore.Mediator
configurationParameters System
Résultat void

OnInsertDiffPara() public méthode

see OnInsertDiffParas
public OnInsertDiffPara ( IVwRootBox rootBox, ITsTextProps ttpDest, ITsTextProps ttpSrc, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse
rootBox IVwRootBox
ttpDest ITsTextProps
ttpSrc ITsTextProps
tssParas ITsString
tssTrailing ITsString
Résultat VwInsertDiffParaResponse

OnInsertDiffParas() public méthode

Handle insertion of paragraphs (i.e., from clipboard) with properties that don't match the properties of the paragraph where they are being inserted. This gives us the opportunity to create/modify the DB structure to recieve the paragraphs being inserted and to reject certain types of paste operations (such as attempting to paste a book).
public OnInsertDiffParas ( IVwRootBox rootBox, ITsTextProps ttpDest, int cPara, ITsTextProps ttpSrcArray, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse
rootBox IVwRootBox the sender
ttpDest ITsTextProps properties of destination paragraph
cPara int number of paragraphs to be inserted
ttpSrcArray ITsTextProps Array of props of each para to be inserted
tssParas ITsString Array of TsStrings for each para to be inserted
tssTrailing ITsString Text of an incomplete paragraph to insert at end (with /// the properties of the destination paragraph.
Résultat VwInsertDiffParaResponse

OnKeyPress() protected méthode

Override to restore prompt selection if relevant (for segmented BT).
protected OnKeyPress ( System e ) : void
e System
Résultat void

OnMouseUp() protected méthode

Process mouse button up event
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

OnPaint() protected méthode

Override of UserControl.OnPaint
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs Info needed to paint
Résultat void

OnProblemDeletion() public méthode

Override to pass handling of problem deletion on to editing helper.
public OnProblemDeletion ( IVwSelection sel, VwDelProbType dpt ) : VwDelProbResponse
sel IVwSelection The sel.
dpt VwDelProbType The DPT.
Résultat VwDelProbResponse

OnUpdateEditFind() protected méthode

Determine if Edit Find menu item should be enabled.
protected OnUpdateEditFind ( object args ) : bool
args object The menu item properties
Résultat bool

OnUpdateEditFindNext() protected méthode

Determine if Edit Find Next menu item should be enabled.
protected OnUpdateEditFindNext ( object args ) : bool
args object The menu item properties
Résultat bool

OnUpdateEditFindPrev() protected méthode

Determine if Edit Find Prev menu item should be enabled.
protected OnUpdateEditFindPrev ( object args ) : bool
args object The menu item properties
Résultat bool

OnUpdateEditReplace() protected méthode

Determine if Edit Replace menu item should be enabled.
protected OnUpdateEditReplace ( object args ) : bool
args object The menu item properties
Résultat bool

OnUpdateInformationBar() protected méthode

protected OnUpdateInformationBar ( object args ) : bool
args object
Résultat bool

RefreshDisplay() protected méthode

Refreshes the display.
protected RefreshDisplay ( bool fPreserveSelection ) : void
fPreserveSelection bool True to save the selection and restore it afterwards, /// false otherwise
Résultat void

ScripturePublication() public méthode

Constructs a general-purpose publication for printing Scripture
public ScripturePublication ( FwStyleSheet stylesheet, int filterInstance, IPublication publication, TeViewType viewType, System.DateTime printDateTime, IHelpTopicProvider helpTopicProvider, IApp app, int btWs ) : System
stylesheet FwStyleSheet The stylesheet.
filterInstance int number used to make filters unique per main window
publication IPublication The publication to get the information from (or /// null to keep the defaults)
viewType TeViewType Type of the view.
printDateTime System.DateTime Date/Time of the printing
helpTopicProvider IHelpTopicProvider The help topic provider.
app IApp The app.
btWs int Backtranslation WS
Résultat System

SetBookAndSection() public méthode

Set both book and section. Don't make a selection; typically the caller will proceed to do that.
This method should change only the book and section levels of the selection, but not any other level.
public SetBookAndSection ( SelectionHelper selHelper, SelectionHelper selLimitType, int iBook, int iSection ) : void
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
iBook int The index of the book (in the book filter).
iSection int The index of the section (relative to /// ), or -1 for a selection that is not in a section (e.g. /// title).
Résultat void

ShowContextMenu() public méthode

Shows the context menu.
public ShowContextMenu ( Point loc ) : void
loc Point The loc.
Résultat void

Property Details

m_BackTranslationWS protected_oe property

The back translation WS
protected int m_BackTranslationWS
Résultat int

m_app protected_oe property

protected IApp m_app
Résultat IApp

m_bookFilter protected_oe property

protected FilteredScrBooks,SIL.FieldWorks.FDO.DomainServices m_bookFilter
Résultat SIL.FieldWorks.FDO.DomainServices.FilteredScrBooks

m_filterInstance protected_oe property

protected int m_filterInstance
Résultat int

m_footnoteVc protected_oe property

protected FootnoteVc,SIL.FieldWorks.TE m_footnoteVc
Résultat SIL.FieldWorks.TE.FootnoteVc

m_viewType protected_oe property

protected TeViewType m_viewType
Résultat TeViewType