C# Class SIL.FieldWorks.XWorks.MorphologyEditor.RuleFormulaControl

This class class represents a rule formula control. It is not intended to be used directly. Specific phonological/morphological rules should extend this class. It is not abstract so that it can be modified in Windows Form designer. It is a button launcher with a rule formula view and a rule insertion control. It handles selection, deletion, insertion, and cursor movement for a rule formula. Rules that extend this class override the methods that provide information about the various table cells in the rule and the data contained in each cell.
Inheritance: SIL.FieldWorks.Common.Framework.DetailControls.ButtonLauncher
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Свойство Type Description
m_insertionControl SIL.FieldWorks.LexText.Controls.InsertionControl
m_view SIL.FieldWorks.LexText.Controls.PatternView

Méthodes publiques

Méthode Description
GetContext ( SelectionHelper sel ) : object
GetContext ( SelectionHelper sel, SelectionHelper limit ) : object
GetContextCount ( object ctxt ) : int
GetFlid ( object ctxt ) : int
GetItem ( SelectionHelper sel, SelectionHelper limit ) : object
GetItemContextIndex ( object ctxt, object obj ) : int
GetLevelInfo ( object ctxt, int index ) : SIL.FieldWorks.Common.COMInterfaces.SelLevInfo[]
GetNextContext ( object ctxt ) : object
GetPrevContext ( object ctxt ) : object
Initialize ( SIL.FieldWorks.FDO.FdoCache cache, ICmObject obj, int flid, string fieldName, IPersistenceProvider persistProvider, XCore.Mediator mediator, string displayNameProperty, string displayWs ) : void
RuleFormulaControl ( ) : System
RuleFormulaControl ( XmlNode configurationNode ) : System
SetContextFeatures ( ) : void

Sets the phonological features for the currently selected natural class simple context with a feature-based natural class.

Méthodes protégées

Méthode Description
DisplayChooser ( string fieldName, string linkText, string toolName, string guiControl, IEnumerable candidates ) : ICmObject
GetCell ( SelectionHelper sel ) : int
GetCell ( SelectionHelper sel, SelectionHelper limit ) : int
GetCellCount ( int cellId ) : int
GetCmObject ( SelectionHelper sel, SelectionHelper limit ) : ICmObject
GetFlid ( int cellId ) : int
GetIndexToRemove ( ICmObject objs, SelectionHelper sel, bool forward ) : int
GetIndicesToRemove ( ICmObject objs, SelectionHelper sel ) : int[]
GetInsertionIndex ( ICmObject objs, SelectionHelper sel ) : int
GetItemCellIndex ( int cellId, ICmObject obj ) : int
GetLevelInfo ( int cellId, int index ) : SIL.FieldWorks.Common.COMInterfaces.SelLevInfo[]
GetNextCell ( int cellId ) : int
GetPrevCell ( int cellId ) : int
HandleChooser ( ) : void

Handle launching of the environment chooser.

Subclasses should override this method, if the SimpleListChooser is not suitable.

InsertBdry ( IPhBdryMarker bdry, SelectionHelper sel, int &cellIndex ) : int

Inserts an item from a boundary.

InsertColumn ( SelectionHelper sel ) : int

Inserts a new column.

InsertContextInto ( IPhSimpleContext ctxt, SelectionHelper sel, IFdoOwningSequence seq ) : int
InsertContextInto ( IPhSimpleContext ctxt, SelectionHelper sel, IPhSequenceContext seqCtxt ) : int
InsertIndex ( int index, SelectionHelper sel, int &cellIndex ) : int

Inserts an item from the specified rule mapping index.

InsertNC ( IPhNaturalClass nc, SelectionHelper sel, int &cellIndex, IPhSimpleContextNC &ctxt ) : int

Inserts an item from a natural class.

InsertPhoneme ( IPhPhoneme phoneme, SelectionHelper sel, int &cellIndex ) : int

Inserts an item from a phoneme.

InsertVariable ( SelectionHelper sel, int &cellIndex ) : int

Inserts the variable (PhVariable).

ReconstructView ( int cellId, int cellIndex, bool initial ) : void

Reconstructs the view and moves the cursor the specified position.

RemoveContextsFrom ( bool forward, SelectionHelper sel, IFdoOwningSequence seq, bool preRemovalSideEffects, int &index ) : bool
RemoveContextsFrom ( bool forward, SelectionHelper sel, IPhSequenceContext seqCtxt, bool preRemovalSideEffects, int &index ) : bool
RemoveItems ( SelectionHelper sel, bool forward, int &cellIndex ) : int

Removes items based on the specified selection and direction.

SetupPhonologicalFeatureChoooserDlg ( PhonologicalFeatureChooserDlg featChooser ) : void
UpdateEnvironment ( IPhEnvironment env ) : int

Updates the environment.

Private Methods

