C# Класс SIL.FieldWorks.IText.InterlinVc

View constructor for InterlinView. Just to get something working, currently it is just a literal.
Наследование: SIL.FieldWorks.Common.RootSites.FwBaseVc, IDisposable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
m_analRepository IWfiAnalysisRepository
m_coRepository ICmObjectRepository
m_fHaveOpenedParagraph bool
m_fShowDefaultSense bool
m_segRepository ISegmentRepository
m_stylesheet IVwStylesheet
m_wmbRepository IWfiMorphBundleRepository
m_wsAnalysis int
m_wsManager IWritingSystemManager
m_wsUi int
m_wsVernForDisplay int

Private Properties

Свойство Тип Описание
AddExtraBundleRows void
AddFreeformComment void
AddLineIndexProperty void
AddSegmentReference void
AddTssDirForVernWs void
AddTssDirForWs void
CanBeAnalyzed bool
CreateParaLoader IParaDataLoader
DisplayLexGlossWithInflType bool
DisplayMorphBundle void
DisplayMorphForm void
DisplaySingleInterlinearAnalysisWithLabels void
EnsureLoader void
EstimateParaHeight int
EstimateSegmentHeight int
EstimateStTextHeight int
GetAnnDefnId ICmAnnotationDefn
GetAnnDefnId int
GetAnnDefnId int
GetGuess int
GetRealWs int
GetRealWsOrBestWsForContext int
IsVernWs bool
IsWsRtl bool
JoinGlossAffixesOfInflVariantTypes void
LoadDataForSegments void
LoadParaData void
RecordGuessIfNotKnown void
SegDefnFromFfFlid ICmAnnotationDefn
SetActiveFreeform void
SetGuessing void
SetGuessing void
SetNoteLabelProps void
SetParaDirectionAndAlignment void
SetupRealVernWsForDisplay void
TryGetLexGlossWithInflTypeTss bool

Открытые методы

Метод Описание
AddLabelPile ( IVwEnv vwenv, ITsStrFactory tsf, SIL.FieldWorks.FDO.FdoCache cache, bool fWantMultipleSenseGloss, bool fShowMorphemes ) : void

Add the pile of labels used to identify the lines in interlinear text.

CheckDisposed ( ) : void

Throw if the IsDisposed property is true

Display ( IVwEnv vwenv, int hvo, int frag ) : void
DisplayEmbeddedObject ( IVwEnv vwenv, int hvo ) : void

Display the specified object (from an ORC embedded in a string). Don't display any embedded objects in interlinear text.

DisplayVariant ( IVwEnv vwenv, int tag, int frag ) : ITsString
DisplayVec ( IVwEnv vwenv, int hvo, int tag, int frag ) : void
Dispose ( ) : void
EstimateHeight ( int hvo, int frag, int dxAvailWidth ) : int

Estimate the height of things we display lazily.

GetGuessForWordform ( IWfiWordform wf, int ws ) : IAnalysis
InterlinVc ( FdoCache cache ) : System

Initializes a new instance of the InterlinVc class.

We use the default analysis writing system as the default, even though this view displays data in multiple writing systems. It's pretty arbitrary in this case, but we need a valid WS because if we get an ORC, we have to create a Ts String using some writing system.

LoadDataFor ( IVwEnv vwenv, int rghvo, int chvo, int hvoParent, int tag, int frag, int ihvoMin ) : void
LoadParaData ( IStTxtPara para ) : void
ResetAnalysisCache ( ) : void

Call this to clear the temporary cache of analyses. Minimally do this when data changes. Ideally no more often than necessary.

UpdatingOccurrence ( IAnalysis oldAnalysis, IAnalysis newAnalysis ) : bool

Защищенные методы

Метод Описание
AddAnalysisPos ( IVwEnv vwenv, int hvoAnalysis, int hvoCurrent, int choiceIndex ) : void

Add a display of the category of hvoAnalysis. If choiceOffset is -1, display the current analysis writing systems, otherwise, display the one indicated (choiceIndex is an index into line choices). When choice index is not -1, hvoAnalysis may not be the current object. In that case, we invoke AddObj with a special flid which results in a recursive call to this, but with the correct current object.

AddColoredString ( IVwEnv vwenv, int color, string str ) : void

Add the specified string in the specified color to the display, using the UI Writing system.

AddFreeformAnnotations ( IVwEnv vwenv, int hvoSeg ) : void
AddFreeformComment ( IVwEnv vwenv, int hvoSeg, int lineChoiceIndex ) : void
AddWordBundleInternal ( int hvo, IVwEnv vwenv ) : void

