Package AccessEngine :: Package AEAccAdapters :: Package ATSPI :: Module DefaultNav :: Class DefaultNavAdapter
[hide private]
[frames] | no frames]

Class DefaultNavAdapter

source code

               object --+        
                        |        
AEAccAdapter.AEAccAdapter --+    
                            |    
      AEAccAdapter.PORAdapter --+
                                |
                               DefaultNavAdapter

Adapts all AT-SPI accessibles to the IAccessibleNav and IItemNav interfaces. No condition for adaptation is given implying that this adapter is used as a default by AEAccAdapter when no better adapter is available. Expects the subject to be a AEPor.

Instance Methods [hide private]
AEPor
getNextItem(self, only_visible=True)
Always raises IndexError as this default adapter assumes the subject has only one item.
source code
AEPor
getPrevItem(self, only_visible=True)
Always raises IndexError as this default adapter assumes the subject has only one item.
source code
AEPor
getFirstItem(self, only_visible=True)
Gets a AEPor pointing to the first item in the subject AEPor.
source code
AEPor
getLastItem(self, only_visible=True)
Gets a AEPor pointing to the first item in the subject AEPor since it is assumed to be the only item in this default adapter.
source code
AEPor
getAccAsItem(self, por)
Always raises IndexError as this default adapter assumes the subject has only one item.
source code
AEPor
getNextAcc(self)
Gets the next peer accessible object if possible and if it exists.
source code
AEPor
getPrevAcc(self)
Gets the previous peer accessible object if possible and if it exists.
source code
AEPor
getParentAcc(self)
Gets the parent accessible object if possible and if it exists.
source code
AEPor
getFirstAccChild(self)
Gets the first accessible child relative to the subject accessible.
source code
AEPor
getLastAccChild(self)
Gets the last accessible child relative to the subject accessible.
source code
AEPor
getChildAcc(self, index)
Gets the child accessible at the given index relative to the one providing this interface.
source code
AEPor
findDescendantAcc(self, predicate, depth_first)
Searches all descendants for one matching the given predicate.
source code
AEPor
findAncestorAcc(self, predicate)
Searches all ancestors for one matching the given predicate.
source code
AEPor
getApplicationAcc(self)
Return the AEPor to the root accessible of the current application.
source code

Inherited from AEAccAdapter.PORAdapter: __call__, __init__

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

Class Variables [hide private]
list of Interface provides = [IAccessibleNav, IItemNav]
Interfaces provided by this adapter

Inherited from AEAccAdapter.AEAccAdapter: singleton, when

Instance Variables [hide private]

Inherited from AEAccAdapter.PORAdapter: accessible, char_offset, item_offset, subject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getNextItem(self, only_visible=True)

source code 
Always raises IndexError as this default adapter assumes the subject has only one item.
Parameters:
  • only_visible (boolean) - True when Item in the returned AEPor must be visible
Returns: AEPor
Point of regard to the next item in the same accessible
Raises:
  • IndexError - When there is no next item

getPrevItem(self, only_visible=True)

source code 
Always raises IndexError as this default adapter assumes the subject has only one item.
Parameters:
  • only_visible (boolean) - True when Item in the returned AEPor must be visible
Returns: AEPor
Point of regard to the previous item in the same accessible
Raises:
  • IndexError - When there is no previous item

getFirstItem(self, only_visible=True)

source code 
Gets a AEPor pointing to the first item in the subject AEPor. Ignores the only visible flag.
Parameters:
  • only_visible (boolean) - True when Item in the returned AEPor must be visible
Returns: AEPor
Point of regard to the first item in the same accessible
Raises:
  • IndexError - When there is no first item

getLastItem(self, only_visible=True)

source code 
Gets a AEPor pointing to the first item in the subject AEPor since it is assumed to be the only item in this default adapter. Ignores the only visible flag.
Parameters:
  • only_visible (boolean) - True when Item in the returned AEPor must be visible
Returns: AEPor
Point of regard to the last item in the same accessible
Raises:
  • IndexError - When there is no last item

getAccAsItem(self, por)

source code 
Always raises IndexError as this default adapter assumes the subject has only one item.
Parameters:
  • por (AEPor) - Point of regard to a child of the subject
Returns: AEPor
Point of regard to an item of the subject
Raises:
  • IndexError - When there is no next item

getNextAcc(self)

source code 
Gets the next peer accessible object if possible and if it exists.
Returns: AEPor
Point of regard to the next accessible, or None if there is no next peer
Raises:
  • IndexError - When there is no next accessible
  • LookupError - When lookup for the next accessible fails even though it may exist

getPrevAcc(self)

source code 
Gets the previous peer accessible object if possible and if it exists.
Returns: AEPor
Point of regard to the previous accessible
Raises:
  • IndexError - When there is no previous accessible
  • LookupError - When lookup for the previous accessible fails even though it may exist

getParentAcc(self)

source code 
Gets the parent accessible object if possible and if it exists.
Returns: AEPor
Point of regard to the parent accessible
Raises:
  • LookupError - When lookup for the parent accessible fails because it does not exist

getFirstAccChild(self)

source code 
Gets the first accessible child relative to the subject accessible.
Returns: AEPor
Point of regard to the first child accessible
Raises:
  • LookupError - When lookup for child fails because it does not exist

getLastAccChild(self)

source code 
Gets the last accessible child relative to the subject accessible.
Returns: AEPor
Point of regard to the last child accessible
Raises:
  • LookupError - When lookup for child fails because it does not exist

getChildAcc(self, index)

source code 
Gets the child accessible at the given index relative to the one providing this interface.
Parameters:
  • index (integer) - Index of the child to retrieve
Returns: AEPor
Point of regard to the child accessible
Raises:
  • IndexError - When there is no child at the given index
  • LookupError - When the lookup for the child fails even though it may exist

findDescendantAcc(self, predicate, depth_first)

source code 
Searches all descendants for one matching the given predicate.
Parameters:
  • predicate (callable) - Search predicate
  • depth_first (boolean) - Perform the search in depth-first (True) or breadth first (False) order?
Returns: AEPor
Point of regard to the target or None if not found
Raises:
  • LookupError - When the lookup fails during the search

Warning: The predicate is currently supplied with accessibles, not PORs. This behavior will likely change in the future.

findAncestorAcc(self, predicate)

source code 
Searches all ancestors for one matching the given predicate.
Parameters:
  • predicate (callable) - Search predicate
Returns: AEPor
Point of regard to the target or None if not found
Raises:
  • LookupError - When the lookup fails during the search

Warning: The predicate is currently supplied with accessibles, not PORs. This behavior will likely change in the future.