C# Class SIL.FieldWorks.XWorks.MacroListener

Inheritance: IxCoreColleague
Datei anzeigen Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
AssignMacrosToSlots IFlexMacro[]
DoDisplayMacro bool
DoMacro bool
GetMacro IFlexMacro
GetMacroIndex int
GetSelection IVwSelection
SafeToDoMacro bool

Public Methods

Method Description
GetMessageTargets ( ) : IxCoreColleague[]

Standard member for IXCoreColleague. The only object known to this colleague to handle messages is itself.

Init ( XCore.Mediator mediator, XmlNode configurationParameters ) : void

Standard member for IXCoreColleague. The configurationParameters are not currently used.

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

Invoked by reflection when displaying the appropriate menu item. Which one is indicated by the paramters node. This method is responsible to decide whether to display the command, whether to enable it, and what the text of the menu item should be.

OnMacro ( object commandObject ) : bool

Invoked by reflection when the appropriate menu command is executed. Which one is indicated by the paramters node.

Private Methods

Method Description
AssignMacrosToSlots ( List macroImplementors ) : IFlexMacro[]
DoDisplayMacro ( object commandObject, XCore.UIItemDisplayProperties display, IVwSelection sel ) : bool
DoMacro ( object commandObject, IVwSelection sel ) : bool
GetMacro ( object commandObject ) : IFlexMacro
GetMacroIndex ( Keys key ) : int
GetSelection ( ) : IVwSelection

Get the active selection in the mediator's main window. This determines what we will apply the command to.

SafeToDoMacro ( IVwSelection sel, ICmObject &obj, int &flid, int &ws, int &start, int &length ) : bool

Method Details

GetMessageTargets() public method

Standard member for IXCoreColleague. The only object known to this colleague to handle messages is itself.
public GetMessageTargets ( ) : IxCoreColleague[]
return IxCoreColleague[]

Init() public method

Standard member for IXCoreColleague. The configurationParameters are not currently used.
public Init ( XCore.Mediator mediator, XmlNode configurationParameters ) : void
mediator XCore.Mediator
configurationParameters System.Xml.XmlNode
return void

OnDisplayMacro() public method

Invoked by reflection when displaying the appropriate menu item. Which one is indicated by the paramters node. This method is responsible to decide whether to display the command, whether to enable it, and what the text of the menu item should be.
public OnDisplayMacro ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnMacro() public method

Invoked by reflection when the appropriate menu command is executed. Which one is indicated by the paramters node.
public OnMacro ( object commandObject ) : bool
commandObject object
return bool