C# Class SIL.FieldWorks.IText.InterlinDocRootSiteBase

Mostrar archivo Open project: sillsdev/FieldWorks

Protected Properties

Property Type Description
m_hvoRoot int
m_objRepo ICmObjectRepository
m_vc InterlinVc

Private Properties

Property Type Description
AddAdditionalWsMenuItem void
AddHideLineMenuItem void
AddMoveDownMenuItem void
AddMoveUpMenuItem void
AddNewLineMenuItem void
CalculateHorizContextButtonPosition void
ConvertBookmarkToAnalysis AnalysisOccurrence
ConvertBookmarkToAnalysis AnalysisOccurrence
CreateFocusBox void
EnsureVc void
GetAppropriateLineLabel string
GetMaster InterlinMaster
GetParagraphIndexForAnalysis int
GetRealWsFromSpec int
GetUnusedSpecs IEnumerable
GetWsComboItems IEnumerable
MakeContextMenu ContextMenuStrip
OccurrenceContainingSelection AnalysisOccurrence
OnExportInterlinear bool
PersistAndDisplayChangedLineChoices void
PostponedUpdateWordforms bool
RemoveContextButtonIfPresent void
SetContextButtonPosition void
ShowContextMenuIfNotClosing void
TryHideFocusBoxAndUninstall bool
TryRestoreLineChoices bool
UpdateDisplayForNewLineChoices void
UpdateForNewLineChoices void
UpdateGuessData void
UpdateGuesses void
UpdateGuesses void
addLineItem_Click void
addWsToFlidItem_Click void
configLink_Click void
hideItem_Click void
m_contextButton_Click void
m_labelContextMenu_Closed void
moveDownItem_Click void
moveUpItem_Click void

Public Methods

Method Description
GetRootBox ( ) : IVwRootBox

Returns the rootbox of this object, or null if not applicable

InterlinDocRootSiteBase ( ) : System
MakeRoot ( ) : void
OnConfigureInterlinear ( object argument ) : bool

Launch the Configure interlinear dialog and deal with the results

OnDisplayExportInterlinear ( object commandObject, UIItemDisplayProperties &display ) : bool
PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
SelectBookmark ( IStTextBookmark bookmark ) : void
SelectOccurrence ( AnalysisOccurrence point ) : void

This base version is used by 'read-only' tabs that need to select an occurrence in IText from the analysis occurrence. Override for Sandbox-type selections.

SetRoot ( int hvo ) : void
SetupLineChoices ( string lineConfigPropName, SIL.FieldWorks.IText.InterlinLineChoices mode ) : SIL.FieldWorks.IText.InterlinLineChoices

UpdatingOccurrence ( IAnalysis oldAnalysis, IAnalysis newAnalysis ) : void

Protected Methods

Method Description
AddDecorator ( ) : void

Allows InterlinTaggingChild to add a DomainDataByFlid decorator to the rootbox.

FocusWhenVisible ( object sender, EventArgs e ) : void
GetAnalysisFromSelection ( IVwSelection sel ) : AnalysisOccurrence
GetIndexOfLineChoice ( IVwSelection selTest ) : int
GrabMousePtSelectionToTest ( MouseEventArgs e ) : IVwSelection

Takes a mouse click point and makes an invisible selection for testing. Exceptions caused by selection problems are caught, but not dealt with. In case of an exception, the selection returned will be null.

MakeRootInternal ( ) : void
MakeVc ( ) : void

MakeWordformSelection ( SelLevInfo rgvsli ) : IVwSelection

Get overridden for subclasses needing a Sandbox.

OnHandleCreated ( EventArgs e ) : void
OnMouseDown ( MouseEventArgs e ) : void
SelectOccurrenceInIText ( AnalysisOccurrence point ) : IVwSelection

Selects the specified AnalysisOccurrence in the interlinear text.

SetRootInternal ( int hvo ) : void
UpdateDisplayForOccurrence ( AnalysisOccurrence occurrence ) : void
UpdateWordforms ( HashSet wordforms ) : void
UserClickedOnLabels ( IVwSelection selTest, int &ilineChoice ) : bool

Private Methods

