Task :: Tools :: View :: View :: Class View
[hide private]
[frames] | no frames]

Class View

source code

    object --+    
             |    
Base.TaskTools --+
                 |
                View

Provides methods for reading information from accessible objects and for navigating relative to a POR.

Methods prefixed with get do not modify the task_por variable. They only return the POR of interest. Methods prefixed with move do modify these variables. Methods prefixed with set actually change properties of the accessible itself.


Note: Selected and editable states not being announced because they happen a unexpected times or on undesireable accessibles. Selection can probably be done properly with events. Editable we will just avoid for the time being.

Instance Methods [hide private]
float
getAccFloatValue(self, por=None)
Gets the floating point value at the given POR.
source code
3-tuple of float
getAccFloatValueExtents(self, por=None)
Get the extents and step size of the floating point value at the POR.
source code
dictionary
getAccDefTextAttrs(self, por=None)
Gets a dictionary of name:value default text attribute pairs at the provided POR.
source code
list of string
getAccTextSelection(self, n=None, por=None)
Gets a list of all selected text if n is None, or the nth selection if it is specified, at the POR.
source code
string
getAccText(self, start=None, end=None)
Gets all of the text from the starting offset to the ending offset at the given PORs.
source code
string
getWindowTitle(self, por=None)
Gets the accessible name of the window containing the POR.
source code
string
getAppName(self, por=None)
Gets the accessible name of the application containing the POR.
source code
string
getAccAppLocale(self, por=None)
Gets the POSIX locale of the application containing the POR as a string.
source code
dictionary of string
getAccAttrs(self, por=None)
Gets a dictionary of name:value attribute pairs at the provided POR.
source code
string
getAccName(self, por=None)
Gets the accessible name of the component at the provided POR.
source code
string
getAccDesc(self, por=None)
Gets the accessible description of the component at the provided POR.
source code
integer
getAccCount(self, por=None)
Gets the number of child accessibles of the accessible indicated by the given POR.
source code
string
getAccRoleName(self, por=None)
Gets the localized role name for the accessible at the provided POR.
source code
string
getAccRole(self, por=None)
Gets the unlocalized role for the accessible at the provided POR.
source code
list of string
getAccActionNames(self, por=None)
Gets the names of the actions that can be performed at the provided POR.
source code
list of string
getAccActionDescs(self, por=None)
Gets the descriptions of the actions that can be performed at the provided POR.
source code
list of tuple of string
getAccActionKeys(self, por=None)
Gets the key bindings associated with the actions at the given POR.
source code
string
getAccClickKey(self, por=None)
Gets the key binding associated with the common "click" action which appears to be the action most commonly accessed by a hotkey.
source code
integer
getAccLevel(self, por=None)
Gets the tree level of the item indicated by the given POR.
source code
2-tuple of integer
getAccTableExtents(self, por=None)
Returns the number of rows and columns in a table indicated by the given POR.
source code
2-tuple of integer
getAccVisualExtents(self, por=None)
Returns the extents of a visual component at the POR.
source code
2-tuple of integer
getAccVisualPoint(self, por=None)
Returns the focal point of a visual component at the POR.
source code
2-tuple of integer
getAccPosition(self, por=None)
Gets the position of the accessible object, usually upper-left corner
source code
integer
getAccRow(self, por=None)
Gets the row index of the POR within some 2D ordered collection.
source code
integer
getAccColumn(self, por=None)
Gets the column index of the POR within some 2D ordered collection.
source code
POR
getAccAtRowColumn(self, row, col, por=None)
Gets the POR to the cell in the given POR at the given row and column.
source code
string
getAccRowHeader(self, por=None)
Gets the text description of a row in a table.
source code
string
getAccColumnHeader(self, por=None)
Gets the text description of a column in a table.
source code
integer
getAccIndex(self, por=None)
Gets the index the POR within some 1D ordered collection.
source code
string
getAccLabel(self, por=None)
Gets the label for the accessible at the provided POR.
source code
list of PORs
getAccRelations(self, relation, por=None)
Gets the PORs to accessibles related to the given POR in the manner stated by the given relation.
source code
boolean
hasAccState(self, state, por=None)
Gets if the accessible at the given POR has the given state.
source code
boolean
hasOneAccState(self, por=None, *states)
Gets if the accessible at the given POR has one of the given states.
source code
boolean
hasAccRole(self, role, por=None)
Gets if the accessible at the given POR has the given role.
source code
boolean
hasOneAccRole(self, por=None, *roles)
Gets if the accessible at the given POR has any one of the given roles.
source code
string
getStateText(self, por=None, name=None, value=None)
Gets text describing the states of the given POR that might be of interest to the user.
source code
string
getItemText(self, por=None)
Gets the text of the complete item that includes the specified POR.
source code
string
getCharText(self, por=None)
Gets the text of the current character at the specified POR.
source code
string
getWordText(self, por=None)
Gets the text of the current word at the specified POR.
source code
list of POR
getAllSelected(self, por=None)
Gets all of the selected items or accessible children in the accessible indicated by the given POR.
source code
boolean
setAllSelected(self, por=None)
Selects all of the items or accessible children in the accessible indicated by the given POR.
source code
boolean
setAllDeselected(self, por=None)
Deselects all of the items or accessible children in the accessible indicated by the given POR.
source code
POR
getFirstSelected(self, por=None)
Gets the first selected items or accessible children in the accessible indicated by the given POR.
source code
 
