Package Adapters :: Package ATSPI :: Module ComboboxAdapter :: Class ComboboxEventHandlerAdapter
[hide private]
[frames] | no frames]

Class ComboboxEventHandlerAdapter

source code

                                object --+                
                                         |                
                          AccAdapt.Adapter --+            
                                             |            
DefaultEventHandler.DefaultEventHandlerAdapter --+        
                                                 |        
         TextAdapter.SimpleTextEventHandlerAdapter --+    
                                                     |    
                   TextAdapter.TextEventHandlerAdapter --+
                                                         |
                                                        ComboboxEventHandlerAdapter

Overrides TextEventHandlerAdapter to enable processing of events from text areas within combo boxes where the combo box gets focus, the text area doesn't, and the text area is the source of all text events. Fires a AEEvent.FocusChange and either a AEEvent.CaretChange or AEEvent.SelectorChange on focus. Expects the subject to be a pyLinAcc.Accessible.

Adapts subject accessibles that have a role of combo box or whose parent have have a role of combo box.

Instance Methods [hide private]
2-tuple of pyLinAcc.Accessible
_getTextArea(self)
Looks for a widgets supporting the text interface within the combo box.
source code
boolean
_isFocused(self)
Gets if the subject or its parent is focused.
source code
tuple of AEEvent
_handleFocusEvent(self, event, **kwargs)
Creates an AEEvent.FocusChange indicating that the accessible being adapted has gained the focus.
source code
tuple of AEEvent
_handleTextEvent(self, event, focused, **kwargs)
Called when text is inserted or deleted (object:text-changed:insert & object:text-changed:delete).
source code
tuple of AEEvent
_handleCaretEvent(self, event, focused, **kwargs)
Creates and returns an AEEvent.CaretChange indicating the caret moved in the subject accessible.
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)
Tests if the given subject can be adapted by this class.
source code
Class Variables [hide private]
  provides = [IEventHandler]

Inherited from DefaultEventHandler.DefaultEventHandlerAdapter: last_focus, singleton

Properties [hide private]

Inherited from object: __class__

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
Overrides: TextAdapter.TextEventHandlerAdapter.when

_getTextArea(self)

source code 

Looks for a widgets supporting the text interface within the combo box.

Returns: 2-tuple of pyLinAcc.Accessible
The accessible that provides the text interface and the accessible already queried to that interface

_isFocused(self)

source code 

Gets if the subject or its parent is focused.

Returns: boolean
Does the subject or its parent have focus?

_handleFocusEvent(self, event, **kwargs)

source code 

Creates an AEEvent.FocusChange indicating that the accessible being adapted has gained the focus. Also a AEEvent.CaretChange. This sequence of AEEvents will be posted by the caller.

Parameters:
Returns: tuple of AEEvent
AEEvent.FocusChange and AEEvent.CaretChange
Overrides: TextAdapter.TextEventHandlerAdapter._handleFocusEvent

_handleTextEvent(self, event, focused, **kwargs)

source code 

Called when text is inserted or deleted (object:text-changed:insert & object:text-changed:delete). Creates and returns an AEEvent.CaretChange to indicate a change in the caret context.

pyLinAcc.Event.Event.type.minor is "insert" or "delete". pyLinAcc.Event.Event.detail1 has start offset of text change. pyLinAcc.Event.Event.detail2 has length of text change. pyLinAcc.Event.Event.any_data has text inserted/deleted.

Parameters:
Returns: tuple of AEEvent
AEEvent.CaretChange
Overrides: TextAdapter.SimpleTextEventHandlerAdapter._handleTextEvent

_handleCaretEvent(self, event, focused, **kwargs)

source code 

Creates and returns an AEEvent.CaretChange indicating the caret moved in the subject accessible.

pyLinAcc.Event.Event.detail1 has caret offset.

Parameters:
Returns: tuple of AEEvent
AEEvent.CaretChange
Overrides: TextAdapter.SimpleTextEventHandlerAdapter._handleCaretEvent