Method Description
AddAdditionalWsMenuItem ( ToolStripMenuItem addSubMenu, SIL.FieldWorks.IText.InterlinLineChoices curLineChoices, int ilineChoice ) : void
AddHideLineMenuItem ( ContextMenuStrip menu, SIL.FieldWorks.IText.InterlinLineChoices curLineChoices, int ilineChoice ) : void
AddMoveDownMenuItem ( ContextMenuStrip menu, int ilineChoice ) : void
AddMoveUpMenuItem ( ContextMenuStrip menu, int ilineChoice ) : void
AddNewLineMenuItem ( ToolStripMenuItem addLineSubMenu, SIL.FieldWorks.IText.InterlinLineChoices curLineChoices ) : void
CalculateHorizContextButtonPosition ( Rect rcPrimary, Rect rcSrcRoot ) : void
ConvertBookmarkToAnalysis ( IStTextBookmark bookmark ) : AnalysisOccurrence

Returns an AnalysisOccurrence at least close to the given bookmark. If we can't, we return null.

ConvertBookmarkToAnalysis ( IStTextBookmark bookmark, bool &fExactMatch ) : AnalysisOccurrence

Returns an AnalysisOccurrence at least close to the given bookmark. If we can't, we return null. This version reports whether we found an exact match or not.

CreateFocusBox ( ) : void

Placeholder for a routine which creates the focus box in InterlinDocForAnalysis.

EnsureVc ( ) : void
GetAppropriateLineLabel ( SIL.FieldWorks.IText.InterlinLineChoices curLineChoices, int ilineChoice ) : string
GetMaster ( ) : InterlinMaster
GetParagraphIndexForAnalysis ( AnalysisOccurrence point ) : int
GetRealWsFromSpec ( SIL.FieldWorks.IText.InterlinLineSpec spec ) : int
GetUnusedSpecs ( SIL.FieldWorks.IText.InterlinLineChoices curLineChoices ) : IEnumerable
GetWsComboItems ( SIL.FieldWorks.IText.InterlinLineSpec curSpec ) : IEnumerable
MakeContextMenu ( int ilineChoice ) : ContextMenuStrip
OccurrenceContainingSelection ( ) : AnalysisOccurrence
OnExportInterlinear ( object argument ) : bool
PersistAndDisplayChangedLineChoices ( ) : void
PostponedUpdateWordforms ( object parameter ) : bool
RemoveContextButtonIfPresent ( ) : void
SetContextButtonPosition ( IVwSelection sel, int ilineChoice ) : void
ShowContextMenuIfNotClosing ( Point menuLocation, int ilineChoice ) : void
TryHideFocusBoxAndUninstall ( ) : bool

Hides the sandbox and removes it from the controls.

TryRestoreLineChoices ( SIL.FieldWorks.IText.InterlinLineChoices &lineChoices ) : bool

Tries to restore the LineChoices saved in the ConfigPropName property in the property table.

UpdateDisplayForNewLineChoices ( ) : void

Do whatever is necessary to display new line choices.

UpdateForNewLineChoices ( SIL.FieldWorks.IText.InterlinLineChoices newChoices ) : void

Persist the new line choices and Reconstruct the document based on the given newChoices for interlinear lines.

UpdateGuessData ( ) : void

Update all the guesses in the interlinear doc.

UpdateGuesses ( HashSet wordforms ) : void

Update any necessary guesses when the specified wordforms change.

UpdateGuesses ( HashSet wordforms, bool fUpdateDisplayWhereNeeded ) : void
addLineItem_Click ( object sender, EventArgs e ) : void
addWsToFlidItem_Click ( object sender, EventArgs e ) : void
configLink_Click ( object sender, EventArgs e ) : void
hideItem_Click ( object sender, EventArgs e ) : void
m_contextButton_Click ( object sender, EventArgs e ) : void
m_labelContextMenu_Closed ( object sender, ToolStripDropDownClosedEventArgs e ) : void
moveDownItem_Click ( object sender, EventArgs e ) : void
moveUpItem_Click ( object sender, EventArgs e ) : void

Method Details

AddDecorator() protected method

Allows InterlinTaggingChild to add a DomainDataByFlid decorator to the rootbox.
protected AddDecorator ( ) : void
return void

FocusWhenVisible() protected method

