Module compoundDocuments :: Class TreeCompoundTextInfo
[hide private]
[frames] | no frames]

Class TreeCompoundTextInfo

source code

                   object --+            
                            |            
baseObject.AutoPropertyObject --+        
                                |        
               textInfos.TextInfo --+    
                                    |    
                     CompoundTextInfo --+
                                        |
                                       TreeCompoundTextInfo

Nested Classes [hide private]

Inherited from baseObject.AutoPropertyObject: __metaclass__

Instance Methods [hide private]
 
__init__(self, obj, position)
Constructor.
source code
 
_findContentDescendant(self, obj) source code
 
_getTextInfos(self) source code
unicode
_get_text(self)
The text with in this range.
source code
list of unicode and FieldCommand
getTextWithFields(self, formatConfig=None)
Retreaves the text in this range, as well as any control/format fields associated therewith.
source code
 
expand(self, unit)
Expands the start and end of this text info object to a given unit
source code
int
move(self, unit, direction, endPoint=None)
Moves one or both of the endpoints of this object by the given unit and direction.
source code

Inherited from CompoundTextInfo: __eq__, __ne__, collapse, compareEndPoints, copy, setEndPoint, updateCaret, updateSelection

Inherited from textInfos.TextInfo: copyToClipboard, find, getControlFieldBraille, getControlFieldSpeech, getEmbeddedObject, getTextInChunks, isOverlapping, unitCount, unitIndex

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 baseObject.AutoPropertyObject: invalidateCaches

Class Variables [hide private]
  SINGLE_TEXTINFO_UNITS = textInfos.UNIT_CHARACTER, textInfos.UN...

Inherited from baseObject.AutoPropertyObject: cachePropertiesByDefault

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, obj, position)
(Constructor)

source code 

Constructor. Subclasses must extend this, calling the superclass method first.

Parameters:
  • position - The initial position of this range; one of the POSITION_* constants or a position object supported by the implementation.
  • obj - The object containing the range of text being represented.
Overrides: object.__init__
(inherited documentation)

_get_text(self)

source code 

The text with in this range. Subclasses must implement this.

Returns: unicode
The text.
Overrides: textInfos.TextInfo._get_text
(inherited documentation)

getTextWithFields(self, formatConfig=None)

source code 

Retreaves the text in this range, as well as any control/format fields associated therewith. Subclasses may override this. The base implementation just returns the text.

Parameters:
  • formatConfig - Document formatting configuration, useful if you wish to force a particular configuration for a particular task.
Returns: list of unicode and FieldCommand
A sequence of text strings interspersed with associated field commands.
Overrides: textInfos.TextInfo.getTextWithFields
(inherited documentation)

expand(self, unit)

source code 

Expands the start and end of this text info object to a given unit

Parameters:
  • unit - a unit constant
Overrides: textInfos.TextInfo.expand
(inherited documentation)

move(self, unit, direction, endPoint=None)

source code 

Moves one or both of the endpoints of this object by the given unit and direction.

Parameters:
  • unit - the unit to move by; one of the UNIT_* constants.
  • direction - a positive value moves forward by a number of units, a negative value moves back a number of units
  • endPoint - Either None, "start" or "end". If "start" then the start of the range is moved, if "end" then the end of the range is moved, if None - not specified then collapse to start and move both start and end.
Returns: int
The number of units moved; negative indicates backward movement, positive indicates forward movement, 0 means no movement.
Overrides: textInfos.TextInfo.move
(inherited documentation)

Class Variable Details [hide private]

SINGLE_TEXTINFO_UNITS

Value:
textInfos.UNIT_CHARACTER, textInfos.UNIT_WORD, textInfos.UNIT_LINE, te\
xtInfos.UNIT_SENTENCE, textInfos.UNIT_PARAGRAPH