C# Class SIL.FieldWorks.IText.SandboxBase.InterlinComboHandler

This class and its subclasses handles the events that can happen in the course of the use of a combo box or popup list box in the Sandbox. Actually, a collection of subclasses, one for each kind of place the combo can be in the annotation hierarchy, handles the events. For most of the primary events, the default here is to do nothing.
Inheritance: IComboHandler, IFWDisposable
Afficher le fichier Open project: sillsdev/FieldWorks

Protected Properties

Свойство Type Description
m_caches CachePair
m_fUnderConstruction bool
m_hvoMorph int
m_hvoSbWord int
m_hvoSelObject int
m_items List
m_rgvsli SIL.FieldWorks.Common.COMInterfaces.SelLevInfo[]
m_rootb IVwRootBox
m_sandbox SandboxBase
m_wsAnal int
m_wsUser int
m_wsVern int

Private Properties

Свойство Type Description
AddPartsOfSpeechToComboItems void
AddVectorToComboItems void
AdjustListBoxSize void
GetComboItem object
HandleComboSelChange void
HandleComboSelSame void
HideCombo void
InitCombo void
InterlinComboHandler System
MakeCombo IComboHandler
MakeCombo IComboHandler
MakeCombo IComboHandler
MakeNewSelection void
MorphHvo int
NewAnalysisString ITsString
SetComboListForTesting void
SetMorphForTesting void
SetSandboxForTesting void
SyncMonomorphemicGlossAndPos void

Méthodes publiques

Méthode Description
Activate ( SIL loc ) : void
HandleReturnKey ( ) : bool
HandleSelect ( int index ) : void
HandleSelectIfActive ( ) : void

Handle the user selecting an item in the control.

Hide ( ) : void

Hide yourself.

InterlinComboHandler ( ) : System
SelectComboItem ( int hvoTarget ) : void

select the combo item matching the given hvoTarget

SelectComboItem ( string target ) : void

select the combo list item matching the given string

SetupCombo ( ) : void
StrFromTss ( ITsString tss ) : string

Handles the problem that an ITsString returns null (which works fine as a BSTR) when there are no characters. But in C#, null is not the same as an empty string. Also handles the possibility that the ITsString itself is null.

Méthodes protégées

Méthode Description
CopyLexPosToWordPos ( bool fCopyToWordCat, int hvoMsaPos ) : int
CopySenseToWordGloss ( bool fCopyWordGloss, int hvoSbRootSense ) : void
DisabledItemProperties ( ) : ITsTextProps

Setup the properties for combo items that should appear disabled.

DisposeManagedResources ( ) : void
DisposeUnmanagedResources ( ) : void
HighlightProperty ( System highlightColor ) : ITsTextProps

Setup a property for a specified color.

Private Methods

Méthode Description
AddPartsOfSpeechToComboItems ( ) : void
AddVectorToComboItems ( int hvoOwner, int flidVec ) : void

Add to the combo list the items in property flidVec of object hvoOwner in the main cache. Add to m_comboList.items the ShortName of each item, and to m_items the hvo.

AdjustListBoxSize ( ) : void
GetComboItem ( string target, int &index ) : object
HandleComboSelChange ( object sender, EventArgs ea ) : void
HandleComboSelSame ( object sender, EventArgs ea ) : void
HideCombo ( ) : void
InitCombo ( ) : void
InterlinComboHandler ( SandboxBase sandbox ) : System
MakeCombo ( IHelpTopicProvider helpTopicProvider, IVwSelection vwselNew, SandboxBase sandbox, bool fMouseDown ) : IComboHandler
MakeCombo ( IHelpTopicProvider helpTopicProvider, int tagComboIcon, SandboxBase sandbox, int imorph ) : IComboHandler

make a combo handler based upon the given comboIcon and morph

MakeCombo ( IHelpTopicProvider helpTopicProvider, int tagComboIcon, SandboxBase sandbox, int hvoMorph, SIL.FieldWorks.Common.COMInterfaces.SelLevInfo rgvsli, int hvoSelObject ) : IComboHandler
MakeNewSelection ( int isliCopy, int tag, int ihvo, int tagTextProp, int ws ) : void
MorphHvo ( int i ) : int
NewAnalysisString ( string str ) : ITsString
SetComboListForTesting ( IComboList list ) : void
SetMorphForTesting ( int imorph ) : void
SetSandboxForTesting ( SandboxBase sandbox ) : void
SyncMonomorphemicGlossAndPos ( bool fCopyToWordGloss, bool fCopyToWordPos ) : void

