Package Adapters :: Package ATSPI :: Module TextAdapter :: Class TextAccInfoAdapter
[hide private]
[frames] | no frames]

Class TextAccInfoAdapter

source code

               object --+            
                        |            
         AccAdapt.Adapter --+        
                            |        
          AccAdapt.PORAdapter --+    
                                |    
DefaultInfo.DefaultAccInfoAdapter --+
                                    |
                                   TextAccInfoAdapter

Overrides DefaultAccInfoAdapter to provide information about lines of text as items. Expects the subject to be a POR.

Adapts accessibles that have a role of terminal or have a state of multiline, single line, or editable and provide the Text interface. Does not adapt POR accessibles with role of page tab.

Instance Methods [hide private]
string
getAccItemText(self)
Gets the accessible text of the subject if item_offset is None and if that text is not an empty string.
source code
2-tuple of integer
getAccVisualExtents(self)
Gets the visual width and height of a character or the entire text area if item offset is None.
source code
2-tuple of integer
getAccVisualPoint(self)
Gets the center of a character or the entire text area if item offset is None.
source code

Inherited from DefaultInfo.DefaultAccInfoAdapter: allowsAccEmbeds, getAccActionCount, getAccActionDescs, getAccActionKeys, getAccActionNames, getAccAllTextAttrs, getAccAnchorCount, getAccAppID, getAccAppLocale, getAccAppName, getAccAttrs, getAccCaret, getAccChildCount, getAccColumn, getAccColumnHeader, getAccDefTextAttrs, getAccDescription, getAccFloatValue, getAccFloatValueExtents, getAccIndex, getAccLevel, getAccName, getAccPosition, getAccRelations, getAccRole, getAccRoleName, getAccRow, getAccRowColIndex, getAccRowHeader, getAccSelection, getAccStates, getAccTableExtents, getAccText, getAccTextAttr, getAccTextCharCount, getAccTextSelection, getAccTextSelectionCount, getAccURI, hasAccAllStates, hasAccOneRole, hasAccOneState, hasAccRole, hasAccState, isAccEmbedded, isAccTopLevelWindow, isAccTrivial, isAccVisible

Inherited from AccAdapt.PORAdapter: __call__, __init__

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

Static Methods [hide private]
boolean
when(subject)
Condition under which this adapter is applicable to the given subject.
source code
Class Variables [hide private]
list of Interface provides = [IAccessibleInfo]
Interfaces provided by this adapter

Inherited from DefaultInfo.DefaultAccInfoAdapter: TRIVIAL_ROLES, TRIVIAL_STATES, VISIBLE_STATES

Inherited from AccAdapt.Adapter: singleton

Instance Variables [hide private]

Inherited from AccAdapt.PORAdapter: accessible, char_offset, item_offset

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

when(subject)
Static Method

source code 
Condition under which this adapter is applicable to the given subject. The condition can either be a staticmethod callable that results in a boolean value or a string that will be evaluated as a boolean Python expression in the namespace in which it is defined. This implies any variables in the global namespace of the Adapter subclass can be used in the when clause. String conditions are only evaluated once at startup rather than on each call. If the condition is None, the Adapter is considered a default.
Parameters:
  • subject (POR) - POR containing an accessible to test
Returns: boolean
True when the subject meets the condition named in the docstring for this class, False otherwise
Overrides: when

getAccItemText(self)

source code 

Gets the accessible text of the subject if item_offset is None and if that text is not an empty string. If it is empty, gets the accessible name. If item_offset is specified, gets that line of text.

Returns: string
Accessible text of requested object
Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • LookupError - When the subject accessible is dead
  • IndexError - When the item offset is outside the bounds of the number of lines of text in the subject accessible
Overrides: DefaultInfo.DefaultAccInfoAdapter.getAccItemText

getAccVisualExtents(self)

source code 

Gets the visual width and height of a character or the entire text area if item offset is None.

Returns: 2-tuple of integer
Width and height extents
Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • LookupError - When the accessible object is dead
Overrides: DefaultInfo.DefaultAccInfoAdapter.getAccVisualExtents

getAccVisualPoint(self)

source code 

Gets the center of a character or the entire text area if item offset is None.

Returns: 2-tuple of integer
x,y coordinates
Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • LookupError - When the accessible object is dead
Overrides: DefaultInfo.DefaultAccInfoAdapter.getAccVisualPoint