DisplayAnalysisAndCloseInnerPile ( IVwEnv vwenv, AnalysisOccurrence analysisOccurrence, bool showMultipleAnalyses ) : void

Displays Analysis using DisplayWordBundleMethod and closes the views Inner Pile.

Dispose ( bool fDisposing ) : void
FormatGloss ( IVwEnv vwenv, int ws ) : void

Format the gloss line for the specified ws in an interlinear text

GetSegmentLevelTags ( FdoCache cache ) : void

Normally gets some virtual property tags we need for stuff above the bundle level. Code that is only using fragments at or below bundle may override this to do nothing, and then need not set up the virtual property handlers. See ConstChartVc.

LabelRGBFor ( InterlinLineSpec spec ) : int
LabelRGBFor ( int choiceIndex ) : int
SetColor ( IVwEnv vwenv, int color ) : void

Called right before adding a string or opening a flow object, sets its color.

SetupAndOpenInnerPile ( IVwEnv vwenv ) : void

Setup a box with 10 points behind and 5 under and open the inner pile

Приватные методы

Метод Описание
AddExtraBundleRows ( IVwEnv vwenv, SIL.FieldWorks.FDO.DomainServices.AnalysisOccurrence point ) : void

Add any extra material after the main bundles. See override on InterlinTaggingVc.

AddFreeformComment ( IVwEnv vwenv, int hvo, int ws, int flidTarget ) : void
AddLineIndexProperty ( ITsStrBldr bldr, int i ) : void
AddSegmentReference ( IVwEnv vwenv, int hvo ) : void

Add a segment number appropriate to the current segment being displayed. (See LT-1236.)

AddTssDirForVernWs ( IVwEnv vwenv ) : void
AddTssDirForWs ( IVwEnv vwenv, int ws ) : void

If the analysis writing system has the opposite directionality to the vernacular writing system, we need to add a directionality code to the data stream for the bidirectional algorithm not to jerk the insertion point around at every space. See LT-7738.

CanBeAnalyzed ( AnalysisOccurrence occurrence ) : bool

Answer true if the specified word can be analyzed. This is a further check after ensuring it has an InstanceOf. It is equivalent to the check made in case kfragBundle of Display(), but that already has access to the writing system of the Wordform. GJM - Jan 19,'10 Added check to see if this occurrence is actually Punctuation. Punctuation cannot be analyzed.

CreateParaLoader ( ) : IParaDataLoader
DisplayLexGlossWithInflType ( IVwEnv vwenv, ILexEntry possibleVariant, ILexSense sense, InterlinLineSpec spec, ILexEntryInflType inflType ) : bool

