C# Class SIL.FieldWorks.XWorks.LexEd.LexEntryMenuHandler

LexEntryMenuHandler inherits from DTMenuHandler and adds some special smarts. this class would normally be constructed by the factory method on DTMenuHandler, when the XML configuration of the RecordEditView specifies this class. This is an IxCoreColleague, so it gets a chance to modify the display characteristics of the menu just before the menu is displayed.
Inheritance: SIL.FieldWorks.XWorks.DTMenuHandler
Datei anzeigen Open project: sillsdev/FieldWorks

Public Methods

Method Description
LexEntryMenuHandler ( ) : System
OnConvertLexemeForm ( object cmd ) : bool
OnDisplayConvertLexemeForm ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayDataTreeDeleteSense ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

decide whether to enable this tree delete Menu Item

OnDisplayDataTreeInsert ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

decide whether to display this tree insert Menu Item

OnDisplayInsertMediaFile ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

We want to be able to insert a sound/movie file for a pronunciation, even when the pronunciation doesn't yet exist. See LT-6685.

OnDisplayPictureProperties ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayShow_DictionaryPubPreview ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

handle the message to see if the menu item should be enabled

OnDisplaySwapAllomorphWithLexeme ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplaySwapLexemeWithAllomorph ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnSwapLexemeWithAllomorph ( object cmd ) : bool
SelectNewFormSlice ( IMoForm newForm ) : void

Private Methods

Method Description
CheckForFormDataLoss ( IMoForm origForm, int toClsid ) : bool
CreateNewForm ( ILexEntry parent, int clsid ) : IMoForm
GetNotifyVirtChgInfo ( Slice slice, string &propName, int &clid, Control &parent ) : void

Extract information from the slice which will be needed to call NotifyVirtualChanged after the slice has been disposed.

OnConvertAllomorph ( object cmd ) : bool
OnDataTreeDeleteSense ( object cmd ) : bool
OnDemoteSense ( object cmd ) : bool
OnDisplayConvertAllomorph ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayDemoteSense ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayPromoteSense ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnPictureProperties ( object cmd ) : bool
OnPromoteSense ( object cmd ) : bool
OnSwapAllomorphWithLexeme ( object cmd ) : bool
SwapAllomorphWithLexeme ( ILexEntry entry, IMoForm allomorph, Command cmd ) : void

Method Details

LexEntryMenuHandler() public method

public LexEntryMenuHandler ( ) : System
return System

OnConvertLexemeForm() public method

public OnConvertLexemeForm ( object cmd ) : bool
cmd object
return bool

OnDisplayConvertLexemeForm() public method

public OnDisplayConvertLexemeForm ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnDisplayDataTreeDeleteSense() public method

decide whether to enable this tree delete Menu Item
public OnDisplayDataTreeDeleteSense ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnDisplayDataTreeInsert() public method

decide whether to display this tree insert Menu Item
public OnDisplayDataTreeInsert ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnDisplayInsertMediaFile() public method

We want to be able to insert a sound/movie file for a pronunciation, even when the pronunciation doesn't yet exist. See LT-6685.
public OnDisplayInsertMediaFile ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnDisplayPictureProperties() public method

public OnDisplayPictureProperties ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnDisplayShow_DictionaryPubPreview() public method

handle the message to see if the menu item should be enabled
public OnDisplayShow_DictionaryPubPreview ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnDisplaySwapAllomorphWithLexeme() public method

public OnDisplaySwapAllomorphWithLexeme ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnDisplaySwapLexemeWithAllomorph() public method

public OnDisplaySwapLexemeWithAllomorph ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnSwapLexemeWithAllomorph() public method

public OnSwapLexemeWithAllomorph ( object cmd ) : bool
cmd object
return bool

SelectNewFormSlice() public method

public SelectNewFormSlice ( IMoForm newForm ) : void
newForm IMoForm
return void