Package NVDAObjects :: Package IAccessible :: Module MSHTML :: Class MSHTMLTextInfo
[hide private]
[frames] | no frames]

Class MSHTMLTextInfo

source code

                   object --+        
                            |        
baseObject.AutoPropertyObject --+    
                                |    
               textInfos.TextInfo --+
                                    |
                                   MSHTMLTextInfo

Nested Classes [hide private]

Inherited from baseObject.AutoPropertyObject: __metaclass__

Instance Methods [hide private]
 
_expandToLine(self, textRange) source code
 
__init__(self, obj, position, _rangeObj=None)
Constructor.
source code
 
expand(self, unit)
Expands the start and end of this text info object to a given unit
source code
bool
_get_isCollapsed(self)
Returns: True if representing a collapsed range, False if the range is expanded to cover one or more characters.
source code
 
collapse(self, end=False)
Collapses this text info object so that both endpoints are the same.
source code
 
copy(self)
duplicates this text info object so that changes can be made to either one with out afecting the other
source code
int
compareEndPoints(self, other, which)
compares one end of this range to one end of another range.
source code
 
setEndPoint(self, other, which)
Sets one end of this range to one end of another range.
source code
unicode
_get_text(self)
The text with in this range.
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
 
updateCaret(self)
Moves the system caret to the position of this text info object
source code
 
updateSelection(self)
Moves the selection (usually the system caret) to the position of this text info object
source code
 
_get_bookmark(self) source code

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

Inherited from textInfos.TextInfo (private): _get_NVDAObjectAtStart, _get_clipboardText, _get_obj, _get_pointAtStart, _get_unit_mouseChunk

Inherited from baseObject.AutoPropertyObject: invalidateCache

Inherited from baseObject.AutoPropertyObject (private): _getPropertyViaCache

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]

Inherited from baseObject.AutoPropertyObject: cachePropertiesByDefault

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, obj, position, _rangeObj=None)
(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)

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)

_get_isCollapsed(self)

source code 
Returns: bool
True if representing a collapsed range, False if the range is expanded to cover one or more characters.
Overrides: textInfos.TextInfo._get_isCollapsed
(inherited documentation)

collapse(self, end=False)

source code 

Collapses this text info object so that both endpoints are the same.

Parameters:
  • end - Whether to collapse to the end; True to collapse to the end, False to collapse to the start.
Overrides: textInfos.TextInfo.collapse
(inherited documentation)

copy(self)

source code 

duplicates this text info object so that changes can be made to either one with out afecting the other

Overrides: textInfos.TextInfo.copy
(inherited documentation)

compareEndPoints(self, other, which)

source code 

compares one end of this range to one end of another range. Subclasses must implement this.

Parameters:
  • other - the text range to compare with.
  • which - The ends to compare; one of "startToStart", "startToEnd", "endToStart", "endToEnd".
Returns: int
-1 if this end is before other end, 1 if this end is after other end or 0 if this end and other end are the same.
Overrides: textInfos.TextInfo.compareEndPoints
(inherited documentation)

setEndPoint(self, other, which)

source code 

Sets one end of this range to one end of another range. Subclasses must implement this.

Parameters:
  • other - The range from which an end is being obtained.
  • which - The ends to use; one of "startToStart", "startToEnd", "endToStart", "endToEnd".
Overrides: textInfos.TextInfo.setEndPoint
(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)

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)

updateCaret(self)

source code 

Moves the system caret to the position of this text info object

Overrides: textInfos.TextInfo.updateCaret
(inherited documentation)

updateSelection(self)

source code 

Moves the selection (usually the system caret) to the position of this text info object

Overrides: textInfos.TextInfo.updateSelection
(inherited documentation)

_get_bookmark(self)

source code 
Overrides: textInfos.TextInfo._get_bookmark