Méthode Description
ContextMenuRequested ( object sender, ContextMenuRequestedEventArgs e ) : void
GetOptionString ( RuleInsertType type ) : string
InitializeComponent ( ) : void
InsertNC ( IPhNaturalClass nc, SelectionHelper sel, int &cellIndex ) : int
IsMorphBoundary ( IPhContextOrVar ctxt ) : bool
IsWordBoundary ( IPhContextOrVar ctxt ) : bool
ProcessIndicesSeqContext ( ICmObject ctxts, bool preRemovalSideEffects, int idx ) : void
ProcessIndicesSimpleContext ( IFdoOwningSequence seq, ICmObject ctxts, bool preRemovalSideEffects, int idx ) : void
RemoveItemsRequested ( object sender, RemoveItemsRequestedEventArgs e ) : void
SelectionChanged ( object sender, EventArgs eventArgs ) : void
ToCellId ( object ctxt ) : int
ToContextObject ( int cellId ) : object
m_insertionControl_Insert ( object sender, InsertEventArgs e ) : void

Handles the Insert event of the m_insertionControl control.

Method Details

DisplayChooser() protected méthode

protected DisplayChooser ( string fieldName, string linkText, string toolName, string guiControl, IEnumerable candidates ) : ICmObject
fieldName string
linkText string
toolName string
guiControl string
candidates IEnumerable
Résultat ICmObject

GetCell() protected méthode

protected GetCell ( SelectionHelper sel ) : int
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
Résultat int

GetCell() protected méthode

protected GetCell ( SelectionHelper sel, SelectionHelper limit ) : int
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
limit SIL.FieldWorks.Common.RootSites.SelectionHelper
Résultat int

GetCellCount() protected méthode

protected GetCellCount ( int cellId ) : int
cellId int
Résultat int

GetCmObject() protected méthode

protected GetCmObject ( SelectionHelper sel, SelectionHelper limit ) : ICmObject
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
limit SIL.FieldWorks.Common.RootSites.SelectionHelper
Résultat ICmObject

GetContext() public méthode

public GetContext ( SelectionHelper sel ) : object
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
Résultat object

GetContext() public méthode

public GetContext ( SelectionHelper sel, SelectionHelper limit ) : object
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
limit SIL.FieldWorks.Common.RootSites.SelectionHelper
Résultat object

GetContextCount() public méthode

public GetContextCount ( object ctxt ) : int
ctxt object
Résultat int

GetFlid() protected méthode

protected GetFlid ( int cellId ) : int
cellId int
Résultat int

GetFlid() public méthode

public GetFlid ( object ctxt ) : int
ctxt object
Résultat int

GetIndexToRemove() protected méthode

protected GetIndexToRemove ( ICmObject objs, SelectionHelper sel, bool forward ) : int
objs ICmObject
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
forward bool
Résultat int

GetIndicesToRemove() protected méthode

protected GetIndicesToRemove ( ICmObject objs, SelectionHelper sel ) : int[]
objs ICmObject
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
Résultat int[]

GetInsertionIndex() protected méthode

protected GetInsertionIndex ( ICmObject objs, SelectionHelper sel ) : int
objs ICmObject
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
Résultat int

GetItem() public méthode

public GetItem ( SelectionHelper sel, SelectionHelper limit ) : object
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
limit SIL.FieldWorks.Common.RootSites.SelectionHelper
Résultat object

GetItemCellIndex() protected méthode

protected GetItemCellIndex ( int cellId, ICmObject obj ) : int
cellId int
obj ICmObject
Résultat int

GetItemContextIndex() public méthode

public GetItemContextIndex ( object ctxt, object obj ) : int
ctxt object
obj object
Résultat int

GetLevelInfo() protected méthode

protected GetLevelInfo ( int cellId, int index ) : SIL.FieldWorks.Common.COMInterfaces.SelLevInfo[]
cellId int
index int
Résultat SIL.FieldWorks.Common.COMInterfaces.SelLevInfo[]

GetLevelInfo() public méthode

public GetLevelInfo ( object ctxt, int index ) : SIL.FieldWorks.Common.COMInterfaces.SelLevInfo[]
ctxt object
index int
Résultat SIL.FieldWorks.Common.COMInterfaces.SelLevInfo[]

GetNextCell() protected méthode

protected GetNextCell ( int cellId ) : int
cellId int
Résultat int

GetNextContext() public méthode

public GetNextContext ( object ctxt ) : object
ctxt object
Résultat object

GetPrevCell() protected méthode

protected GetPrevCell ( int cellId ) : int
cellId int
Résultat int

GetPrevContext() public méthode

public GetPrevContext ( object ctxt ) : object
ctxt object
Résultat object

HandleChooser() protected méthode

Handle launching of the environment chooser.
Subclasses should override this method, if the SimpleListChooser is not suitable.
protected HandleChooser ( ) : void
Résultat void

Initialize() public méthode

public Initialize ( SIL.FieldWorks.FDO.FdoCache cache, ICmObject obj, int flid, string fieldName, IPersistenceProvider persistProvider, XCore.Mediator mediator, string displayNameProperty, string displayWs ) : void
cache SIL.FieldWorks.FDO.FdoCache
obj ICmObject
flid int
fieldName string
persistProvider IPersistenceProvider
mediator XCore.Mediator
displayNameProperty string
displayWs string
Résultat void

InsertBdry() protected méthode

