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

Class HypertextEventHandlerAdapter

source code

??-190 --+
         |
        HypertextEventHandlerAdapter

Overrides DefaultEventHandlerAdapter to create proper PORs for hypertext objects having embed characters. Expects the subject to be a raw pyLinAcc.Accessible.

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

Instance Methods [hide private]
tuple of AEEvent
_handleFocusEvent(self, event, **kwargs)
Creates an AEEvent.FocusChange indicating that the accessible being adapted has gained the focus.
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 = [IEventHandler]
Method Details [hide private]

when(subject)
Static Method

source code 

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

Parameters:
  • subject (pyLinAcc.Accessible) - Accessible to test
Returns: boolean
True when the subject meets the condition named in the docstring for this class, False otherwise

_handleFocusEvent(self, event, **kwargs)

source code 

Creates an AEEvent.FocusChange indicating that the accessible being adapted has gained the focus. Corrects the POR for the focus to account for the case where the hypertext object receiving the focus has an embed character at the first position in its text such that the embedded object should probably be the target of the first selector event instead.

Parameters:
Returns: tuple of AEEvent
AEEvent.FocusChange and AEEvent.SelectorChange