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

Class ReviewScript

source code

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

Registers tasks for reviewing items, words, and characters. Also registers tasks for moving pointer to por and focus to por. 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 tasks that can be mapped to AEInput.Gestures.
source code
boolean
_hasPeek(self, task_name)
Gets if the task_name has the string 'peek'.
source code
 
moveToPOR(self, por, peek)
Method to account for peeking.
source code
string
getName(self)
Provides the localized name of this AEScript.
source code
string
getDescription(self)
Describe what this AEScript do.
source code
 
previousItem(self, onlyvisible=None, **kwargs)
Moves the AETier.virtual_por to the beginning of the previous item.
source code
 
currentItem(self, **kwargs)
Moves the AETier.virtual_por to the beginning of the current item.
source code
 
nextItem(self, onlyvisible=None, **kwargs)
Moves the AETier.virtual_por to the beginning of the next item.
source code
 
previousWord(self, **kwargs)
Moves the AETier.virtual_por to the beginning of the previous word.
source code
 
currentWord(self, **kwargs)
Moves the AETier.virtual_por to the beginning of the current word.
source code
 
nextWord(self, **kwargs)
Moves the AETier.virtual_por to the beginning of the next word.
source code
 
previousChar(self, **kwargs)
Moves the AETier.virtual_por to the previous character.
source code
 
currentChar(self, **kwargs)
The AETier.virtual_por is already referring to the current character.
source code
 
nextChar(self, **kwargs)
Moves the AETier.virtual_por to the next character.
source code
 
focusToPOR(self, por=None, **kwargs)
Attempts to focus, select, and move the caret to the AETier.virtual_por by default or the given AEPor if not None.
source code
 
pointerToPOR(self, por=None, **kwargs)
Moves the AETier.virtual_por to the location of the last focus, selector, or caret event by default or the given AEPor if not None.
source code
 
mouseToPOR(self, por=None, **kwargs)
Move the mouse pointer to the location of the AETier.virtual_por by default or the given AEPor if not None.
source code
 
skipItem(self, **kwargs)
Does nothing.
source code
 
shouldSkip(self, peek, por=None, **kwargs)
Determines if the current AEPor should be skipped or not based on the user setting for Skipping.
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__

Instance Variables [hide private]
boolean peek
Should this review task instance actually affect the pointer AEPor and allow announcements of its changed state or simply give a preview of where it will wind up for programmatic purposes?

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 tasks that can be mapped to AEInput.Gestures. All tasks are registered twice, once as preview and once as not. The base class for all review classes will take care of adding the word 'peek' to those tasks with the peek flag set.
Overrides: AccessEngine.AEScript.AEScript.init

_hasPeek(self, task_name)

source code 
Gets if the task_name has the string 'peek'.
Parameters:
  • task_name (string) - Name of the given task.
Returns: boolean
True if the task_name has the string 'peek'.

moveToPOR(self, por, peek)

source code 
Method to account for peeking. If peek is True, stores the new AEPor as a temporary task value under the name 'peek' instead of updating the actual AETier.virtual_por.
Parameters:
  • por (AEPor) - Point of regard for the related accessible
  • peek (boolean) - True if the task_name has the string 'peek' or None.

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 AEScript do.
Returns: string
Human readable translated description of this script.
Overrides: AccessEngine.AEUserInterface.AEUserInterface.getDescription

previousItem(self, onlyvisible=None, **kwargs)

source code 

Moves the AETier.virtual_por to the beginning of the previous item.

Chain values:
  • review (integer): REVIEW_NO_PREV_ITEM or REVIEW_OK
  • has skipped (boolean): True if at least one item has been skipped
  • will skip (boolean): True if at least one item will be skipped
  • peek: AEPor of previous item, if peek is True
Parameters:
  • onlyvisible (boolean) - Shoud the "OnlyVisible" user setting overrides?
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

currentItem(self, **kwargs)

source code 

Moves the AETier.virtual_por to the beginning of the current item.

Chain values:
  • review (integer): REVIEW_OK
  • has skipped (boolean): False
  • will skip (boolean): False
  • peek: AEPor of current item (if peek is True)
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

nextItem(self, onlyvisible=None, **kwargs)

source code 

Moves the AETier.virtual_por to the beginning of the next item.

Chain values:
  • review (integer): REVIEW_NO_NEXT_ITEM or REVIEW_OK
  • has skipped (boolean): True if at least one item has been skipped
  • will skip (boolean): True if at least one item will be skipped
  • peek: AEPor of next item, if peek is True
Parameters:
  • onlyvisible (boolean) - Shoud the "OnlyVisible" user setting overrides?
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

previousWord(self, **kwargs)

source code 

Moves the AETier.virtual_por to the beginning of the previous word.

Chain values:
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

currentWord(self, **kwargs)

source code 

Moves the AETier.virtual_por to the beginning of the current word.

Chain values:
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

nextWord(self, **kwargs)

source code 

Moves the AETier.virtual_por to the beginning of the next word.

Chain values:
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

previousChar(self, **kwargs)

source code 

Moves the AETier.virtual_por to the previous character.

Chain values:
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

currentChar(self, **kwargs)

source code 

The AETier.virtual_por is already referring to the current character. This task only exists so others can link to it.

Chain values:
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

nextChar(self, **kwargs)

source code 

Moves the AETier.virtual_por to the next character.

Chain values:
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

focusToPOR(self, por=None, **kwargs)

source code 
Attempts to focus, select, and move the caret to the AETier.virtual_por by default or the given AEPor if not None.
Parameters:
  • por (AEPor) - Point of regard for the related accessible
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

pointerToPOR(self, por=None, **kwargs)

source code 
Moves the AETier.virtual_por to the location of the last focus, selector, or caret event by default or the given AEPor if not None.
Parameters:
  • por (AEPor) - Point of regard for the related accessible
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

mouseToPOR(self, por=None, **kwargs)

source code 
Move the mouse pointer to the location of the AETier.virtual_por by default or the given AEPor if not None.
Parameters:
  • por (AEPor) - Point of regard for the related accessible
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

skipItem(self, **kwargs)

source code 
Does nothing. Exists so that other scripts can register tasks to respond to skipped items.
Parameters:
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task

shouldSkip(self, peek, por=None, **kwargs)

source code 
Determines if the current AEPor should be skipped or not based on the user setting for Skipping. Executes a task named 'review skip report' when Skipping is set to SKIP_REPORT or SKIP_ALL.
Parameters:
  • peek (boolean) - When set, do not 'review skip report' since we are looking to preview whether or not an item will be skipped. We do not want chained tasks to execute and announce any information in this case.
  • por (AEPor) - Point of regard to test
  • kwargs (dictionary) - Arbitrary keyword arguments to pass to the task