NOTE: this routine is ignorant of calling context, so caller must provide NoteDependency to the possibleVariant and the sense (e.g. vwenv.NoteDependency(new[] { wfiMorphBundle.Hvo }, new[] { WfiMorphBundleTags.kflidSense }, 1); vwenv.NoteDependency(new[] { wfiMorphBundle.Hvo }, new[] { WfiMorphBundleTags.kflidInflType }, 1);

DisplayMorphBundle ( IVwEnv vwenv, int hvo ) : void

Displays a MorphBundle, setting the colors of its parts.

DisplayMorphForm ( IVwEnv vwenv, int hvo, int ws ) : void
DisplaySingleInterlinearAnalysisWithLabels ( IVwEnv vwenv, int hvo ) : void
EnsureLoader ( ) : void
EstimateParaHeight ( IStTxtPara para, int dxAvailWidth ) : int
EstimateSegmentHeight ( ISegment seg, int dxAvailWidth ) : int
EstimateStTextHeight ( IStText text, int dxAvailWidth ) : int
GetAnnDefnId ( FdoCache cache, Guid guid ) : ICmAnnotationDefn
GetAnnDefnId ( FdoCache cache, Guid guid, int &cachedVal ) : int
GetAnnDefnId ( FdoCache cache, string guid, int &cachedVal ) : int

Get an AnnotationDefn with the (English) name specified, and cache it in cachedVal...unless it is already cached, in which case, just return it.

GetGuess ( IAnalysis analysis ) : int

Get a guess for the given word or analysis.

GetRealWs ( FdoCache cache, int hvo, InterlinLineSpec spec, int wsPreferred ) : int
GetRealWsOrBestWsForContext ( int hvo, InterlinLineSpec spec ) : int

try to get the ws specified by spec.WritingSystem, otherwise get the default vernacular ws for the display (e.g. ws of paragraph).

IsVernWs ( int ws, int wsSpec ) : bool

Check whether we're looking at vernacular data.

IsWsRtl ( int wsAnalysis ) : bool
JoinGlossAffixesOfInflVariantTypes ( ILexEntryRef entryRef1, int wsPreferred, ITsIncStrBldr &sbPrepend1, ITsIncStrBldr &sbAppend1 ) : void
LoadDataForSegments ( int rghvo, int hvoPara ) : void

Load data for a group of segments

LoadParaData ( int hvoPara ) : void
RecordGuessIfNotKnown ( AnalysisOccurrence selected ) : void
SegDefnFromFfFlid ( int flid ) : ICmAnnotationDefn
SetActiveFreeform ( int hvo, int flid, int ws, int cpropPrevious ) : void
SetGuessing ( IVwEnv vwenv ) : void
SetGuessing ( IVwEnv vwenv, int bgColor ) : void

Set the background color that we use to indicate a guess.

SetNoteLabelProps ( IVwEnv vwenv ) : void
SetParaDirectionAndAlignment ( IVwEnv vwenv, int wsAnalysis ) : void

Set the paragraph direction to match wsAnalysis and the paragraph alignment to match the overall direction of the text.

SetupRealVernWsForDisplay ( int wsVern ) : void

setups up the display to work with the given wsVern.

TryGetLexGlossWithInflTypeTss ( ILexEntry possibleVariant, ILexSense sense, InterlinLineSpec spec, InterlinLineChoices lineChoices, int vernWsContext, ILexEntryInflType inflType, ITsString &result ) : bool

Описание методов

AddAnalysisPos() защищенный Метод

Add a display of the category of hvoAnalysis. If choiceOffset is -1, display the current analysis writing systems, otherwise, display the one indicated (choiceIndex is an index into line choices). When choice index is not -1, hvoAnalysis may not be the current object. In that case, we invoke AddObj with a special flid which results in a recursive call to this, but with the correct current object.
protected AddAnalysisPos ( IVwEnv vwenv, int hvoAnalysis, int hvoCurrent, int choiceIndex ) : void
vwenv IVwEnv
hvoAnalysis int
hvoCurrent int
choiceIndex int
Результат void

AddColoredString() защищенный Метод

Add the specified string in the specified color to the display, using the UI Writing system.
protected AddColoredString ( IVwEnv vwenv, int color, string str ) : void
vwenv IVwEnv
color int
str string
Результат void

AddFreeformAnnotations() защищенный Метод

protected AddFreeformAnnotations ( IVwEnv vwenv, int hvoSeg ) : void
vwenv IVwEnv
hvoSeg int
Результат void

AddFreeformComment() защищенный Метод

protected AddFreeformComment ( IVwEnv vwenv, int hvoSeg, int lineChoiceIndex ) : void
vwenv IVwEnv
hvoSeg int
lineChoiceIndex int
Результат void

AddLabelPile() публичный Метод

Add the pile of labels used to identify the lines in interlinear text.
public AddLabelPile ( IVwEnv vwenv, ITsStrFactory tsf, SIL.FieldWorks.FDO.FdoCache cache, bool fWantMultipleSenseGloss, bool fShowMorphemes ) : void
vwenv IVwEnv
tsf ITsStrFactory
cache SIL.FieldWorks.FDO.FdoCache
fWantMultipleSenseGloss bool
fShowMorphemes bool
Результат void

AddWordBundleInternal() защищенный Метод

protected AddWordBundleInternal ( int hvo, IVwEnv vwenv ) : void
hvo int the IAnalysis object
vwenv IVwEnv
Результат void

CheckDisposed() публичный Метод

Throw if the IsDisposed property is true
public CheckDisposed ( ) : void
Результат void

Display() публичный Метод

public Display ( IVwEnv vwenv, int hvo, int frag ) : void
vwenv IVwEnv
hvo int
frag int
Результат void

DisplayAnalysisAndCloseInnerPile() защищенный Метод

Displays Analysis using DisplayWordBundleMethod and closes the views Inner Pile.
protected DisplayAnalysisAndCloseInnerPile ( IVwEnv vwenv, AnalysisOccurrence analysisOccurrence, bool showMultipleAnalyses ) : void
vwenv IVwEnv
analysisOccurrence AnalysisOccurrence
showMultipleAnalyses bool Tells DisplayWordBundleMethod whether or not to show /// the colored highlighting if a word has multiple analyses
Результат void

DisplayEmbeddedObject() публичный Метод

Display the specified object (from an ORC embedded in a string). Don't display any embedded objects in interlinear text.
public DisplayEmbeddedObject ( IVwEnv vwenv, int hvo ) : void
vwenv IVwEnv
hvo int
Результат void

DisplayVariant() публичный Метод

public DisplayVariant ( IVwEnv vwenv, int tag, int frag ) : ITsString
vwenv IVwEnv
tag int
frag int
Результат ITsString

DisplayVec() публичный Метод

public DisplayVec ( IVwEnv vwenv, int hvo, int tag, int frag ) : void
vwenv IVwEnv
hvo int
tag int
frag int
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool fDisposing ) : void
fDisposing bool
Результат void

