Package Adapters :: Package ATSPI :: Module HypertextAdapter :: Class HypertextNavAdapter
[hide private]
[frames] | no frames]

Class HypertextNavAdapter

source code

??-192 --+
         |
        HypertextNavAdapter

Overrides DefaultNavAdapter to provide navigation over hypertext embedded objects as items and children. Expects the subject to be a POR.

Adapts subject accessibles that provide the pyLinAcc.Interfaces.IHypertext and pyLinAcc.Interfaces.IText interfaces.

Instance Methods [hide private]
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
getLastItem(self, only_visible=True)
Gets the last 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
getAccAsItem(self, por)
Converts the POR to a child accessible to an equivalent POR to an item of the subject.
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 = [IAccessibleNav, IItemNav]
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

getNextItem(self, only_visible=True)

source code 

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

Currently ignores only_visible.

Parameters:
  • only_visible (boolean) - True when Item in the returned POR must be visible
Returns: POR
Point of regard to 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.

Currently ignores only_visible.

Parameters:
  • only_visible (boolean) - True when Item in the returned POR must be visible
Returns: POR
Point of regard to 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

getLastItem(self, only_visible=True)

source code 

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

Currently ignores only_visible.

Parameters:
  • only_visible (boolean) - True when Item in the returned POR must be visible
Returns: POR
Point of regard to the last item in the same accessible
Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • LookupError - When lookup for the last 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.

Currently ignores only_visible.

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

getAccAsItem(self, por)

source code 

Converts the POR to a child accessible to an equivalent POR to an item of the subject.

Parameters:
  • por (POR) - Point of regard to a child of the subject
Returns: POR
Point of regard to an item of the subject
Decorators:
  • @pyLinAcc.errorToLookupError
Raises:
  • LookupError - When lookup for the offset fails
  • IndexError - When the offset of the child is invalid as an item index

getFirstAccChild(self)

source code 

Always raises LookupError. Hypertext has no children per se, only embeds.

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

getLastAccChild(self)

source code 

Always raises LookupError. Hypertext has no children per se, only embeds.

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

getChildAcc(self, index)

source code 

Always raises LookupError. Hypertext has no children per se, only embeds.

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