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

Class GCalcScript

source code

                                  object --+            
                                           |            
AccessEngine.AEUserInterface.AEUserInterface --+        
                                               |        
                  AccessEngine.AEScript.AEScript --+    
                                                   |    
                   AccessEngine.AEScript.EventScript --+
                                                       |
                                                      GCalcScript

A special AEScript for handling gcalctool. It defines the hotkey Caps-Lock+I that reads the equation.

Instance Methods [hide private]
 
init(self)
Registers event tasks to handle caret, selector, state and property events.
source code
string
getDescription(self)
Describe which AETier this script applies to by default.
source code
string
_getFrameBoxText(self, por)
Return the entire equation.
source code
string
_findHotkey(self, text)
Look for a hotkey and give it back.
source code
 
stopReading(self, **kwargs)
The BasicSpeechScript.onStateChange-method cuts off the reading of the radiobutton details and reads the state twice.
source code
boolean
readEquation(self, **kwargs)
Is invoked whenever user hits Caps-Lock+I.
source code
boolean
readButtonName(self, **kwargs)
Invoked when focus changes.
source code
boolean
onCaretDeleted(self, text, **kwargs)
When a button is pressed: delete, move, insert events are fired in that order.
source code
boolean
onCaretInserted(self, text, **kwargs)
Reads text that is added to the equation, either by keyboard or by clicking buttons.
source code
boolean
onStateChange(self, **kwargs)
Handles text being displayed as tooltip.
source code
boolean
onPropertyChange(self, **kwargs)
Handles text being displayed in the statusbar.
source code

Inherited from AccessEngine.AEScript.EventScript: chainNewEventTaskAround, executeAroundTask, onCaretChange, onCaretMoved, onChildAdded, onChildRemoved, onChildrenChange, onChooserChange, onChooserEnd, onChooserSignal, onChooserStart, onFocusChange, onFocusGained, onFocusLost, onMouseChange, onMouseMoved, onMousePressed, onMouseReleased, onScreenChange, onScreenReflowed, onScreenRefreshed, onScreenResized, onSelectorActive, onSelectorAdded, onSelectorChange, onSelectorRemoved, onSelectorText, onTableChange, onTableColumnDeleted, onTableColumnInserted, onTableColumnReordered, onTableRowDeleted, onTableRowInserted, onTableRowReordered, onViewChange, onViewFirstGained, onViewGained, onViewLost, onViewStartup, registerEventTask, unregisterEventTask, updateAroundTask, updateOnCaretChange, updateOnChildrenChange, updateOnFocusChange, updateOnMouseChange, updateOnPropertyChange, updateOnScreenChange, updateOnSelectorChange, updateOnStateChange, updateOnTableChange, updateOnViewChange

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, getName, 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]
boolean cleared
Set to True if the equation box was cleared.
string old_string
Copy of what was in the equation box.
boolean startup
Set to True until the first caret event happens.
boolean tooltip
Set to True if the tooltip is showing.

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 event tasks to handle caret, selector, state and property events. Registers tasks that can be mapped to AEInput.Gestures.
Overrides: AccessEngine.AEScript.AEScript.init

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

_getFrameBoxText(self, por)

source code 
Return the entire equation.
Parameters:
  • por (AEPor) - Point of regard for the related accessible
Returns: string
Entire equation

_findHotkey(self, text)

source code 
Look for a hotkey and give it back.
Parameters:
  • text (string) - Text which contained a hotkey
Returns: string
Hotkey

stopReading(self, **kwargs)

source code 
The BasicSpeechScript.onStateChange-method cuts off the reading of the radiobutton details and reads the state twice. This chain around to stop the BasicSpeechScript and get the full detail infos: role, accessible name, state and hotkey.
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

readEquation(self, **kwargs)

source code 
Is invoked whenever user hits Caps-Lock+I. It reads the equation character by character.
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task
Returns: boolean
True to allow other tasks to process this event.

To Do: NA: special characters like /*+-() are not translated

readButtonName(self, **kwargs)

source code 
Invoked when focus changes. We use this to announce the proper text of buttons, radio buttons, and check buttons as the user arrows between them, or uses Tab.
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task
Returns: boolean
True to allow other tasks to process this event.

onCaretDeleted(self, text, **kwargs)

source code 
When a button is pressed: delete, move, insert events are fired in that order. Uses the delete event to capture what the string was before the new text is added by the insert.
Parameters:
  • text (string) - Text before the changes
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task
Returns: boolean
True to allow other tasks to process this event.
Overrides: AccessEngine.AEScript.EventScript.onCaretDeleted

onCaretInserted(self, text, **kwargs)

source code 
Reads text that is added to the equation, either by keyboard or by clicking buttons. Announces the current text in the display area.
Parameters:
  • text (string) - Text insterted
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task
Returns: boolean
True to allow other tasks to process this event.
Overrides: AccessEngine.AEScript.EventScript.onCaretInserted

onStateChange(self, **kwargs)

source code 
Handles text being displayed as tooltip.
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task
Returns: boolean
True to allow other tasks to process this event.
Overrides: AccessEngine.AEScript.EventScript.onStateChange

onPropertyChange(self, **kwargs)

source code 
Handles text being displayed in the statusbar.
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task
Returns: boolean
True to allow other tasks to process this event.
Overrides: AccessEngine.AEScript.EventScript.onPropertyChange