Inserts an item from a boundary.
protected InsertBdry ( IPhBdryMarker bdry, SelectionHelper sel, int &cellIndex ) : int
bdry IPhBdryMarker The boundary.
sel SIL.FieldWorks.Common.RootSites.SelectionHelper The sel.
cellIndex int Index of the new item.
Résultat int

InsertColumn() protected méthode

Inserts a new column.
protected InsertColumn ( SelectionHelper sel ) : int
sel SIL.FieldWorks.Common.RootSites.SelectionHelper The selection.
Résultat int

InsertContextInto() protected méthode

protected InsertContextInto ( IPhSimpleContext ctxt, SelectionHelper sel, IFdoOwningSequence seq ) : int
ctxt IPhSimpleContext
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
seq IFdoOwningSequence
Résultat int

InsertContextInto() protected méthode

protected InsertContextInto ( IPhSimpleContext ctxt, SelectionHelper sel, IPhSequenceContext seqCtxt ) : int
ctxt IPhSimpleContext
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
seqCtxt IPhSequenceContext
Résultat int

InsertIndex() protected méthode

Inserts an item from the specified rule mapping index.
protected InsertIndex ( int index, SelectionHelper sel, int &cellIndex ) : int
index int The rule mapping index.
sel SIL.FieldWorks.Common.RootSites.SelectionHelper The selection.
cellIndex int Index of the new item.
Résultat int

InsertNC() protected méthode

Inserts an item from a natural class.
protected InsertNC ( IPhNaturalClass nc, SelectionHelper sel, int &cellIndex, IPhSimpleContextNC &ctxt ) : int
nc IPhNaturalClass The natural class.
sel SIL.FieldWorks.Common.RootSites.SelectionHelper The selection.
cellIndex int Index of the new item.
ctxt IPhSimpleContextNC The new context.
Résultat int

InsertPhoneme() protected méthode

Inserts an item from a phoneme.
protected InsertPhoneme ( IPhPhoneme phoneme, SelectionHelper sel, int &cellIndex ) : int
phoneme IPhPhoneme The phoneme.
sel SIL.FieldWorks.Common.RootSites.SelectionHelper The selection.
cellIndex int Index of the new item.
Résultat int

InsertVariable() protected méthode

Inserts the variable (PhVariable).
protected InsertVariable ( SelectionHelper sel, int &cellIndex ) : int
sel SIL.FieldWorks.Common.RootSites.SelectionHelper The selection.
cellIndex int Index of the new item.
Résultat int

ReconstructView() protected méthode

Reconstructs the view and moves the cursor the specified position.
protected ReconstructView ( int cellId, int cellIndex, bool initial ) : void
cellId int The cell id.
cellIndex int Index of the item in the cell.
initial bool if true move the cursor to the beginning of the specified item, otherwise it is moved to the end
Résultat void

RemoveContextsFrom() protected méthode

protected RemoveContextsFrom ( bool forward, SelectionHelper sel, IFdoOwningSequence seq, bool preRemovalSideEffects, int &index ) : bool
forward bool
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
seq IFdoOwningSequence
preRemovalSideEffects bool
index int
Résultat bool

RemoveContextsFrom() protected méthode

protected RemoveContextsFrom ( bool forward, SelectionHelper sel, IPhSequenceContext seqCtxt, bool preRemovalSideEffects, int &index ) : bool
forward bool
sel SIL.FieldWorks.Common.RootSites.SelectionHelper
seqCtxt IPhSequenceContext
preRemovalSideEffects bool
index int
Résultat bool

RemoveItems() protected méthode

Removes items based on the specified selection and direction.
protected RemoveItems ( SelectionHelper sel, bool forward, int &cellIndex ) : int
sel SIL.FieldWorks.Common.RootSites.SelectionHelper The selection.
forward bool if true delete button was used, otherwise backspace was used
cellIndex int Index of the item before the removed items.
Résultat int

RuleFormulaControl() public méthode

public RuleFormulaControl ( ) : System
Résultat System

RuleFormulaControl() public méthode

public RuleFormulaControl ( XmlNode configurationNode ) : System
configurationNode System.Xml.XmlNode
Résultat System

SetContextFeatures() public méthode

Sets the phonological features for the currently selected natural class simple context with a feature-based natural class.
public SetContextFeatures ( ) : void
Résultat void

SetupPhonologicalFeatureChoooserDlg() protected méthode

protected SetupPhonologicalFeatureChoooserDlg ( PhonologicalFeatureChooserDlg featChooser ) : void
featChooser PhonologicalFeatureChooserDlg
Résultat void

UpdateEnvironment() protected méthode

Updates the environment.
protected UpdateEnvironment ( IPhEnvironment env ) : int
env IPhEnvironment The environment.
Résultat int

Property Details

m_insertionControl protected_oe property

protected InsertionControl,SIL.FieldWorks.LexText.Controls m_insertionControl
Résultat SIL.FieldWorks.LexText.Controls.InsertionControl

m_view protected_oe property

protected PatternView,SIL.FieldWorks.LexText.Controls m_view
Résultat SIL.FieldWorks.LexText.Controls.PatternView