C# Class ACAT.Lib.Extension.AppAgents.TalkWindow.TalkWindowAgentBase

The agent for the Talk Window. Handles Talkwindow contextual menu functions such as zoomin, zoomout, websearch, wikipedia search,
Inheritance: ACAT.Lib.Core.AgentManagement.AgentBase
Show file Open project: brlima94/acat-localization

Public Methods

Method Description
CheckWidgetEnabled ( ACAT.Lib.Core.AgentManagement.CheckEnabledArgs arg ) : void

Invoked to set the 'enabled' state of a widget. This will depend on the current context.

OnContextMenuRequest ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : void

Request for a contextual menu came in. If talk window is visible display the contextual menu for it.

OnFocusChanged ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, bool &handled ) : void

Invoked when the foreground window focus changes. If the foreground window is the talk window, create the Text control agent for it and display the Alphabet scanner

OnFocusLost ( ) : void

Focus shifted to an app not supported by this agent. Release resources

TalkWindowAgentBase ( ) : System

Initializes a new instance of the class.

Protected Methods

Method Description
OnDispose ( ) : void

Invoked on disposal. Cleanup

getTalkWindowSelectedTextOrPara ( ) : String

Returns the text from the talk window. The text is either one that is currently selected, or the current paragraph

Private Methods

Method Description
AppTalkWindowManager_EvtTalkWindowClosed ( object sender, EventArgs e ) : void

Talk window was closed

AppTalkWindowManager_EvtTalkWindowVisibilityChanged ( object sender, ACAT.Lib.Core.TalkWindowManagement.TalkWindowVisibilityChangedEventArgs e ) : void

Visibility of talk window changed.

OnRunCommand ( String command, object commandArg, bool &handled ) : void
_textInterface_EvtTextChanged ( object sender, ACAT.Lib.Core.AgentManagement.TextInterface.TextChangedEventArgs e ) : void

Event handler for when text or caret position in the text window changes

createTalkWindowTextInterface ( IntPtr handle, AutomationElement automationElement ) : void

Creates the text interface for the Talk window

disposeTextInterface ( ) : void

Disposes text interface

getTalkTextWinAutomationElement ( ) : AutomationElement

Gets the automation element of the talk text window

Method Details

CheckWidgetEnabled() public method

Invoked to set the 'enabled' state of a widget. This will depend on the current context.
public CheckWidgetEnabled ( ACAT.Lib.Core.AgentManagement.CheckEnabledArgs arg ) : void
arg ACAT.Lib.Core.AgentManagement.CheckEnabledArgs contains info about the widget
return void

OnContextMenuRequest() public method

Request for a contextual menu came in. If talk window is visible display the contextual menu for it.
public OnContextMenuRequest ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo ) : void
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Foreground window info
return void

OnDispose() protected method

Invoked on disposal. Cleanup
protected OnDispose ( ) : void
return void

OnFocusChanged() public method

Invoked when the foreground window focus changes. If the foreground window is the talk window, create the Text control agent for it and display the Alphabet scanner
public OnFocusChanged ( ACAT.Lib.Core.Utility.WindowActivityMonitorInfo monitorInfo, bool &handled ) : void
monitorInfo ACAT.Lib.Core.Utility.WindowActivityMonitorInfo Foreground window info
handled bool set to true if handled
return void

OnFocusLost() public method

Focus shifted to an app not supported by this agent. Release resources
public OnFocusLost ( ) : void
return void

TalkWindowAgentBase() public method

Initializes a new instance of the class.
public TalkWindowAgentBase ( ) : System
return System

getTalkWindowSelectedTextOrPara() protected method

Returns the text from the talk window. The text is either one that is currently selected, or the current paragraph
protected getTalkWindowSelectedTextOrPara ( ) : String
return String