Package Adapters :: Package ATSPI :: Module FactoryAdapter :: Class PORFromPORAdapter
[hide private]
[frames] | no frames]

Class PORFromPORAdapter

source code

      object --+        
               |        
AccAdapt.Adapter --+    
                   |    
 AccAdapt.PORAdapter --+
                       |
                      PORFromPORAdapter

Adapts a POR to the IPORFactory interface. Expects the subject to be a POR.

Instance Methods [hide private]
POR
create(self)
Returns a complete POR built based on the subject POR.
source code

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

Inherited from AccAdapt.Adapter: singleton

Instance Variables [hide private]

Inherited from AccAdapt.PORAdapter: accessible, char_offset, item_offset

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:
Returns: boolean
True when the subject meets the condition named in the docstring for this class, False otherwise
Overrides: when

create(self)

source code 

Returns a complete POR built based on the subject POR. The complete POR is guaranteed to match the definition of an LSR point of regard with a proper accessible and item index.

This method resolves any problems introduced by the DefaultEventHandlerAdapter when it creates PORs for state, property, and children events. These events can originate from children that are items according to LSR, not full accessibles. When this method is called, it checks if the accessible in the POR is an immediate descendant of an accessible that has STATE_MANAGES_DESCENDANT. If so, it create a POR with that parent as the accessible and the item of the descendant as the item index. Otherwise, the original POR is returned.

Returns: POR
Point of regard
Decorators:
  • @pyLinAcc.errorToLookupError