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

Class TextNavAdapter

source code

??-235 --+
         |
        TextNavAdapter

Overrides DefaultNavAdapter to provide navigation over text lines as items and to avoid traversing text children as separate accessible children in the IAccessibleNav interface.

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]
2-tuple of integer
_getVisibleItemExtents(self, only_visible)
Gets the item offsets of the first and last items in a text control.
source code
POR
getNextItem(self, only_visible=True)
Gets the next item relative to the one indicated by the POR providing this interface.
source code
POR
getPrevItem(self, only_visible=True)
Gets the previous item relative to the one indicated by the POR providing this interface.
source code
POR
getFirstItem(self, only_visible=True)
Gets the first item relative to the one indicated by the POR providing this interface.
source code
POR
getLastItem(self, only_visible=True)
Gets the last item relative to the one indicated by the POR providing this interface.
source code
 
getFirstAccChild(self)
Always raises LookupError.
source code
 
getLastAccChild(self)
Always raises LookupError.
source code
 
getChildAcc(self, index)
Always raises LookupError.
source code
Static Methods [hide private]
boolean
when(subject)
Tests if the given subject can be adapted by this class.
source code
Class Variables [hide private]
  provides = [IItemNav, IAccessibleNav]
Method Details [hide private]

when(subject)
Static Method

source code 

Tests if the given subject can be adapted by this class.

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

_getVisibleItemExtents(self, only_visible)

source code 

Gets the item offsets of the first and last items in a text control.

Parameters:
  • only_visible (boolean) - Only consider the first and last characters visible in the text box (True) or the absolute first and last characters (False)?
Returns: 2-tuple of integer
First and last item offsets
Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • LookupError - When the accessible does not implement IComponent

getNextItem(self, only_visible=True)

source code 

Gets the next item relative to the one indicated by the POR providing this interface.

Parameters:
  • only_visible (boolean) - True when Item in the returned POR must be visible
Returns: POR
Point of regard for the beginning of the next item in the same accessible
Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • IndexError - When there is no next item
  • LookupError - When lookup for the next item fails even though it may exist

getPrevItem(self, only_visible=True)

source code 

Gets the previous item relative to the one indicated by the POR providing this interface.

Parameters:
  • only_visible (boolean) - True when Item in the returned POR must be visible
Returns: POR
Point of regard for the beginning of the previous item in the same accessible
Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • IndexError - When there is no previous item
  • LookupError - When lookup for the previous item fails even though it may exist

getFirstItem(self, only_visible=True)

source code 

Gets the first item relative to the one indicated by the POR providing this interface.

Parameters:
  • only_visible (boolean) - True when Item in the returned POR must be visible
Returns: POR
Point of regard for the beginning of the first item in the same accessible
Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • LookupError - When lookup for the last item fails even though it may exist

getLastItem(self, only_visible=True)

source code 

Gets the last item relative to the one indicated by the POR providing this interface.

Parameters:
  • only_visible (boolean) - True when Item in the returned POR must be visible
Returns: POR
Point of regard for the beginning of the last item in the same accessible
Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • LookupError - When lookup for the last item fails even though it may exist

getFirstAccChild(self)

source code 

Always raises LookupError. Children are exposed through their parent.

Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • LookupError - Always

getLastAccChild(self)

source code 

Always raises LookupError. Children are exposed through their parent.

Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • LookupError - Always

getChildAcc(self, index)

source code 

Always raises LookupError. Children are exposed through their parent.

Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • LookupError - Always