doAction(self, index, por=None)
Executes the action at the given index in the list of all actions named in the return value from getAccActionNames.
source code
POR
getAccFocus(self, search=False)
Gets the POR representing the focus of the foreground application.
source code
boolean
setAccFocus(self, por=None)
Sets the system input focus to the accessible in the provided POR.
source code
boolean
setAccSelected(self, por=None)
Selects the item or accessible indicated by the given POR.
source code
boolean
setAccDeselected(self, por=None)
Deselects the item or accessible indicated by the given POR.
source code
POR
getAccCaret(self, por=None)
Gets the text input caret POR within the given accessible POR.
source code
boolean
setAccCaret(self, por=None)
Moves the text input caret to offset indicated by the given POR.
source code
boolean
setAccPOR(self, por=None)
Sets the system input focus, selection, and caret offset to the provided POR.
source code
POR
getFirstPeerAcc(self, por=None)
Gets the POR of the first accessible peer of a given POR.
source code
POR
getLastPeerAcc(self, por=None)
Gets the POR of the last accessible peer of a given POR.
source code
POR
getNextPeerAcc(self, por=None)
Gets the POR of the next accessible peer of a given POR.
source code
POR
getPrevPeerAcc(self, por=None)
Gets the POR of the previous accessible peer of a given POR.
source code
POR
getNextAcc(self, por=None)
Gets the POR of the next accessible of a given POR in the AccessibleWalker order.
source code
POR
getPrevAcc(self, por=None)
Gets the POR of the previous accessible of a given POR.
source code
POR
getNextItem(self, por=None, wrap=False, only_visible=False)
Gets the POR of the next item in the given POR.
source code
POR
getCurrItem(self, por=None)
Gets the POR of the start of the item.
source code
POR
getPrevItem(self, por=None, wrap=False, only_visible=False)
Gets the POR of the previous item in the given POR.
source code
POR
getNextWord(self, por=None)
Get the POR of the next word in the item indicated by the given POR.
source code
POR
getCurrWord(self, por=None)
Get the POR of the current word in the item indicated by the given POR.
source code
POR
getPrevWord(self, por=None)
Get the POR of the previous word in the item indicated by the given POR.
source code
POR
getLastWord(self, por=None)
Get the POR of the current word in the item indicated by the given POR.
source code
POR
getNextChar(self, por=None)
Get the POR of the next character in the item indicated by the given POR.
source code
POR
getPrevChar(self, por=None)
Get the POR of the previous character in the item indicated by the given POR.
source code
POR
getLastChar(self, por=None)
Get the POR of the last character in the item indicated by the given POR.
source code
POR
getNextRow(self, por=None)
Get the POR of the first column of the next row relative to the row containing the item indicated by the given POR.
source code
POR
getCurrRow(self, por=None)
Gets the POR to the cell in the first column of the row containing the item indicated by the given POR.
source code
POR
getPrevRow(self, por=None)
Get the POR of the first column of the previous row relative to the row containing the item indicated by the given POR.
source code
POR
iterNextAccs(self, por=None)
Builds an iterator over the accessibles next to the current POR.
source code
POR
iterPrevAccs(self, por=None)
Builds an iterator over the accessibles previous to the current POR.
source code
POR
iterNextItems(self, por=None, wrap=False, only_visible=False)
Builds an iterator over the items next to the current POR.
source code
POR
iterPrevItems(self, por=None, wrap=False, only_visible=False)
Builds an iterator over the items previous to the current POR.
source code
POR
getChildAcc(self, index, por=None)
Gets the child accessible at the given index from the POR.
source code
POR
getParentAcc(self, por=None)
Gets the POR of the first character and first item of the parent of the provided POR.
source code
POR
iterAncestorAccs(self, por=None, only_visible=False, allow_trivial=False)
Builds an iterator over the ancestors of the current POR.
source code
POR
getViewRootAcc(self)
Gets a POR indicating the root of the active view.
source code
POR
getRootAcc(self, por=None)
Gets a POR to the top level container of the given POR.
source code
POR
getEndAcc(self, por=None)
Gets a POR to the last item of the last accessible under the root of the view.
source code
POR
getLastAccUnder(self, por=None)
Gets a POR to the last item of the last accessible under the given root.
source code
POR
getAccFromPath(self, por=None, *path)
Gets a POR representing the accessible found by treating the path integers as descendant indices stating at the given POR.
source code
boolean
compareAncestorRoles(self, por=None, *roles)
Iterates through the given roles comparing them with the roles of the first len(roles) ancestors of the given POR starting with the immediate parent.
source code
POR
findAccByName(self, name, por=None, ancestor=False, depth_first=True)
Gets a POR to the first accessible descendant or ancestor of the given POR with the given name.
source code
POR
findAccByRole(self, role, por=None, ancestor=False, depth_first=True)
Gets a POR to the first accessible descendant or ancestor of the given POR with the given role.
source code
POR
findAccByObjId(self, objname, por=None, ancestor=False, depth_first=True)
Gets a POR to the first accessible descendant or ancestor of the given POR with the given 'id' attribute named objname.
source code
POR
findAccByPredicate(self, predicate, por=None, ancestor=False, depth_first=True)
Gets a POR to the first accessible descendant or ancestor of the given POR matching the given callable predicate.
source code
 
moveToPointer(self)
Moves the task_por to the pointer POR.
source code
 
moveToItemStart(self)
Moves the task_por to the first character in the current item of the POR.
source code
 
moveToPOR(self, por)
Moves the task_por to the given POR.
source code
 
moveToRoot(self)
Modifies the task_por to the root of the view.
source code
 
