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

Class BasicMagScript

source code

                                  object --+            
                                           |            
AccessEngine.AEUserInterface.AEUserInterface --+        
                                               |        
                  AccessEngine.AEScript.AEScript --+    
                                                   |    
                   AccessEngine.AEScript.EventScript --+
                                                       |
                                          object --+   |
                                                   |   |
                                            ZoomMove --+
                                                       |
                                                      BasicMagScript

A script to provide magnification for a user. It defines special hotkeys.

Nested Classes [hide private]
AEState class STATE
Class to instantiate and use to store state information across all instances of this AEScript.
Instance Methods [hide private]
 
init(self)
Registers event tasks to handle focus, caret, selector, and mouse change events.
source code
 
_updateSetting(self, state, setting)
Update special given settings.
source code
string
getName(self)
Provides the localized name of this AEScript.
source code
string
getDescription(self)
Describe what this special AEScript do.
source code
 
goToPos(self, pos, layer)
Send command to magnifier device to center zoomer on given coordinate.
source code
tuple
getPos(self, layer)
Get ROI from magnifier and return center coordinate.
source code
 
getDesiredFocalPoint(self, por, track_mouse=True, **kwargs)
Calculates the desired focal point for a specific POR.
source code
boolean
onFocusGained(self, **kwargs)
Moves the magnifier to coordinate of this focused element.
source code
boolean
onCaretChange(self, **kwargs)
Moves the magnifier to coordinate of this caret.
source code
boolean
onSelectorChange(self, **kwargs)
Moves the magnifier to coordinate of this selected element.
source code
boolean
onMouseMoved(self, **kwargs)
Execute on each mouse event, moves the magnifier to coordinate of mouse.
source code
 
onReviewChange(self, **kwargs)
Synchronizes the magnified area to the text at the pointer when reviewing.
source code
 
changeZoomLevel(self, **kwargs)
Increases or decreases zoom level.
source code
 
startPan(self)
Register a TimerTask for the pan animation.
source code
 
stopPan(self)
Unregister pan animation timer task.
source code
 
onPanTimer(self, **kwargs)
Execute on timed intervals.
source code

Inherited from AccessEngine.AEScript.EventScript: chainNewEventTaskAround, executeAroundTask, onCaretDeleted, onCaretInserted, onCaretMoved, onChildAdded, onChildRemoved, onChildrenChange, onChooserChange, onChooserEnd, onChooserSignal, onChooserStart, onFocusChange, onFocusLost, onMouseChange, onMousePressed, onMouseReleased, onPropertyChange, onScreenChange, onScreenReflowed, onScreenRefreshed, onScreenResized, onSelectorActive, onSelectorAdded, onSelectorRemoved, onSelectorText, onStateChange, 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, getPath

Inherited from ZoomMove: goTo

Inherited from ZoomMove (private): _hopTo, _panStep, _panTo

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

Class Variables [hide private]
integer FUDGE = 5
Fudge the Calculation of mouse pointer position

Inherited from ZoomMove: pan_rate

Instance Variables [hide private]
tuple mousepos
Coordinates of the mouse pointer position
AEPor parent_por_focus
The parent accessible of a focused element
AEPor parent_por_select
The parent accessible of a selected element

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

Inherited from ZoomMove: accel, smooth_pan, velocity

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

init(self)

source code 
Registers event tasks to handle focus, caret, selector, and mouse change events. Registers tasks that can be mapped to AEInput.Gestures.
Overrides: AccessEngine.AEScript.AEScript.init

_updateSetting(self, state, setting)

source code 
Update special given settings.
Parameters:
  • state () -
  • setting (string) - Name of attribute

getName(self)

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

getDescription(self)

source code 
Describe what this special AEScript do.
Returns: string
Human readable translated description of this script.
Overrides: AccessEngine.AEUserInterface.AEUserInterface.getDescription

goToPos(self, pos, layer)

source code 
Send command to magnifier device to center zoomer on given coordinate.
Parameters:
  • pos (tuple of integer) - x,y coordinate
  • layer (integer) - Layer
Overrides: ZoomMove.goToPos

getPos(self, layer)

source code 
Get ROI from magnifier and return center coordinate.
Parameters:
  • layer (integer) - Layer
Returns: tuple
Magnifier's focal point.

getDesiredFocalPoint(self, por, track_mouse=True, **kwargs)

source code 
Calculates the desired focal point for a specific POR. And retuns current focal point, and desired focal point.
Parameters:
  • por (AEPor) - POR (Point of Regard) that's focal point needs to be determined.
  • track_mouse (boolean) - Take the current position of the mouse pointer into account so that the magnifier doesn't jerk?
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

onFocusGained(self, **kwargs)

source code 
Moves the magnifier to coordinate of this focused element.
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.onFocusGained

onCaretChange(self, **kwargs)

source code 
Moves the magnifier to coordinate of this caret.
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task.
Returns: boolean
True to allow other task to process this event
Overrides: AccessEngine.AEScript.EventScript.onCaretChange

onSelectorChange(self, **kwargs)

source code 
Moves the magnifier to coordinate of this selected element.
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task.
Returns: boolean
Should processing continue? Always returns True by default.
Overrides: AccessEngine.AEScript.EventScript.onSelectorChange

onMouseMoved(self, **kwargs)

source code 
Execute on each mouse event, moves the magnifier to coordinate of mouse.
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.onMouseMoved

onReviewChange(self, **kwargs)

source code 
Synchronizes the magnified area to the text at the pointer when reviewing.
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task.

changeZoomLevel(self, **kwargs)

source code 
Increases or decreases zoom level.
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task.

startPan(self)

source code 
Register a TimerTask for the pan animation.
Overrides: ZoomMove.startPan

stopPan(self)

source code 
Unregister pan animation timer task.
Overrides: ZoomMove.stopPan

onPanTimer(self, **kwargs)

source code 
Execute on timed intervals. Used to animate pan magnifier movement.
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task.