Synchronize the word gloss and POS with the morpheme gloss and MSA info, to the extent possible. Currently works FROM the morpheme TO the Word, but going the other way may be useful, too. for the word gloss: - if only one morpheme, copy sense gloss to word gloss - if multiple morphemes, copy first stem gloss to word gloss, but only if word gloss is empty. for the POS: - if there is more than one stem and they have different parts of speech, do nothing. - if there is more than one derivational affix (DA), do nothing. - otherwise, if there is no DA, use the POS of the stem. - if there is no stem, do nothing. - if there is a DA, use its 'to' POS. (currently we don't insist that the 'from' POS matches the stem)

Method Details

Activate() public méthode

public Activate ( SIL loc ) : void
loc SIL
Résultat void

CopyLexPosToWordPos() protected méthode

protected CopyLexPosToWordPos ( bool fCopyToWordCat, int hvoMsaPos ) : int
fCopyToWordCat bool
hvoMsaPos int
Résultat int

CopySenseToWordGloss() protected méthode

protected CopySenseToWordGloss ( bool fCopyWordGloss, int hvoSbRootSense ) : void
fCopyWordGloss bool
hvoSbRootSense int
Résultat void

DisabledItemProperties() protected static méthode

Setup the properties for combo items that should appear disabled.
protected static DisabledItemProperties ( ) : ITsTextProps
Résultat ITsTextProps

DisposeManagedResources() protected méthode

protected DisposeManagedResources ( ) : void
Résultat void

DisposeUnmanagedResources() protected méthode

protected DisposeUnmanagedResources ( ) : void
Résultat void

HandleReturnKey() public méthode

public HandleReturnKey ( ) : bool
Résultat bool

HandleSelect() public méthode

public HandleSelect ( int index ) : void
index int
Résultat void

HandleSelectIfActive() public méthode

Handle the user selecting an item in the control.
public HandleSelectIfActive ( ) : void
Résultat void

Hide() public méthode

Hide yourself.
public Hide ( ) : void
Résultat void

HighlightProperty() protected static méthode

Setup a property for a specified color.
protected static HighlightProperty ( System highlightColor ) : ITsTextProps
highlightColor System
Résultat ITsTextProps

InterlinComboHandler() public méthode

public InterlinComboHandler ( ) : System
Résultat System

SelectComboItem() public méthode

select the combo item matching the given hvoTarget
public SelectComboItem ( int hvoTarget ) : void
hvoTarget int
Résultat void

SelectComboItem() public méthode

select the combo list item matching the given string
public SelectComboItem ( string target ) : void
target string
Résultat void

SetupCombo() public méthode

public SetupCombo ( ) : void
Résultat void

StrFromTss() public static méthode

Handles the problem that an ITsString returns null (which works fine as a BSTR) when there are no characters. But in C#, null is not the same as an empty string. Also handles the possibility that the ITsString itself is null.
public static StrFromTss ( ITsString tss ) : string
tss ITsString
Résultat string

Property Details

m_caches protected_oe property

protected CachePair m_caches
Résultat CachePair

m_fUnderConstruction protected_oe property

protected bool m_fUnderConstruction
Résultat bool

m_hvoMorph protected_oe property

protected int m_hvoMorph
Résultat int

m_hvoSbWord protected_oe property

protected int m_hvoSbWord
Résultat int

m_hvoSelObject protected_oe property

protected int m_hvoSelObject
Résultat int

m_items protected_oe property

protected List m_items
Résultat List

m_rgvsli protected_oe property

protected SelLevInfo[],SIL.FieldWorks.Common.COMInterfaces m_rgvsli
Résultat SIL.FieldWorks.Common.COMInterfaces.SelLevInfo[]

m_rootb protected_oe property

protected IVwRootBox m_rootb
Résultat IVwRootBox

m_sandbox protected_oe property

protected SandboxBase,SIL.FieldWorks.IText m_sandbox
Résultat SandboxBase

m_wsAnal protected_oe property

protected int m_wsAnal
Résultat int

m_wsUser protected_oe property

protected int m_wsUser
Résultat int

m_wsVern protected_oe property

protected int m_wsVern
Résultat int