moveToEnd(self)
Modifies the task_por to the beginning of the last item in the current view.
source code
string
getAccTextAttr(self, name, por=None)
Gets the value of the given attribute of an accessible of a given POR.
source code
dictionary
getAccAllTextAttrs(self, por=None)
Like getAccTextAttr, but gets the values of all of the current attributes of an accessible of a given POR.
source code
POR
getStartOfHardLine(self, por=None)
From a given POR, get the POR of the start of the first line that follows the previous hard line break, or the start of the first line if it is the first line in the accessible.
source code
POR
getEndOfHardLine(self, por=None)
From a given POR, get the POR of the end of the first following line that ends with a hard line break, or the end of the last line if it is the last line in the accessible.
source code
string
getAccTextBetween(self, start_por=None, end_por=None, only_visible=False)
Gets all text between two point of regards.
source code
boolean
setAccText(self, text, por=None)
Sets the given string as the text at the given POR.
source code
boolean
insertAccText(self, text, por=None, attrs=None)
Inserts the given text at the given POR.
source code
boolean
setAccTextAttrs(self, start=None, end=None, **attrs)
Sets the attributes of the text from the given starting POR to the ending POR.
source code
boolean
copyAccText(self, start=None, end=None)
Copies the text from the given starting POR to the ending POR.
source code
boolean
cutAccText(self, start=None, end=None)
Cuts the text from the given starting POR to the ending POR.
source code
boolean
deleteAccText(self, start=None, end=None)
Deletes the text from the given starting POR to the ending POR.
source code
boolean
pasteAccText(self, por=None)
Pastes the clipboard text at the given POR.
source code
POR
getPointerPOR(self)
Gets the pointer POR for this Tier.
source code
 
setPointerPOR(self, por=None)
Sets the pointer POR for this Tier.
source code
integer
getAccTextLength(self, por=None)
Gets the length of the text in the POR.
source code
integer
getAccTextSelectionCount(self, por=None)
Gets the number of discontiguous text selections in the POR.
source code
boolean
selectAccText(self, n=None, start=None, end=None)
Selects the text from the given starting POR to the ending POR.
source code
boolean
deselectAccText(self, n=None, por=None)
Deselects the text from the given starting POR to the ending POR.
source code
3-tuple of integer, string, integer
getLastKey(self)
Gets the key code, key sym, and modifiers of the last key pressed when this Tier was active.
source code
boolean
mouseEventPOR(self, event, por=None)
Triggers a mouse event at the center of the given point of regard.
source code
boolean
leftClickPOR(self, por=None)
Performs a mouse left click on the center of a given point of regard.
source code
 
inhibitAutoPointer(self)
Stops the task_por from being stored as the Tier pointer POR for this event only.
source code
integer
getAccSetSize(self, por=None)
Get the number of members within an accessible group.
source code
integer
getAccPosInSet(self, por=None)
Get the position of an accessible within a group.
source code
string
getAccURI(self, index, por=None)
Obtain a resource locator ('URI') string which can be used to access the content to which this link "points" or is connected.
source code
integer
getAccAnchorCount(self, por=None)
Obtain he number of separate anchors associated with this accessible.
source code

Inherited from Base.TaskTools: __init__, close, init, postClose, postExecute, preExecute, preInit

Inherited from Base.TaskTools (private): _changeDefaultOutput

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