protected FocusWhenVisible ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void

GetAnalysisFromSelection() protected method

protected GetAnalysisFromSelection ( IVwSelection sel ) : AnalysisOccurrence
sel IVwSelection
return AnalysisOccurrence

GetIndexOfLineChoice() protected method

protected GetIndexOfLineChoice ( IVwSelection selTest ) : int
selTest IVwSelection
return int

GetRootBox() public method

Returns the rootbox of this object, or null if not applicable
public GetRootBox ( ) : IVwRootBox
return IVwRootBox

GrabMousePtSelectionToTest() protected method

Takes a mouse click point and makes an invisible selection for testing. Exceptions caused by selection problems are caught, but not dealt with. In case of an exception, the selection returned will be null.
protected GrabMousePtSelectionToTest ( MouseEventArgs e ) : IVwSelection
e MouseEventArgs
return IVwSelection

InterlinDocRootSiteBase() public method

public InterlinDocRootSiteBase ( ) : System
return System

MakeRoot() public method

public MakeRoot ( ) : void
return void

MakeRootInternal() protected method

protected MakeRootInternal ( ) : void
return void

MakeVc() protected method

protected MakeVc ( ) : void
return void

MakeWordformSelection() protected method

Get overridden for subclasses needing a Sandbox.
protected MakeWordformSelection ( SelLevInfo rgvsli ) : IVwSelection
rgvsli SelLevInfo
return IVwSelection

OnConfigureInterlinear() public method

Launch the Configure interlinear dialog and deal with the results
public OnConfigureInterlinear ( object argument ) : bool
argument object
return bool

OnDisplayExportInterlinear() public method

public OnDisplayExportInterlinear ( object commandObject, UIItemDisplayProperties &display ) : bool
commandObject object
display UIItemDisplayProperties
return bool

OnHandleCreated() protected method

protected OnHandleCreated ( EventArgs e ) : void
e EventArgs
return void

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void

PropChanged() public method

public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
return void

SelectBookmark() public method

public SelectBookmark ( IStTextBookmark bookmark ) : void
bookmark IStTextBookmark
return void

SelectOccurrence() public method

This base version is used by 'read-only' tabs that need to select an occurrence in IText from the analysis occurrence. Override for Sandbox-type selections.
public SelectOccurrence ( AnalysisOccurrence point ) : void
point AnalysisOccurrence
return void

SelectOccurrenceInIText() protected method

Selects the specified AnalysisOccurrence in the interlinear text.
protected SelectOccurrenceInIText ( AnalysisOccurrence point ) : IVwSelection
point AnalysisOccurrence
return IVwSelection

SetRoot() public method

public SetRoot ( int hvo ) : void
hvo int
return void

SetRootInternal() protected method

protected SetRootInternal ( int hvo ) : void
hvo int
return void

SetupLineChoices() public method

public SetupLineChoices ( string lineConfigPropName, SIL.FieldWorks.IText.InterlinLineChoices mode ) : SIL.FieldWorks.IText.InterlinLineChoices
lineConfigPropName string the key used to store/restore line configuration settings.
mode SIL.FieldWorks.IText.InterlinLineChoices
return SIL.FieldWorks.IText.InterlinLineChoices

UpdateDisplayForOccurrence() protected method

protected UpdateDisplayForOccurrence ( AnalysisOccurrence occurrence ) : void
occurrence AnalysisOccurrence
return void

UpdateWordforms() protected method

protected UpdateWordforms ( HashSet wordforms ) : void
wordforms HashSet
return void

UpdatingOccurrence() public method

public UpdatingOccurrence ( IAnalysis oldAnalysis, IAnalysis newAnalysis ) : void
oldAnalysis IAnalysis
newAnalysis IAnalysis
return void

UserClickedOnLabels() protected method

protected UserClickedOnLabels ( IVwSelection selTest, int &ilineChoice ) : bool
selTest IVwSelection
ilineChoice int
return bool

Property Details

m_hvoRoot protected_oe property

protected int m_hvoRoot
return int

m_objRepo protected_oe property

protected ICmObjectRepository m_objRepo
return ICmObjectRepository

m_vc protected_oe property

protected InterlinVc,SIL.FieldWorks.IText m_vc
return InterlinVc