Package NVDAObjects :: Module behaviors :: Class LiveText
[hide private]
[frames] | no frames]

Class LiveText

source code

                   object --+            
                            |            
baseObject.AutoPropertyObject --+        
                                |        
      baseObject.ScriptableObject --+    
                                    |    
                           NVDAObject --+
                                        |
                                       LiveText

An object for which new text should be reported automatically. These objects present text as a single chunk and only fire an event indicating that some part of the text has changed; i.e. they don't provide the new text. Monitoring must be explicitly started and stopped using the startMonitoring and stopMonitoring methods. The object should notify of text changes using the textChange event.

Nested Classes [hide private]

Inherited from NVDAObject: TextInfo, __metaclass__

Instance Methods [hide private]
 
initOverlayClass(self) source code
 
startMonitoring(self)
Start monitoring for new text.
source code
 
stopMonitoring(self)
Stop monitoring previously started with startMonitoring.
source code
 
event_textChange(self)
Fired when the text changes.
source code
list of str
_getTextLines(self)
Retrieve the text of this object in lines.
source code
 
_reportNewText(self, line)
Report a line of new text.
source code
 
_monitor(self) source code
 
_calculateNewText(self, newLines, oldLines) source code

Inherited from NVDAObject: __eq__, __init__, __ne__, doAction, event_becomeNavigatorObject, event_caret, event_descriptionChange, event_focusEntered, event_foreground, event_gainFocus, event_mouseMove, event_nameChange, event_stateChange, event_typedCharacter, event_valueChange, findOverlayClasses, getActionName, makeTextInfo, reportFocus, scrollIntoView, setFocus

Inherited from baseObject.ScriptableObject: bindGesture, bindGestures, clearGestureBindings, getScript

Inherited from baseObject.AutoPropertyObject: invalidateCache

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from NVDAObject: findBestAPIClass, getPossibleAPIClasses, kwargsFromSuper

Inherited from baseObject.AutoPropertyObject: invalidateCaches

Static Methods [hide private]

Inherited from NVDAObject: objectFromPoint, objectInForeground, objectWithFocus

Class Variables [hide private]
  STABILIZE_DELAY = 0
  presentationType = "content"

Inherited from NVDAObject: beTransparentToMouse, cachePropertiesByDefault, presType_content, presType_layout, presType_unavailable, tableCellCoordsInName

Instance Variables [hide private]

Inherited from NVDAObject: textRepresentationLineLength

Inherited from NVDAObject (private): _mouseEntered

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

startMonitoring(self)

source code 

Start monitoring for new text. New text will be reported when it is detected.

Note: If monitoring has already been started, this will have no effect.

See Also: stopMonitoring

stopMonitoring(self)

source code 

Stop monitoring previously started with startMonitoring.

Note: If monitoring has not been started, this will have no effect.

See Also: startMonitoring

event_textChange(self)

source code 

Fired when the text changes.

Note: It is safe to call this directly from threads other than the main thread.

_getTextLines(self)

source code 

Retrieve the text of this object in lines. This will be used to determine the new text to speak. The base implementation uses the TextInfo. However, subclasses should override this if there is a better way to retrieve the text.

Returns: list of str
The current lines of text.