Class Variables [hide private]
dictionary of 2-tuple, string pairs _state_descriptions = {('checked', False): _('unchecked'), ('e...
Mapping from state name/value pairs to localized string
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getAccFloatValue(self, por=None)

source code 

Gets the floating point value at the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: float
Floating point value
Raises:

getAccFloatValueExtents(self, por=None)

source code 

Get the extents and step size of the floating point value at the POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: 3-tuple of float
The minimum possible value, the maximum possible value, and the step size for the floating point value
Raises:

getAccDefTextAttrs(self, por=None)

source code 

Gets a dictionary of name:value default text attribute pairs at the provided POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: dictionary
Name/value pairs for all available attributes
Raises:

getAccTextSelection(self, n=None, por=None)

source code 

Gets a list of all selected text if n is None, or the nth selection if it is specified, at the POR. When por is None, the task_por is used.

Parameters:
  • n (integer) - Index of text selection to get or None
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: list of string
List of selected text strings
Raises:

getAccText(self, start=None, end=None)

source code 

Gets all of the text from the starting offset to the ending offset at the given PORs. If start is None, defaults to the beginning of the text. If end is None, defaults to the end of the text. When start or end is None, the task_por is used possibly for both cases.

Parameters:
  • start (POR) - Point of regard to the start of the text run; use the current task's POR if none supplied
  • end (POR) - Point of regard to the end of the text run; use the current task's POR if none supplied
Returns: string
Text between start and end offsets
Raises:

getWindowTitle(self, por=None)

source code 

Gets the accessible name of the window containing the POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
Name of the window
Raises:

getAppName(self, por=None)

source code 

Gets the accessible name of the application containing the POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
Name of the application
Raises:

getAccAppLocale(self, por=None)

source code 

Gets the POSIX locale of the application containing the POR as a string. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
POSIX locale of the application
Raises:

getAccAttrs(self, por=None)

source code 

Gets a dictionary of name:value attribute pairs at the provided POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: dictionary of string
Name/value pairs for all available attributes
Raises:

getAccName(self, por=None)

source code 

Gets the accessible name of the component at the provided POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
The accessible name of the control of the at the point of regard
Raises:

getAccDesc(self, por=None)

source code 

Gets the accessible description of the component at the provided POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
The accessible description of the control of the at the point of regard
Raises:

getAccCount(self, por=None)

source code 

Gets the number of child accessibles of the accessible indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: integer
Number of accessible children
Raises:

getAccRoleName(self, por=None)

source code 

Gets the localized role name for the accessible at the provided POR. When por is None, the task_por is used.

The return value of this method is suitable for output. It is not suitable for comparison to known role values.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
The role name of the control of the at the point of regard
Raises:

getAccRole(self, por=None)

source code 

Gets the unlocalized role for the accessible at the provided POR. When por is None, the task_por is used.

The return value of this method is not suitable for output. It is suitable for comparison to known role values.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
The role name of the control of the at the point of regard
Raises:

getAccActionNames(self, por=None)

source code 

Gets the names of the actions that can be performed at the provided POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: list of string
Names of the actions at the point of regard
Raises:

Note: The names appear to be unlocalized.

getAccActionDescs(self, por=None)

source code 

Gets the descriptions of the actions that can be performed at the provided POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: list of string
Descriptions of the actions at the point of regard
Raises:

Note: Unsure if the descriptions are localized or not.

getAccActionKeys(self, por=None)

source code 

Gets the key bindings associated with the actions at the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: list of tuple of string
Names of key sequences that all trigger the same action
Raises:

getAccClickKey(self, por=None)

source code 

Gets the key binding associated with the common "click" action which appears to be the action most commonly accessed by a hotkey. Only returns the last of all defined hotkey sequences as it is usually the globally available hotkey rather than the local menu mnemonic or a sequence for activating the menu followed by the mnemonic. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
Hotkey sequence
Raises:

getAccLevel(self, por=None)

source code 

Gets the tree level of the item indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: integer
Zero indexed level of the item
Raises:

getAccTableExtents(self, por=None)

source code 

Returns the number of rows and columns in a table indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: 2-tuple of integer
Count of rows and columns
Raises:

getAccVisualExtents(self, por=None)

source code 

Returns the extents of a visual component at the POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: 2-tuple of integer
Width and height of the point of regard
Raises:

getAccVisualPoint(self, por=None)

source code 

Returns the focal point of a visual component at the POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: 2-tuple of integer
x,y coordinates of the focal point of the point of regard
Raises:

getAccPosition(self, por=None)

source code 

Gets the position of the accessible object, usually upper-left corner

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: 2-tuple of integer
x,y coordinates of the accessible's position
Raises:

getAccRow(self, por=None)

source code 

Gets the row index of the POR within some 2D ordered collection. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: integer
Zero indexed row of the item
Raises:

getAccColumn(self, por=None)

source code 

Gets the column index of the POR within some 2D ordered collection. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
Returns: integer
Zero indexed column of the item
Raises:

getAccAtRowColumn(self, row, col, por=None)

source code 

Gets the POR to the cell in the given POR at the given row and column. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
  • row (integer) - Row offset
  • col (integer) - Column offset
Returns: POR
Point of regard to the given row and column
Raises:

getAccRowHeader(self, por=None)

source code 

Gets the text description of a row in a table. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
Returns: string
text description of the row, if there is one.
Raises:

getAccColumnHeader(self, por=None)

source code 

Gets the text description of a column in a table. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
Returns: string
text description of the column, if there is one.
Raises:

getAccIndex(self, por=None)

source code 

Gets the index the POR within some 1D ordered collection. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
Returns: integer
Zero index of the item
Raises:

getAccLabel(self, por=None)

source code 

Gets the label for the accessible at the provided POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
The AccessibleName of the component that labels the component at the given location.
Raises:

getAccRelations(self, relation, por=None)

source code 

Gets the PORs to accessibles related to the given POR in the manner stated by the given relation. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
  • relation (string) - Type of relation
Returns: list of PORs
Point of regard to related accessibles
Raises:

hasAccState(self, state, por=None)

source code 

Gets if the accessible at the given POR has the given state. When por is None, the task_por is used. The state is assumed to be a string that can be mapped to an appropriate state constant on the platform or indicates an extension state that is represented by a string.

Parameters:
  • state (string) - Name of a state (e.g. 'focused', 'selected', 'selectable')
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: boolean
Does the POR have the given state?
Raises:

hasOneAccState(self, por=None, *states)

source code 

Gets if the accessible at the given POR has one of the given states. When por is None, the task_por is used. The state is assumed to be a string that can be mapped to an appropriate state constant on the platform or indicates an extension state that is represented by a string.

This method is more efficient than calling hasAccState multiple times.

Parameters:
  • states (string) - Names of states (e.g. 'focused', 'selected', 'selectable')
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: boolean
Does the POR have the given state?
Raises:

hasAccRole(self, role, por=None)

source code 

Gets if the accessible at the given POR has the given role. When por is None, the task_por is used. The role is assumed to be a string that can be mapped to an appropriate role constant on the platform or indicates an extension role that is represented by a string.

Parameters:
  • role (string) - Name of a role (e.g. 'terminal', 'glass pane', 'button')
  • por (POR) - A point of regard; use the current task's POR if none supplied
Returns: boolean
Does the POR have the given role?
Raises:

hasOneAccRole(self, por=None, *roles)

source code 

Gets if the accessible at the given POR has any one of the given roles. When por is None, the task_por is used. The role is assumed to be a string that can be mapped to an appropriate role constant on the platform or indicates an extension role that is represented by a string.

This method is more efficient than calling hasAccRole multiple times.

Parameters:
  • roles (string) - Name of a role (e.g. 'terminal', 'glass pane', 'button')
  • por (POR) - A point of regard; use the current task's POR if none supplied
Returns: boolean
Does the POR have the given role?
Raises:

getStateText(self, por=None, name=None, value=None)

source code 

Gets text describing the states of the given POR that might be of interest to the user. When por is None, the task_por is used. If name is specified, only gets the text describing the state with that non-translated name. If name is not specified, gets text describing all states of interest.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
  • name (string) - Name of the state to describe
  • value (string) - Value of the state to describe
Returns: string
String describing the state(s), None if named state not found
Raises:

getItemText(self, por=None)

source code 

Gets the text of the complete item that includes the specified POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
Item text at the given point of regard
Raises:

getCharText(self, por=None)

source code 

Gets the text of the current character at the specified POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
Character at the given point of regard
Raises:

getWordText(self, por=None)

source code 

Gets the text of the current word at the specified POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
Word text at the given point of regard
Raises:

getAllSelected(self, por=None)

source code 

Gets all of the selected items or accessible children in the accessible indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: list of POR
Points of regard to selected items or accessibles
Raises:

setAllSelected(self, por=None)

source code 

Selects all of the items or accessible children in the accessible indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: boolean
Is setting the focus supported?
Raises:
  • PORError - When the POR is invalid
  • SelectError - When selecting is supported but rejected by the system for some reason

setAllDeselected(self, por=None)

source code 

Deselects all of the items or accessible children in the accessible indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: boolean
Is setting the focus supported?
Raises:
  • PORError - When the POR is invalid
  • SelectError - When deselecting is supported but rejected by the system for some reason

getFirstSelected(self, por=None)

source code 

Gets the first selected items or accessible children in the accessible indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the first selected item or accessible
Raises:

doAction(self, index, por=None)

source code 

Executes the action at the given index in the list of all actions named in the return value from getAccActionNames. When por is None, the task_por is used.

Parameters:
  • index (integer) - Index of the action to execute.
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Raises:

getAccFocus(self, search=False)

source code 

Gets the POR representing the focus of the foreground application. If no focus event has been received yet by this Tier and search is True, performs a search for an accessible with state focus.

Returns: POR
Point of regard to the focused accessible

Note: Setting search to True can result in a very long search operation. Be careful.

setAccFocus(self, por=None)

source code 

Sets the system input focus to the accessible in the provided POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: boolean
Is setting the focus supported?
Raises:
  • PORError - When the POR is invalid
  • FocusError - When focusing on the POR is supported but rejected by the system for some reason

setAccSelected(self, por=None)

source code 

Selects the item or accessible indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: boolean
Is setting the selection supported?
Raises:
  • PORError - When the POR is invalid
  • SelectError - When selecting the POR is supported but rejected by the system for some reason

setAccDeselected(self, por=None)

source code 

Deselects the item or accessible indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: boolean
Is setting the selection supported?
Raises:
  • PORError - When the POR is invalid
  • SelectError - When deselecting the POR is supported but rejected by the system for some reason

getAccCaret(self, por=None)

source code 

Gets the text input caret POR within the given accessible POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the text insertion caret
Raises:

setAccCaret(self, por=None)

source code 

Moves the text input caret to offset indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: boolean
Is setting the caret supported?
Raises:
  • PORError - When the POR is invalid
  • CaretError - When moving the caret is supported but rejected by the system for some reason

setAccPOR(self, por=None)

source code 

Sets the system input focus, selection, and caret offset to the provided POR. Ignores errors trying each as focus, selection, and caret offset are not all supported by every control. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: boolean
False if none of focus, selection, or caret can be set; True if at least one was set
Raises:

getFirstPeerAcc(self, por=None)

source code 

Gets the POR of the first accessible peer of a given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the first peer accessible

getLastPeerAcc(self, por=None)

source code 

Gets the POR of the last accessible peer of a given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the first peer accessible

getNextPeerAcc(self, por=None)

source code 

Gets the POR of the next accessible peer of a given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the next peer accessible

getPrevPeerAcc(self, por=None)

source code 

Gets the POR of the previous accessible peer of a given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the next peer accessible

getNextAcc(self, por=None)

source code 

Gets the POR of the next accessible of a given POR in the AccessibleWalker order. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the next accessible

getPrevAcc(self, por=None)

source code 

Gets the POR of the previous accessible of a given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the previous accessible or None if not found

getNextItem(self, por=None, wrap=False, only_visible=False)

source code 

Gets the POR of the next item in the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
  • wrap (boolean) - Consider a next item outside this accessible if there is no next item in this accessible? Defaults to False.
  • only_visible (boolean) - Only consider visible items? Defaults to False.
Returns: POR
Point of regard to the previous item or None if not found

getCurrItem(self, por=None)

source code 

Gets the POR of the start of the item. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
Returns: POR
Point of regard to the first character in the item or None if not found

getPrevItem(self, por=None, wrap=False, only_visible=False)

source code 

Gets the POR of the previous item in the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
  • wrap (boolean) - Consider a previous item outside this accessible if there is no previous item in this accessible? Defaults to False.
  • only_visible (boolean) - Only consider visible items? Defaults to False.
Returns: POR
Point of regard to the previous item or None if not found

getNextWord(self, por=None)

source code 

Get the POR of the next word in the item indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
Returns: POR
Point of regard to the next word or None if not found

getCurrWord(self, por=None)

source code 

Get the POR of the current word in the item indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
Returns: POR
Point of regard to the start of the current word or None if not found

getPrevWord(self, por=None)

source code 

Get the POR of the previous word in the item indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the previous word or None if not found

getLastWord(self, por=None)

source code 

Get the POR of the current word in the item indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
Returns: POR
Point of regard to the start of the last word or None if not found

getNextChar(self, por=None)

source code 

Get the POR of the next character in the item indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the next character or None if not found

getPrevChar(self, por=None)

source code 

Get the POR of the previous character in the item indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the previous character or None if not found

getLastChar(self, por=None)

source code 

Get the POR of the last character in the item indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the last character or None if not found

getNextRow(self, por=None)

source code 

Get the POR of the first column of the next row relative to the row containing the item indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the start of the next row or None if not found

getCurrRow(self, por=None)

source code 

Gets the POR to the cell in the first column of the row containing the item indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the first column of the given row

getPrevRow(self, por=None)

source code 

Get the POR of the first column of the previous row relative to the row containing the item indicated by the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the start of the previous row or None if not found

iterNextAccs(self, por=None)

source code 

Builds an iterator over the accessibles next to the current POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the previous accessible

iterPrevAccs(self, por=None)

source code 

Builds an iterator over the accessibles previous to the current POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the previous accessible

iterNextItems(self, por=None, wrap=False, only_visible=False)

source code 

Builds an iterator over the items next to the current POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
  • wrap (boolean) - Consider a next item outside this accessible if there is no next item in this accessible? Defaults to False.
  • only_visible (boolean) - Only consider visible items? Defaults to False.
Returns: POR
Point of regard to the next item

iterPrevItems(self, por=None, wrap=False, only_visible=False)

source code 

Builds an iterator over the items previous to the current POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
  • wrap (boolean) - Consider a previous item outside this accessible if there is no previous item in this accessible? Defaults to False.
  • only_visible (boolean) - Only consider visible items? Defaults to False.
Returns: POR
Point of regard to the previous item

getChildAcc(self, index, por=None)

source code 

Gets the child accessible at the given index from the POR. When no POR is provided, the task_por is used.

Parameters:
  • index (integer) - Child index to retrieve
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the child at the index or None if it does not exist

getParentAcc(self, por=None)

source code 

Gets the POR of the first character and first item of the parent of the provided POR. When no POR is provided, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard for the parent

iterAncestorAccs(self, por=None, only_visible=False, allow_trivial=False)

source code 

Builds an iterator over the ancestors of the current POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
  • only_visible (boolean) - Yield on visible PORs only?
  • allow_trivial (boolean) - Yield on trivial PORs too?
Returns: POR
Point of regard to an ancestor

getViewRootAcc(self)

source code 

Gets a POR indicating the root of the active view. This is more efficient than getRootAcc when the root of the active view is needed.

Returns: POR
A point of regard to the root accessible

getRootAcc(self, por=None)

source code 

Gets a POR to the top level container of the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
A point of regard to the root accessible
Raises:

getEndAcc(self, por=None)

source code 

Gets a POR to the last item of the last accessible under the root of the view. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
A point of regard to the last accessible under the root POR
Raises:

getLastAccUnder(self, por=None)

source code 

Gets a POR to the last item of the last accessible under the given root. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: POR
A point of regard to the last accessible under the given POR
Raises:

getAccFromPath(self, por=None, *path)

source code 

Gets a POR representing the accessible found by treating the path integers as descendant indices stating at the given POR. When no POR is provided, the task_por is used as the starting point.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
  • path (integer) - Integers indicate the path to the desired object
Returns: POR
Point of regard for the descendant at the specified path

compareAncestorRoles(self, por=None, *roles)

source code 

Iterates through the given roles comparing them with the roles of the first len(roles) ancestors of the given POR starting with the immediate parent. When no POR is provided, the task_por is used as the starting point.

Parameters:
  • por (POR) - A point of regard; uses the current task's POR if none supplied
  • roles (string) - Role names to use as a comparison
Returns: boolean
Did the given roles match the roles of the corresponding ancestors?

findAccByName(self, name, por=None, ancestor=False, depth_first=True)

source code 

Gets a POR to the first accessible descendant or ancestor of the given POR with the given name.

Parameters:
  • name (string) - Name of the accessible to locate
  • por (POR) - A point of regard; uses the current task's POR if none supplied
  • ancestor (boolean) - Search through ancestors (True) or descendants (False)?
  • depth_first (boolean) - Is the search depth-first (True) or breadth-first (False)? Only meaningful when ancestor is False.
Returns: POR
Point of regard to the target if found or None if not

findAccByRole(self, role, por=None, ancestor=False, depth_first=True)

source code 

Gets a POR to the first accessible descendant or ancestor of the given POR with the given role.

Parameters:
  • role (string) - Role of the accessible to locate
  • por (POR) - A point of regard; uses the current task's POR if none supplied
  • ancestor (boolean) - Search through ancestors (True) or descendants (False)?
  • depth_first (boolean) - Is the search depth-first (True) or breadth-first (False)? Only meaningful when ancestor is False.
Returns: POR
Point of regard to the target if found or None if not

findAccByObjId(self, objname, por=None, ancestor=False, depth_first=True)

source code 

Gets a POR to the first accessible descendant or ancestor of the given POR with the given 'id' attribute named objname.

Parameters:
  • objname (string) - Object id name to search
  • por (POR) - A point of regard; uses the current task's POR if none supplied
  • ancestor (boolean) - Search through ancestors (True) or descendants (False)?
  • depth_first (boolean) - Is the search depth-first (True) or breadth-first (False)? Only meaningful when ancestor is False.
Returns: POR
Point of regard to the target if found or None if not

findAccByPredicate(self, predicate, por=None, ancestor=False, depth_first=True)

source code 

Gets a POR to the first accessible descendant or ancestor of the given POR matching the given callable predicate.

Parameters:
  • predicate (callable) - Search predicate that evaluates to True or False
  • por (POR) - A point of regard; use the current task's POR if none supplied
  • ancestor (boolean) - Search through ancestors (True) or descendants (False)?
  • depth_first (boolean) - Is the search depth-first (True) or breadth-first (False)? Only meaningful when ancestor is False.
Returns: POR
Point of regard to the target if found or None if not

Warning: This method should be considered unstable and likely to change in future versions of LSR

moveToPOR(self, por)

source code 

Moves the task_por to the given POR. Just a convenience method. A Perk writer can set self.task_por = x if that is preferred. One advantage of using this method is that it will check if por is None and raise an error if so.

Raises:

moveToEnd(self)

source code 

Modifies the task_por to the beginning of the last item in the current view.

Raises:

getAccTextAttr(self, name, por=None)

source code 

Gets the value of the given attribute of an accessible of a given POR. When por is None, the task_por is used.

Valid attribute names/value pairs include: (subject to change, GNOME ATK specification):

left-margin: The pixel width of the left margin right-margin: The pixel width of the right margin indent: The number of pixels that the text is indented invisible: Either "true" or "false" indicates whether text is visible or not editable: Either "true" or "false" indicates whether text is editable or not pixels-above-lines: Pixels of blank space to leave above each newline-terminated line. pixels-below-lines: Pixels of blank space to leave below each newline-terminated line. pixels-inside-wrap: Pixels of blank space to leave between wrapped lines inside the same newline-terminated line (paragraph). bg-full-height: "true" or "false" whether to make the background color for each character the height of the highest font used on the current line, or the height of the font used for the current character. rise: Number of pixels that the characters are risen above the baseline underline: "none", "single", "double" or "low" strikethrough: "true" or "false" whether the text is strikethrough size: The size of the characters. scale: The scale of the characters: a string representation of a double. weight: The weight of the characters. language: The language used family-name: The font family name bg-color: The background color: RGB value of the format "u,u,u" fg-color: The foreground color: RGB value of the format "u,u,u" bg-stipple: "true" if a GdkBitmap is set for stippling the background color. fg-stipple: "true" if a GdkBitmap is set for stippling the foreground color. wrap-mode: The wrap mode of the text, if any: "none", "char" or "word" direction: The direction of the text, if set: "none", "ltr" or "rtl" justification: The justification of the text, if set: "left", "right", "center" or "fill" stretch: The stretch of the text, if set: "ultra_condensed", "extra_condensed", "condensed", "semi_condensed", "normal", "semi_expanded", "expanded", "extra_expanded" or "ultra_expanded" variant: The capitalization of the text, if set: "normal" or "small_caps" style: The slant style of the text, if set: "normal", "oblique" or "italic" last-defined: not a valid text attribute, for finding end of enumeration

Parameters:
  • name (string) - text attribute name, eg. "fg-color", "justification"
  • por (POR) - A point of regard; uses the current task's POR if none supplied
Returns: string
value of attribute
Raises:

getAccAllTextAttrs(self, por=None)

source code 

Like getAccTextAttr, but gets the values of all of the current attributes of an accessible of a given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - A point of regard; use the current task's POR if none supplied
Returns: dictionary
Name/value pairs for all available attributes
Raises:

See Also: getAccTextAttr

getStartOfHardLine(self, por=None)

source code 

From a given POR, get the POR of the start of the first line that follows the previous hard line break, or the start of the first line if it is the first line in the accessible. When por is None, the task_por is used.

Parameters:
  • por (POR) - Point of regard; uses the current task's POR if none supplied
Returns: POR
Point of regard to the previous character or None if not found
Raises:

getEndOfHardLine(self, por=None)

source code 

From a given POR, get the POR of the end of the first following line that ends with a hard line break, or the end of the last line if it is the last line in the accessible. When por is None, the task_por is used.

Parameters:
  • por (POR) - Point of regard; use the current task's POR if none supplied
Returns: POR
Point of regard to the previous character or None if not found
Raises:

getAccTextBetween(self, start_por=None, end_por=None, only_visible=False)

source code 

Gets all text between two point of regards. If start_por is not specified, defaults to using the current task_por. If end_por is not given, defaults to getting all text to the end of the current accessible.

Parameters:
  • start_por (POR) - A point of regard indicating the start of the text range; uses the current task's POR if none supplied
  • end_por (POR) - A point of regard indicating the end of the text range; use the POR to the end of the accessible if none supplied
  • only_visible (boolean) - Only consider visible items? Defaults to False.
Returns: string
Text between the two PORs
Raises:

setAccText(self, text, por=None)

source code 

Sets the given string as the text at the given POR. All existing text is replaced. When por is None, the task_por is used.

Parameters:
  • text (string) - Text to set
  • por (POR) - Point of regard; use the current task's POR if none supplied
Returns: boolean
Is setting the text supported?
Raises:

insertAccText(self, text, por=None, attrs=None)

source code 

Inserts the given text at the given POR. When por is None, the task_por is used. If attributes are specified, they will be applied to the inserted text.

Parameters:
  • text (string) - Text to set
  • por (POR) - Point of regard; use the current task's POR if none supplied
  • attrs (dictionary) - Attributes to set over the text range
Returns: boolean
Is inserting text supported?
Raises:

setAccTextAttrs(self, start=None, end=None, **attrs)

source code 

Sets the attributes of the text from the given starting POR to the ending POR. When start or end is None, the task_por is used for either one or both missing value(s).

Parameters:
  • attrs (dictionary) - Attributes to set over the text range
  • start (POR) - Point of regard to the start of the text run; use the current task's POR if none supplied
  • end (POR) - Point of regard to the end of the text run; use the current task's POR if none supplied
Returns: boolean
Is setting attributes supported?
Raises:

See Also: getAccTextAttr

copyAccText(self, start=None, end=None)

source code 

Copies the text from the given starting POR to the ending POR. When start or end is None, the task_por is used for either one or both missing value(s).

Parameters:
  • start (POR) - Point of regard to the start of the text run; use the current task's POR if none supplied
  • end (POR) - Point of regard to the end of the text run; use the current task's POR if none supplied
Returns: boolean
Is copy supported?
Raises:

cutAccText(self, start=None, end=None)

source code 

Cuts the text from the given starting POR to the ending POR. When start or end is None, the task_por is used for either one or both missing value(s).

Parameters:
  • start (POR) - Point of regard to the start of the text run; use the current task's POR if none supplied
  • end (POR) - Point of regard to the end of the text run; use the current task's POR if none supplied
Returns: boolean
Is cut supported?
Raises:

deleteAccText(self, start=None, end=None)

source code 

Deletes the text from the given starting POR to the ending POR. When start or end is None, the task_por is used for either one or both missing value(s).

Parameters:
  • start (POR) - Point of regard to the start of the text run; use the current task's POR if none supplied
  • end (POR) - Point of regard to the end of the text run; use the current task's POR if none supplied
Returns: boolean
Is delete supported?
Raises:

pasteAccText(self, por=None)

source code 

Pastes the clipboard text at the given POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - Point of regard to the insertion point; use the current task's POR if none supplied
Returns: boolean
Is paste supported?
Raises:

getPointerPOR(self)

source code 

Gets the pointer POR for this Tier.

Returns: POR
Point of regard stored programmatically by this Tier

setPointerPOR(self, por=None)

source code 

Sets the pointer POR for this Tier. When por is None, the task_por is used.

Parameters:
  • por (POR) - Point of regard to set as the pointer

getAccTextLength(self, por=None)

source code 

Gets the length of the text in the POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - Point of regard to an object containing text
Returns: integer
Number of characters in the text or None when character count not supported
Raises:

getAccTextSelectionCount(self, por=None)

source code 

Gets the number of discontiguous text selections in the POR. When por is None, the task_por is used.

Parameters:
  • por (POR) - Point of regard to an object containing text
Returns: integer
Number of selections or None when selections are not supported
Raises:

selectAccText(self, n=None, start=None, end=None)

source code 

Selects the text from the given starting POR to the ending POR. If n is None, a new selection range is added, else the nth selection is modified to the given range. When start or end is None, the task_por is used for either one or both missing value(s).

Parameters:
  • start (POR) - Point of regard to the start of the text run; use the current task's POR if none supplied
  • end (POR) - Point of regard to the end of the text run; use the current task's POR if none supplied
Returns: boolean
Is text selection supported?
Raises:

deselectAccText(self, n=None, por=None)

source code 

Deselects the text from the given starting POR to the ending POR. If n is None, all selected ranges are removed, else the nth selection is removed. When por is None, the task_por is used.

Parameters:
  • por (POR) - Point of regard to the text area; use the current task's POR if none supplied
Returns: boolean
Is text deselection supported?
Raises:

getLastKey(self)

source code 

Gets the key code, key sym, and modifiers of the last key pressed when this Tier was active. This information should not be used to trigger events, but rather as additional information for correcting accessibility problems in certain applications where the standard accessibility events do not provide enough information.

Returns: 3-tuple of integer, string, integer
Key code, key sym, and key modifier bit mask

Note: The values returned by this event are platform specific. This may change in the future. Are you sure you don't want to use a Task.InputTask?

mouseEventPOR(self, event, por=None)

source code 

Triggers a mouse event at the center of the given point of regard.

Parameters:
  • event (string) - Mouse event, one of EVENT_SYNTHMOUSE_* in AEConstants
Returns: boolean
Is the action supported?
Raises:

leftClickPOR(self, por=None)

source code 

Performs a mouse left click on the center of a given point of regard.

Parameters:
  • por (POR) - Point of regard; use the current task's POR if none supplied
Returns: boolean
Did the click succeed?
Raises:

inhibitAutoPointer(self)

source code 

Stops the task_por from being stored as the Tier pointer POR for this event only. Useful when a focus layer event carries a POR that would become the pointer, but shouldn't for some reason.

getAccSetSize(self, por=None)

source code 

Get the number of members within an accessible group. Often used to determine the size of a radio or menu group.

Parameters:
  • por (POR) - Point of regard; use the current task's POR if none supplied
Returns: integer
Set/group size.

getAccPosInSet(self, por=None)

source code 

Get the position of an accessible within a group.

Parameters:
  • por (POR) - Point of regard; use the current task's POR if none supplied
Returns: integer
Position within a group.

getAccURI(self, index, por=None)

source code 

Obtain a resource locator ('URI') string which can be used to access the content to which this link "points" or is connected.

Parameters:
  • index (integer) - anchor index
  • por (POR) - Point of regard; use the current task's POR if none supplied
Returns: string
URI string
Raises:

getAccAnchorCount(self, por=None)

source code 

Obtain he number of separate anchors associated with this accessible.

Parameters:
  • por (POR) - Point of regard; use the current task's POR if none supplied
Returns: integer
Number of anchors
Raises:

Class Variable Details [hide private]

_state_descriptions

Mapping from state name/value pairs to localized string
Type:
dictionary of 2-tuple, string pairs
Value:
{('checked', False): _('unchecked'), ('enabled', False): _('disabled')\
, ('collapsed', False): _('expanded'), ('expanded', False): _('collaps\
ed'), ('animated', False): _('not animated'), ('checked', True): _('ch\
ecked'), ('unchecked', True): _('unchecked'), ('collapsed', True): _('\
collapsed'), ('expanded', True): _('expanded'), ('animated', True): _(\
'animated'), ('disabled', True): _('disabled'),}