Package Adapters :: Package ATSPI :: Module ListAdapter :: Class ListEventHandlerAdapter
[hide private]
[frames] | no frames]

Class ListEventHandlerAdapter

source code

                                object --+        
                                         |        
                          AccAdapt.Adapter --+    
                                             |    
DefaultEventHandler.DefaultEventHandlerAdapter --+
                                                 |
                                                ListEventHandlerAdapter

Overrides DefaultEventHandlerAdapter to fire AEEvent.FocusChange events on focus changes for list controls. Also, fires a AEEvent.SelectorChange event for the first selected list item one is present. Expects the subject to be a pyLinAcc.Accessible.

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

Inherited from DefaultEventHandler.DefaultEventHandlerAdapter: getAEEvents, getAEViewEvents, getRawEvents

Inherited from AccAdapt.Adapter: __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 = [IEventHandler]
Interfaces provided by this adapter

Inherited from DefaultEventHandler.DefaultEventHandlerAdapter: last_focus, singleton

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 (pyLinAcc.Accessible) - Accessible to test
Returns: boolean
True when the subject meets the condition named in the docstring for this class, False otherwise
Overrides: when

_handleFocusEvent(self, event, **kwargs)

source code 

Creates an AEEvent.FocusChange indicating that the accessible being adapted has gained the focus. Also, creates a AEEvent.SelectorChange for the first selected item.

Parameters:
Returns: tuple of AEEvent
AEEvent.FocusChange and AEEvent.CaretChange
Overrides: DefaultEventHandler.DefaultEventHandlerAdapter._handleFocusEvent