EstimateHeight() публичный Метод

Estimate the height of things we display lazily.
public EstimateHeight ( int hvo, int frag, int dxAvailWidth ) : int
hvo int
frag int
dxAvailWidth int
Результат int

FormatGloss() защищенный Метод

Format the gloss line for the specified ws in an interlinear text
protected FormatGloss ( IVwEnv vwenv, int ws ) : void
vwenv IVwEnv
ws int
Результат void

GetGuessForWordform() публичный Метод

public GetGuessForWordform ( IWfiWordform wf, int ws ) : IAnalysis
wf IWfiWordform
ws int
Результат IAnalysis

GetSegmentLevelTags() защищенный Метод

Normally gets some virtual property tags we need for stuff above the bundle level. Code that is only using fragments at or below bundle may override this to do nothing, and then need not set up the virtual property handlers. See ConstChartVc.
protected GetSegmentLevelTags ( FdoCache cache ) : void
cache FdoCache
Результат void

InterlinVc() публичный Метод

Initializes a new instance of the InterlinVc class.
We use the default analysis writing system as the default, even though this view displays data in multiple writing systems. It's pretty arbitrary in this case, but we need a valid WS because if we get an ORC, we have to create a Ts String using some writing system.
public InterlinVc ( FdoCache cache ) : System
cache FdoCache The cache.
Результат System

LabelRGBFor() защищенный Метод

protected LabelRGBFor ( InterlinLineSpec spec ) : int
spec InterlinLineSpec
Результат int

LabelRGBFor() защищенный Метод

protected LabelRGBFor ( int choiceIndex ) : int
choiceIndex int
Результат int

LoadDataFor() публичный Метод

public LoadDataFor ( IVwEnv vwenv, int rghvo, int chvo, int hvoParent, int tag, int frag, int ihvoMin ) : void
vwenv IVwEnv
rghvo int
chvo int
hvoParent int
tag int
frag int
ihvoMin int
Результат void

LoadParaData() публичный Метод

public LoadParaData ( IStTxtPara para ) : void
para IStTxtPara
Результат void

ResetAnalysisCache() публичный Метод

Call this to clear the temporary cache of analyses. Minimally do this when data changes. Ideally no more often than necessary.
public ResetAnalysisCache ( ) : void
Результат void

SetColor() защищенный Метод

Called right before adding a string or opening a flow object, sets its color.
protected SetColor ( IVwEnv vwenv, int color ) : void
vwenv IVwEnv
color int
Результат void

SetupAndOpenInnerPile() защищенный Метод

Setup a box with 10 points behind and 5 under and open the inner pile
protected SetupAndOpenInnerPile ( IVwEnv vwenv ) : void
vwenv IVwEnv
Результат void

UpdatingOccurrence() публичный Метод

public UpdatingOccurrence ( IAnalysis oldAnalysis, IAnalysis newAnalysis ) : bool
oldAnalysis IAnalysis
newAnalysis IAnalysis
Результат bool

Описание свойств

m_analRepository защищенное свойство

protected IWfiAnalysisRepository m_analRepository
Результат IWfiAnalysisRepository

m_coRepository защищенное свойство

protected ICmObjectRepository m_coRepository
Результат ICmObjectRepository

m_fHaveOpenedParagraph защищенное свойство

protected bool m_fHaveOpenedParagraph
Результат bool

m_fShowDefaultSense защищенное свойство

protected bool m_fShowDefaultSense
Результат bool

m_segRepository защищенное свойство

protected ISegmentRepository m_segRepository
Результат ISegmentRepository

m_stylesheet защищенное свойство

protected IVwStylesheet m_stylesheet
Результат IVwStylesheet

m_wmbRepository защищенное свойство

protected IWfiMorphBundleRepository m_wmbRepository
Результат IWfiMorphBundleRepository

m_wsAnalysis защищенное свойство

protected int m_wsAnalysis
Результат int

m_wsManager защищенное свойство

protected IWritingSystemManager m_wsManager
Результат IWritingSystemManager

m_wsUi защищенное свойство

protected int m_wsUi
Результат int

m_wsVernForDisplay защищенное свойство

protected int m_wsVernForDisplay
Результат int