Module GTerminalScript :: Class GTerminalScript
[hide private]
[frames] | no frames]

Class GTerminalScript

source code

                                  object --+        
                                           |        
AccessEngine.AEUserInterface.AEUserInterface --+    
                                               |    
                  AccessEngine.AEScript.AEScript --+
                                                   |
                                                  GTerminalScript

A special AEScript for handling gnome terminal. Corrects caret problems in in gnome-terminal.

Instance Methods [hide private]
 
init(self)
Registers a event task to handle caret events and chain it around the default BasicSpeechScript.onCaretChange-method.
source code
string
getName(self)
Provides the localized name of this AEScript.
source code
string
getDescription(self)
Describe which AETier this script applies to by default.
source code
boolean
handleTerminalCaret(self, por, text, text_offset, added, **kwargs)
This task handles messy AEEvent.CaretChange events sent from gnome-terminal.
source code

Inherited from AccessEngine.AEScript.AEScript: __init__, bindToEvent, chainTask, close, doCyclicInputTask, doTask, getAETier, getAnchorScriptClassName, getAnchorTaskId, getChainSegment, getChooserTask, getCommandTask, getEventTasks, getIdealOutput, getLastKey, getOutputDevices, getPointerPOR, getRegisteredTask, getScriptSetting, getScriptSettingVal, getState, getTaskKeys, getTempData, getVirtualPOR, mergeChain, postClose, preInit, registerChooserTask, registerCommand, registerCyclicInputTask, registerCyclicInputTasks, registerModifiers, registerTask, registerTimerTask, setIdealOutput, setPointerPOR, setScriptSettingVal, setTempData, setVirtualPOR, unbindFromEvent, unchainTask, unregisterChooserTask, unregisterCommand, unregisterCyclicInputTask, unregisterModifiers, unregisterTask, unregisterTaskFromCyclicInputTask, unregisterTimerTask

Inherited from AccessEngine.AEUserInterface.AEUserInterface: getClassName, getPath

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]

Inherited from AccessEngine.AEScript.AEScript: STATE

Instance Variables [hide private]
dictionary actions
Maps all possible 'added' values to strings
tuple delete_keys
Stores keys to delete something
AEPor last_caret
Stores the previous caret
tuple last_key
Stores the last key pressed for future comparision
tuple move_keys
Stores all keys that allow movement
string ret_key
Store the return key
string space_key
Store the space key

Inherited from AccessEngine.AEScript.AEScript: after_chains, around_chains, around_tasks, before_chains, chooser_tasks, command_descriptions, commands, cyclic_input_tasks, def_out, event_tasks, out_caps, registered_modifiers, registered_tasks, state, tier

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

init(self)

source code 
Registers a event task to handle caret events and chain it around the default BasicSpeechScript.onCaretChange-method. Initialize script variables.
Overrides: AccessEngine.AEScript.AEScript.init

getName(self)

source code 
Provides the localized name of this AEScript.
Returns: string
Human readable translated name of this script.
Overrides: AccessEngine.AEUserInterface.AEUserInterface.getName

getDescription(self)

source code 
Describe which AETier this script applies to by default.
Returns: string
Human readable translated description of this script.
Overrides: AccessEngine.AEUserInterface.AEUserInterface.getDescription

handleTerminalCaret(self, por, text, text_offset, added, **kwargs)

source code 
This task handles messy AEEvent.CaretChange events sent from gnome-terminal. This one is chained around the BasicSpeechScript.onCaretChange event. The method identifies the event, fix, propagate or ignore it althogether.
Parameters:
  • por (AEPor) - Point of regard where the caret event occurred
  • text (string) - The text inserted, deleted or the line of the caret
  • text_offset (integer) - The offset of the inserted/deleted text or the line offset when movement only
  • added (boolean) - True when text added, False when text deleted, and None (the default) when event is for caret movement only.
  • layer (integer) - Layer on which the event occurred
  • task_name (string) - Name of the task this function executes.
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task
Returns: boolean
True to allow other tasks to process this event.