NVDAObjects.window package
- NVDAObjects.window.isUsableWindow(windowHandle)
- class NVDAObjects.window.WindowProcessHandleContainer(windowHandle)
Bases:
object
Manages a Windows process handle. On instanciation it retreaves an open process handle from the process of the provided window, and closes the handle on deletion. @ivar windowHandle: the handle of the window the whos process handle was requested @type windowHandle: int @ivar processHandle: The actual handle which can be used in any win32 calls that need it. @type processHandle: int
@param windowHandle: the handle of the window whos process handle should be retreaved. @type windowHandle: int
- class NVDAObjects.window.Window(chooseBestAPI=True, **kwargs)
Bases:
NVDAObject
An NVDAObject for a window @ivar windowHandle: The window’s handle @type windowHandle: int @ivar windowClassName: the window’s class @type windowClassName: string @ivar windowControlID: the window’s control ID @type windowControlID: int @ivar windowText: The window’s text (using winUser.WM_GETTEXT) @type windowText: string @ivar windowProcessID: The window’s [processID,threadID] @type windowProcessID: list of two ints
- classmethod getPossibleAPIClasses(kwargs, relation=None)
Provides a generator which can generate all the possible API classes (in priority order) that inherit directly from the class it was called on. @param relation: the relationship of a possible new object of this type to another object creating it (e.g. parent). @param type: string @param kwargs: the arguments necessary to construct an object of the class this method was called on. @type kwargs: dictionary @returns: a generator @rtype: generator
- findOverlayClasses(clsList)
Chooses overlay classes which should be added to this object’s class structure, after the object has been initially instantiated. After an NVDAObject class (normally an API-level class) is instantiated, this method is called on the instance to choose appropriate overlay classes.
This method may use properties, etc. on the instance to make this choice. The object’s class structure is then mutated to contain these classes.
L{initOverlayClass} is then called for each class which was not part of the initially instantiated object. This process allows an NVDAObject to be dynamically created using the most appropriate NVDAObject subclass at each API level. Classes should be listed with subclasses first. That is, subclasses should generally call super and then append their own classes to the list.
For example: Called on an IAccessible NVDAObject, the list might contain: “DialogIAccessible (a subclass of IAccessible), Edit (a subclass of Window)”.
@param clsList: The list of classes, which will be modified by this method if appropriate.
- classmethod kwargsFromSuper(kwargs, relation=None)
Finds out if this class can be instanciated from the given super kwargs. If so it updates the kwargs to contain everything it will need to instanciate this class, and returns True. If this class can not be instanciated, it returns False and kwargs is not touched. @param relation: why is this class being instanciated? parent, focus, foreground etc… @type relation: string @param kwargs: the kwargs for constructing this class’s super class. @type kwargs: dict @rtype: boolean
- _isEqual(other)
Calculates if this object is equal to another object. Used by L{NVDAObject.__eq__}. @param other: the other object to compare with. @type other: L{NVDAObject} @return: True if equal, false otherwise. @rtype: boolean
- _get_name()
The name or label of this object (example: the text of a button).
- _get_role()
The role or type of control this object represents (example: button, list, dialog).
- windowClassName: str
- _get_windowClassName()
- _get_windowControlID()
- _get_location()
The location of this object on the screen. @return: left, top, width and height of the object. @rtype: tuple of int
- _get_displayText()
The text at this object’s location according to the display model for this object’s window.
- redraw()
Redraw the display for this object.
- _get_windowText()
- _get_windowTextLineCount()
- _get_processID()
Retrieves an identifier of the process this object is a part of.
- _get_windowThreadID()
- _get_next()
Retrieves the object directly after this object with the same parent. @return: the next object if it exists else None.
- _get_previous()
Retrieves the object directly before this object with the same parent. @return: the previous object if it exists else None.
- _get_firstChild()
Retrieves the first object that this object contains. @return: the first child object if it exists else None.
- _get_lastChild()
Retrieves the last object that this object contains. @return: the last child object if it exists else None.
- _get_parent()
Retrieves this object’s parent (the object that contains this object). @return: the parent object if it exists else None.
- _get_isInForeground()
Finds out if this object is currently within the foreground.
- _get_states()
Retrieves the current states of this object (example: selected, focused). @return: a set of State constants from L{controlTypes}.
- _get_windowStyle()
- _get_extendedWindowStyle()
- _get_isWindowUnicode()
- correctAPIForRelation(obj, relation=None)
- _get_processHandle()
- classmethod normalizeWindowClassName(name)
Removes unneeded information from a window class name (e.g. ATL: and windows forms info), and or maps it to a much more well-known compatible class name. Conversions are also cached for future normalizations. @param name: the window class name to normalize @type name: string @returns: the normalized window class name @rtype: string
- normalizedWindowClassNameCache = {}
- _get_devInfo()
Information about this object useful to developers. Subclasses may extend this, calling the superclass property first. @return: A list of text strings providing information about this object useful to developers.
- _abc_impl = <_abc._abc_data object>
- devInfo: List[str]
Information about this object useful to developers.
- displayText
- extendedWindowStyle
- firstChild: Optional['NVDAObject']
Type definition for auto prop ‘_get_firstChild’
- isInForeground
- isWindowUnicode
- lastChild: Optional['NVDAObject']
Type definition for auto prop ‘_get_lastChild’
- location
- name: str
Type definition for auto prop ‘_get_name’
- next: Optional['NVDAObject']
The object directly after this object with the same parent.
- parent: Optional['NVDAObject']
This object’s parent (the object that contains this object).
- previous: Optional['NVDAObject']
The object directly before this object with the same parent.
- processHandle
- processID: int
Type definition for auto prop ‘_get_processID’
- role: controlTypes.Role
Type definition for auto prop ‘_get_role’
- states: Set[controlTypes.State]
- windowControlID
- windowStyle
- windowText
- windowTextLineCount
- windowThreadID
- class NVDAObjects.window.Desktop(chooseBestAPI=True, **kwargs)
Bases:
Window
- isPresentableFocusAncestor = False
- _get_name()
The name or label of this object (example: the text of a button).
- _abc_impl = <_abc._abc_data object>
- name: str
Type definition for auto prop ‘_get_name’
- class NVDAObjects.window.DisplayModelEditableText(chooseBestAPI=True, **kwargs)
Bases:
EditableTextWithoutAutoSelectDetection
,Window
- TextInfo
alias of
EditableTextDisplayModelTextInfo
- event_valueChange()
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window.DisplayModelLiveText(chooseBestAPI=True, **kwargs)
-
- TextInfo
alias of
EditableTextDisplayModelTextInfo
- startMonitoring()
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: L{stopMonitoring}
- stopMonitoring()
Stop monitoring previously started with L{startMonitoring}. @note: If monitoring has not been started, this will have no effect. @see: L{startMonitoring}
- _get_diffAlgo()
This property controls which diffing algorithm should be used by this object. If the object contains a strictly contiguous span of text (i.e. textInfos.POSITION_ALL refers to the entire contents of the object and not just one visible screen of text), then diffHandler.prefer_dmp (character-based diffing) is suitable. Otherwise, use diffHandler.prefer_difflib.
@Note: Return either diffHandler.prefer_dmp() or diffHandler.prefer_difflib() so that the diffAlgo user preference can override this choice.
- _abc_impl = <_abc._abc_data object>
- diffAlgo
Submodules
NVDAObjects.window._msOfficeChart module
- class NVDAObjects.window._msOfficeChart.OfficeChartElementBase(chooseBestAPI=True, **kwargs)
Bases:
Window
- reportExtraInfo = False
- GetChartSegment()
- _get_role()
The role or type of control this object represents (example: button, list, dialog).
- _get_name()
The name or label of this object (example: the text of a button).
- select()
used to activate specific element in the office application
- script_reportCurrentChartElementWithExtraInfo(gesture)
- script_reportCurrentChartElementColor(gesture)
- ELEMENT_IDS = {0: 'Data Label', 5: 'Walls', 6: 'Corners', 7: 'Data Table', 9: 'Error Bars', 10: 'X Error Bars', 11: 'Y Error Bars', 14: 'Shape', 15: 'Major Gridlines', 16: 'Minor Gridlines', 18: 'Up Bars', 20: 'Down Bars', 22: 'Series Lines', 23: 'Floor', 25: 'Hi Lo Lines', 26: 'Drop Lines', 27: 'Radar Axis Labels', 28: 'Nothing', 30: 'Display Unit Label', 31: 'Pivot Chart Field Button', 32: 'Pivot Chart Drop Zone'}
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- __gestures = {'kb:NVDA+d': 'reportCurrentChartElementWithExtraInfo', 'kb:NVDA+f': 'reportCurrentChartElementColor'}
- _abc_impl = <_abc._abc_data object>
- name: str
Type definition for auto prop ‘_get_name’
- role: controlTypes.Role
Type definition for auto prop ‘_get_role’
- class NVDAObjects.window._msOfficeChart.OfficeChartElementList(chooseBestAPI=True, **kwargs)
Bases:
Window
- addElement(element, parent)
- script_previousElement(gesture)
- script_nextElement(gesture)
- __gestures = {'kb(desktop):leftArrow': 'previousElement', 'kb(desktop):rightArrow': 'nextElement', 'kb(laptop):leftArrow': 'previousElement', 'kb(laptop):rightArrow': 'nextElement'}
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window._msOfficeChart.OfficeChart(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementList
- role: controlTypes.Role = 96
Type definition for auto prop ‘_get_role’
- _get_name()
The name or label of this object (example: the text of a button).
- _get_description()
The description or help text of this object.
- script_activatePosition(gesture)
Toggles between browse mode and focus mode. When in focus mode, keys will pass straight through to the application, allowing you to interact directly with a control. When in browse mode, you can navigate the document with the cursor, quick navigation keys, etc.
- script_disablePassThrough(gesture)
- __gestures = {'kb(desktop):numpadEnter': 'activatePosition', 'kb:downArrow': 'nextElement', 'kb:enter': 'activatePosition', 'kb:escape': 'disablePassThrough', 'kb:space': 'activatePosition', 'kb:upArrow': 'previousElement'}
- _abc_impl = <_abc._abc_data object>
- description: str
Typing information for auto property _get_description
- name: str
Type definition for auto prop ‘_get_name’
- class NVDAObjects.window._msOfficeChart.OfficeChartElementCollection(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementList
- role: controlTypes.Role = 146
Type definition for auto prop ‘_get_role’
- description: str = None
Typing information for auto property _get_description
- _get_name()
The name or label of this object (example: the text of a button).
- select()
- _abc_impl = <_abc._abc_data object>
- name: str
Type definition for auto prop ‘_get_name’
- class NVDAObjects.window._msOfficeChart.OfficeChartElementSeries(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementList
- description: str = None
Typing information for auto property _get_description
- role: controlTypes.Role = 146
Type definition for auto prop ‘_get_role’
- _get_name()
The name or label of this object (example: the text of a button).
- select()
- script_reportColor(gesture)
- __gestures = {'kb:NVDA+5': 'reportColor'}
- _abc_impl = <_abc._abc_data object>
- name: str
Type definition for auto prop ‘_get_name’
- class NVDAObjects.window._msOfficeChart.OfficeChartElementPoint(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementBase
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- select()
used to activate specific element in the office application
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window._msOfficeChart.OfficeChartElementAxis(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementBase
- _axisMap = {1: {1: 'Primary Category Axis', 2: 'Secondary Category Axis'}, 2: {1: 'Primary Value Axis', 2: 'Secondary Value Axis'}, 3: {1: 'Primary Series Axis', 2: 'Secondary Series Axis'}}
- classmethod getAvailableAxisAndAxisTitle(windowHandle, tempChartObject)
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- select()
used to activate specific element in the office application
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window._msOfficeChart.OfficeChartElementAxisTitle(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementAxis
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- select()
used to activate specific element in the office application
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window._msOfficeChart.OfficeChartElementTrendline(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementBase
- _trendlineTypeMap = {-4133: 'Logarithmic', -4132: 'Linear', 3: 'Polynomial', 4: 'Power', 5: 'Exponential', 6: 'Moving Average'}
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- select()
used to activate specific element in the office application
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window._msOfficeChart.OfficeChartElementChartTitle(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementBase
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- select()
used to activate specific element in the office application
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window._msOfficeChart.OfficeChartElementChartArea(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementBase
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- select()
used to activate specific element in the office application
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window._msOfficeChart.OfficeChartElementPlotArea(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementBase
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- select()
used to activate specific element in the office application
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window._msOfficeChart.OfficeChartElementLegend(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementBase
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- select()
used to activate specific element in the office application
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window._msOfficeChart.OfficeChartElementLegendEntry(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementBase
- eventDriven = True
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- select()
used to activate specific element in the office application
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window._msOfficeChart.OfficeChartElementLegendKey(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementBase
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window._msOfficeChart.OfficeChartElementDataTable(chooseBestAPI=True, **kwargs)
Bases:
OfficeChartElementBase
- _getChartElementText(ElementID, arg1, arg2, reportExtraInfo=False)
- select()
used to activate specific element in the office application
- _abc_impl = <_abc._abc_data object>
NVDAObjects.window.akelEdit module
- class NVDAObjects.window.akelEdit.AELINEDATA
Bases:
Structure
- _fields_ = [('next', <class 'NVDAObjects.window.akelEdit.LP_AELINEDATA'>), ('prev', <class 'NVDAObjects.window.akelEdit.LP_AELINEDATA'>), ('wpLine', <class 'ctypes.c_wchar'>), ('nLineLen', <class 'ctypes.c_long'>), ('nLineBreak', <class 'ctypes.c_long'>), ('nLineWidth', <class 'ctypes.c_long'>), ('nSelStart', <class 'ctypes.c_long'>), ('nSelEnd', <class 'ctypes.c_long'>)]
- nLineBreak
Structure/Union member
- nLineLen
Structure/Union member
- nLineWidth
Structure/Union member
- nSelEnd
Structure/Union member
- nSelStart
Structure/Union member
- next
Structure/Union member
- prev
Structure/Union member
- wpLine
Structure/Union member
- class NVDAObjects.window.akelEdit.AECHARINDEX
Bases:
Structure
- _fields_ = [('nLine', <class 'ctypes.c_long'>), ('lpLine', <class 'NVDAObjects.window.akelEdit.AELINEDATA'>), ('nCharInLine', <class 'ctypes.c_long'>)]
- lpLine
Structure/Union member
- nCharInLine
Structure/Union member
- nLine
Structure/Union member
- class NVDAObjects.window.akelEdit.AkelEditTextInfo(*args, **kwargs)
Bases:
EditTextInfo
Constructor. Subclasses may extend this to perform implementation specific initialisation, calling their superclass method afterwards.
- _getLineNumFromOffset(offset)
- _getStoryLength()
- _getLineOffsets(offset)
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window.akelEdit.AkelEdit(chooseBestAPI=True, **kwargs)
Bases:
RichEdit20
- TextInfo
alias of
AkelEditTextInfo
- initOverlayClass()
- _getControlVersion()
- _abc_impl = <_abc._abc_data object>
NVDAObjects.window.edit module
- class NVDAObjects.window.edit.PointLStruct
Bases:
Structure
- _fields_ = [('x', <class 'ctypes.c_long'>), ('y', <class 'ctypes.c_long'>)]
- x
Structure/Union member
- y
Structure/Union member
- class NVDAObjects.window.edit.CharRangeStruct
Bases:
Structure
- _fields_ = [('cpMin', <class 'ctypes.c_long'>), ('cpMax', <class 'ctypes.c_long'>)]
- cpMax
Structure/Union member
- cpMin
Structure/Union member
- class NVDAObjects.window.edit.TextRangeStruct
Bases:
Structure
- _fields_ = [('chrg', <class 'NVDAObjects.window.edit.CharRangeStruct'>), ('lpstrText', <class 'ctypes.c_char_p'>)]
- chrg
Structure/Union member
- lpstrText
Structure/Union member
- class NVDAObjects.window.edit.CharFormat2WStruct
Bases:
Structure
- _fields_ = [('cbSize', <class 'ctypes.c_ulong'>), ('dwMask', <class 'ctypes.c_ulong'>), ('dwEffects', <class 'ctypes.c_ulong'>), ('yHeight', <class 'ctypes.c_long'>), ('yOffset', <class 'ctypes.c_long'>), ('crTextColor', <class 'ctypes.c_ulong'>), ('bCharSet', <class 'ctypes.c_byte'>), ('bPitchAndFamily', <class 'ctypes.c_byte'>), ('szFaceName', <class 'winKernel.c_wchar_Array_32'>), ('wWeight', <class 'ctypes.c_ushort'>), ('sSpacing', <class 'ctypes.c_short'>), ('crBackColor', <class 'ctypes.c_ulong'>), ('lcid', <class 'ctypes.c_ulong'>), ('dwReserved', <class 'ctypes.c_ulong'>), ('sStyle', <class 'ctypes.c_short'>), ('wKerning', <class 'ctypes.c_ushort'>), ('bUnderlineType', <class 'ctypes.c_byte'>), ('bAnimation', <class 'ctypes.c_byte'>), ('bRevAuthor', <class 'ctypes.c_byte'>), ('bReserved1', <class 'ctypes.c_byte'>)]
- bAnimation
Structure/Union member
- bCharSet
Structure/Union member
- bPitchAndFamily
Structure/Union member
- bReserved1
Structure/Union member
- bRevAuthor
Structure/Union member
- bUnderlineType
Structure/Union member
- cbSize
Structure/Union member
- crBackColor
Structure/Union member
- crTextColor
Structure/Union member
- dwEffects
Structure/Union member
- dwMask
Structure/Union member
- dwReserved
Structure/Union member
- lcid
Structure/Union member
- sSpacing
Structure/Union member
- sStyle
Structure/Union member
- szFaceName
Structure/Union member
- wKerning
Structure/Union member
- wWeight
Structure/Union member
- yHeight
Structure/Union member
- yOffset
Structure/Union member
- class NVDAObjects.window.edit.CharFormat2AStruct
Bases:
Structure
- _fields_ = [('cbSize', <class 'ctypes.c_ulong'>), ('dwMask', <class 'ctypes.c_ulong'>), ('dwEffects', <class 'ctypes.c_ulong'>), ('yHeight', <class 'ctypes.c_long'>), ('yOffset', <class 'ctypes.c_long'>), ('crTextColor', <class 'ctypes.c_ulong'>), ('bCharSet', <class 'ctypes.c_byte'>), ('bPitchAndFamily', <class 'ctypes.c_byte'>), ('szFaceName', <class 'winUser.c_char_Array_32'>), ('wWeight', <class 'ctypes.c_ushort'>), ('sSpacing', <class 'ctypes.c_short'>), ('crBackColor', <class 'ctypes.c_ulong'>), ('lcid', <class 'ctypes.c_ulong'>), ('dwReserved', <class 'ctypes.c_ulong'>), ('sStyle', <class 'ctypes.c_short'>), ('wKerning', <class 'ctypes.c_ushort'>), ('bUnderlineType', <class 'ctypes.c_byte'>), ('bAnimation', <class 'ctypes.c_byte'>), ('bRevAuthor', <class 'ctypes.c_byte'>), ('bReserved1', <class 'ctypes.c_byte'>)]
- bAnimation
Structure/Union member
- bCharSet
Structure/Union member
- bPitchAndFamily
Structure/Union member
- bReserved1
Structure/Union member
- bRevAuthor
Structure/Union member
- bUnderlineType
Structure/Union member
- cbSize
Structure/Union member
- crBackColor
Structure/Union member
- crTextColor
Structure/Union member
- dwEffects
Structure/Union member
- dwMask
Structure/Union member
- dwReserved
Structure/Union member
- lcid
Structure/Union member
- sSpacing
Structure/Union member
- sStyle
Structure/Union member
- szFaceName
Structure/Union member
- wKerning
Structure/Union member
- wWeight
Structure/Union member
- yHeight
Structure/Union member
- yOffset
Structure/Union member
- class NVDAObjects.window.edit.getTextExStruct
Bases:
Structure
- _fields_ = [('cb', <class 'ctypes.c_ulong'>), ('flags', <class 'ctypes.c_ulong'>), ('codepage', <class 'ctypes.c_ulong'>), ('lpDefaultChar', <class 'ctypes.c_char_p'>), ('lpUsedDefChar', <class 'ctypes.c_void_p'>)]
- cb
Structure/Union member
- codepage
Structure/Union member
- flags
Structure/Union member
- lpDefaultChar
Structure/Union member
- lpUsedDefChar
Structure/Union member
- class NVDAObjects.window.edit.getTextLengthExStruct
Bases:
Structure
For documentation, see: https://docs.microsoft.com/en-us/windows/desktop/api/richedit/ns-richedit-_gettextlengthex
- _fields_ = [('flags', <class 'ctypes.c_ulong'>), ('codepage', <class 'ctypes.c_ulong'>)]
- codepage
Structure/Union member
- flags
Structure/Union member
- class NVDAObjects.window.edit.EditTextInfo(*args, **kwargs)
Bases:
OffsetsTextInfo
Constructor. Subclasses may extend this to perform implementation specific initialisation, calling their superclass method afterwards.
- _getPointFromOffset(offset)
- _getOffsetFromPoint(x, y)
- _getCharFormat(offset)
- _getFormatFieldAndOffsets(offset, formatConfig, calculateOffsets=True)
Retrieve the formatting information for a given offset and the offsets spanned by that field. Subclasses must override this if support for text formatting is desired. The base implementation associates text with line numbers if possible.
- _setFormatFieldColor(charFormat: CharFormat2AStruct | CharFormat2WStruct, formatField: FormatField) None
- _getSelectionOffsets()
- _setSelectionOffsets(start, end)
- _getCaretOffset()
- _setCaretOffset(offset)
- _getStoryText()
Retrieve the entire text of the object. @return: The entire text of the object. @rtype: str
- _getStoryLength()
- _getLineCount()
- _getTextRange(start, end)
Retrieve the text in a given offset range. @param start: The start offset. @type start: int @param end: The end offset (exclusive). @type end: int @return: The text contained in the requested range. @rtype: str
- _getWordOffsets(offset)
- _getLineNumFromOffset(offset)
- _getLineOffsets(offset)
- _getParagraphOffsets(offset)
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window.edit.ITextDocumentTextInfo(*args, **kwargs)
Bases:
TextInfo
Constructor. Subclasses must extend this, calling the superclass method first. @param position: The initial position of this range; one of the POSITION_* constants or a position object supported by the implementation. @param obj: The object containing the range of text being represented.
- _get_pointAtStart()
Retrieves x and y coordinates corresponding with the textInfo start. It should return Point. The base implementation uses L{boundingRects}. @rtype: L{locationHelper.Point}
- _getFormatFieldAtRange(textRange, formatConfig)
- _setFormatFieldColor(fontObj, formatField: FormatField) None
- _expandFormatRange(textRange, formatConfig)
- _getEmbeddedObjectLabel(embedRangeObj)
- _getTextAtRange(rangeObj)
- getTextWithFields(formatConfig: Dict | None = None) List[str | FieldCommand]
Retrieves 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. @param formatConfig: Document formatting configuration, useful if you wish to force a particular
configuration for a particular task.
@return: A sequence of text strings interspersed with associated field commands.
- expand(unit)
Expands the start and end of this text info object to a given unit @param unit: a unit constant @type unit: string
- compareEndPoints(other, which)
compares one end of this range to one end of another range. Subclasses must implement this. @param other: the text range to compare with. @type other: L{TextInfo} @param which: The ends to compare; one of “startToStart”, “startToEnd”, “endToStart”, “endToEnd”. @return: -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. @rtype: int
- setEndPoint(other, which)
Sets one end of this range to one end of another range. Subclasses must implement this. @param other: The range from which an end is being obtained. @type other: L{TextInfo} @param which: The ends to use; one of “startToStart”, “startToEnd”, “endToStart”, “endToEnd”.
- _get_isCollapsed()
@return: C{True} if representing a collapsed range, C{False} if the range is expanded to cover one or more characters. @rtype: bool
- collapse(end=False)
Collapses this text info object so that both endpoints are the same. @param end: Whether to collapse to the end; C{True} to collapse to the end, C{False} to collapse to the start. @type end: bool
- copy()
duplicates this text info object so that changes can be made to either one with out afecting the other
- _get_text()
The text with in this range. Subclasses must implement this. @return: The text. @note: The text is not guaranteed to be the exact length of the range in offsets.
- move(unit, direction, endPoint=None)
Moves one or both of the endpoints of this object by the given unit and direction. @param unit: the unit to move by; one of the UNIT_* constants. @param direction: a positive value moves forward by a number of units, a negative value moves back a number of units @type: int @param 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. @return: The number of units moved;
negative indicates backward movement, positive indicates forward movement, 0 means no movement.
@rtype: int
- _get_bookmark()
- updateCaret()
Moves the system caret to the position of this text info object
- updateSelection()
Moves the selection (usually the system caret) to the position of this text info object
- _abc_impl = <_abc._abc_data object>
- bookmark
- isCollapsed
- pointAtStart
- text: str
Typing information for auto-property: _get_text
- class NVDAObjects.window.edit.EditBase(chooseBestAPI=True, **kwargs)
Bases:
Window
“Base class for Edit and Rich Edit controls, shared by legacy and UIA implementations.
- _get_value()
The value of this object (example: the current percentage of a scrollbar, the selected option in a combo box).
- _get_role()
The role or type of control this object represents (example: button, list, dialog).
- _get_states()
Retrieves the current states of this object (example: selected, focused). @return: a set of State constants from L{controlTypes}.
- _abc_impl = <_abc._abc_data object>
- role: controlTypes.Role
Type definition for auto prop ‘_get_role’
- states: Set[controlTypes.State]
- value: str
Typing information for auto property _get_value
- class NVDAObjects.window.edit.Edit(chooseBestAPI=True, **kwargs)
Bases:
EditableTextWithAutoSelectDetection
,EditBase
- editAPIVersion = 0
- editValueUnit = 'line'
- _get_TextInfo()
- _get_ITextDocumentObject()
- _get_ITextSelectionObject()
- event_caret()
- event_valueChange()
- ITextDocumentObject
- ITextSelectionObject
- TextInfo
The TextInfo class this object should use to provide access to text. @type: type; L{textInfos.TextInfo}
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window.edit.RichEdit(chooseBestAPI=True, **kwargs)
Bases:
Edit
- editAPIVersion = 1
- makeTextInfo(position)
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window.edit.RichEdit20(chooseBestAPI=True, **kwargs)
Bases:
RichEdit
- _abc_impl = <_abc._abc_data object>
- editAPIVersion = 2
- class NVDAObjects.window.edit.RichEdit30(chooseBestAPI=True, **kwargs)
Bases:
RichEdit
- _abc_impl = <_abc._abc_data object>
- editAPIVersion = 3
- class NVDAObjects.window.edit.RichEdit50(chooseBestAPI=True, **kwargs)
Bases:
RichEdit
- _abc_impl = <_abc._abc_data object>
- editAPIVersion = 5
- class NVDAObjects.window.edit.UnidentifiedEdit(chooseBestAPI=True, **kwargs)
Bases:
RichEdit
An edit control for which the edit API version is unknown. This class inherrits from L{RichEdit} to ensure L{ITextDocumentTextInfo} initialization failure is handled correctly.
- _abc_impl = <_abc._abc_data object>
- editAPIVersion = -1
NVDAObjects.window.excel module
- class NVDAObjects.window.excel.XlHAlign(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
DisplayStringIntEnum
- CENTER = -4108
- CENTER_ACROSS_SELECTION = 7
- DISTRIBUTED = -4117
- FILL = 5
- GENERAL = 1
- JUSTIFY = -4130
- LEFT = -4131
- RIGHT = -4152
- property _displayStringLabels
Specify a dictionary which takes members of the Enum and returns the translated display string.
- class NVDAObjects.window.excel.XlVAlign(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
DisplayStringIntEnum
- BOTTOM = -4107
- CENTER = -4108
- DISTRIBUTED = -4117
- JUSTIFY = -4130
- TOP = -4160
- property _displayStringLabels
Specify a dictionary which takes members of the Enum and returns the translated display string.
Bases:
QuickNavItem
@param itemType: the type that was searched for (e.g. link, heading, table etc) @type itemType: string @param document: the browse mode document this item is a part of. @type document: L{BrowseModeTreeInterceptor}
Activates this item’s position. E.g. follows a link, presses a button etc.
Is this item a child of the given parent? This is used when representing items in a hierarchical tree structure, such as the Elements List. @param parent: the item of whom this item may be a child of. @type parent: L{QuickNavItem} @return: True if this item is a child, false otherwise. @rtype: bool
Reports the contents of this item. @param readUnit: the optional unit (e.g. line, paragraph) that should be used to announce the item position when moved to. If not given, then the full sise of the item is used. @type readUnit: a L{textInfos}.UNIT_* constant.
Bases:
ExcelQuickNavItem
@param itemType: the type that was searched for (e.g. link, heading, table etc) @type itemType: string @param document: the browse mode document this item is a part of. @type document: L{BrowseModeTreeInterceptor}
Moves the browse mode caret or focus to this item.
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
Bases:
ExcelQuickNavItem
@param itemType: the type that was searched for (e.g. link, heading, table etc) @type itemType: string @param document: the browse mode document this item is a part of. @type document: L{BrowseModeTreeInterceptor}
Moves the browse mode caret or focus to this item.
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
Bases:
ExcelRangeBasedQuickNavItem
@param itemType: the type that was searched for (e.g. link, heading, table etc) @type itemType: string @param document: the browse mode document this item is a part of. @type document: L{BrowseModeTreeInterceptor}
Bases:
ExcelRangeBasedQuickNavItem
@param itemType: the type that was searched for (e.g. link, heading, table etc) @type itemType: string @param document: the browse mode document this item is a part of. @type document: L{BrowseModeTreeInterceptor}
Bases:
object
Allows iterating over an MS excel collection (e.g. notes, Formulas or charts) emitting L{QuickNavItem} objects.
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
Fetches a Microsoft Excel collection object from a Microsoft excel worksheet object. E.g. charts, notes, or formula. @param worksheetObject: a Microsoft excel worksheet object. @return: a Microsoft excel collection object.
Only allows certain items fom a collection to be emitted. E.g. a chart . @param item: an item from a Microsoft excel collection (e.g. chart object). @return True if this item should be allowd, false otherwise. @rtype: bool
returns a generator that emits L{QuickNavItem} objects for this collection.
Bases:
ExcelQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
ExcelChartQuickNavItem
Fetches a Microsoft Excel collection object from a Microsoft excel worksheet object. E.g. charts, notes, or formula. @param worksheetObject: a Microsoft excel worksheet object. @return: a Microsoft excel collection object.
Bases:
ExcelQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
ExcelCommentQuickNavItem
Fetches a Microsoft Excel collection object from a Microsoft excel worksheet object. E.g. charts, notes, or formula. @param worksheetObject: a Microsoft excel worksheet object. @return: a Microsoft excel collection object.
Only allows certain items fom a collection to be emitted. E.g. a chart . @param item: an item from a Microsoft excel collection (e.g. chart object). @return True if this item should be allowd, false otherwise. @rtype: bool
Bases:
ExcelQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
ExcelFormulaQuickNavItem
Fetches a Microsoft Excel collection object from a Microsoft excel worksheet object. E.g. charts, notes, or formula. @param worksheetObject: a Microsoft excel worksheet object. @return: a Microsoft excel collection object.
Bases:
ExcelQuickNavItem
@param itemType: the type that was searched for (e.g. link, heading, table etc) @type itemType: string @param document: the browse mode document this item is a part of. @type document: L{BrowseModeTreeInterceptor}
Moves the browse mode caret or focus to this item.
Renames this item with the new name.
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
Bases:
ExcelQuicknavIterator
Allows iterating over an MS excel Sheets collection emitting L{QuickNavItem} object.
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
ExcelSheetQuickNavItem
Fetches a Microsoft Excel collection object from a Microsoft excel worksheet object. E.g. charts, notes, or formula. @param worksheetObject: a Microsoft excel worksheet object. @return: a Microsoft excel collection object.
Only allows certain items fom a collection to be emitted. E.g. a chart . @param item: an item from a Microsoft excel collection (e.g. chart object). @return True if this item should be allowd, false otherwise. @rtype: bool
- class NVDAObjects.window.excel.ExcelBrowseModeTreeInterceptor(*args, **kwargs)
Bases:
BrowseModeTreeInterceptor
- disableAutoPassThrough = True
- _get_currentNVDAObject()
- _get_isAlive()
Whether this interceptor is alive. If it is not alive, it will be removed.
- script_moveLeft(gesture)
- script_moveRight(gesture)
- script_moveUp(gesture)
- script_moveDown(gesture)
- script_startOfColumn(gesture)
- script_startOfRow(gesture)
- script_endOfRow(gesture)
- script_endOfColumn(gesture)
- _get_selection()
- _set_selection(info)
- _get_ElementsListDialog()
- _iterNodesByType(nodeType, direction='next', pos=None)
Yields L{QuickNavItem} objects representing the ordered positions in this document according to the type being searched for (e.g. link, heading, table etc). @param itemType: the type being searched for (e.g. link, heading, table etc) @type itemType: string @param direction: the direction in which to search (next, previous, up) @type direction: string @param pos: the position in the document from where to start the search. @type pos: Usually an L{textInfos.TextInfo} @raise NotImplementedError: This type is not supported by this BrowseMode implementation
- script_elementsList(gesture)
Lists various types of elements in this spreadsheet
- ElementsListDialog
- __gestures = {'kb:control+downArrow': 'endOfColumn', 'kb:control+leftArrow': 'startOfRow', 'kb:control+rightArrow': 'endOfRow', 'kb:control+upArrow': 'startOfColumn', 'kb:downArrow': 'moveDown', 'kb:leftArrow': 'moveLeft', 'kb:rightArrow': 'moveRight', 'kb:upArrow': 'moveUp'}
- _abc_impl = <_abc._abc_data object>
- currentNVDAObject
- isAlive
- property selection
- class NVDAObjects.window.excel.ElementsListDialog(document)
Bases:
ElementsListDialog
- helpId = 'ExcelElementsList'
- ELEMENT_TYPES = (('chart', '&Charts'), ('comment', 'N&otes'), ('formula', 'Fo&rmulas'), ('formField', '&Form fields'), ('sheet', '&Sheets'))
- class NVDAObjects.window.excel.EditCommentDialog(*args, **kwargs)
Bases:
ContextHelpMixin
,TextEntryDialog
- helpId = 'ExcelReportingComments'
- class NVDAObjects.window.excel.ExcelBase(chooseBestAPI=True, **kwargs)
Bases:
Window
A base that all Excel NVDAObjects inherit from, which contains some useful methods.
- static excelWindowObjectFromWindow(windowHandle)
- static getCellAddress(cell, external=False, format=1)
- _getDropdown(selection=None)
- _getSelection()
- focusOnActiveDocument(officeChartObject)
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.window.excel.Excel7Window(chooseBestAPI=True, **kwargs)
Bases:
ExcelBase
An overlay class for Window for the EXCEL7 window class, which simply bounces focus to the active excel cell.
- _get_excelWindowObject()
- _get_focusRedirect()
- event_caret()
- _abc_impl = <_abc._abc_data object>
- excelWindowObject
- focusRedirect
- class NVDAObjects.window.excel.ExcelWorksheet(chooseBestAPI=True, **kwargs)
Bases:
ExcelBase
- treeInterceptorClass
alias of
ExcelBrowseModeTreeInterceptor
- role: controlTypes.Role = 28
Type definition for auto prop ‘_get_role’
- _get_excelApplicationObject()
- re_definedName = re.compile("^((?P<sheet>('[^']+'|[^!]+))!)?(?P<name>\\w+)(\\.(?P<minAddress>[a-zA-Z]+[0-9]+)?(\\.(?P<maxAddress>[a-zA-Z]+[0-9]+)?(\\..*)*)?)?$")
- populateHeaderCellTrackerFromNames(headerCellTracker)
- _get_headerCellTracker()
- setAsHeaderCell(cell, isColumnHeader=False, isRowHeader=False)
- _getMaxColumnNumberForHeaderCell(excelCell)
- forgetHeaderCell(cell, isColumnHeader=False, isRowHeader=False)
- fetchAssociatedHeaderCellText(cell, columnHeader=False)
- _get_name()
The name or label of this object (example: the text of a button).
- _isEqual(other)
Calculates if this object is equal to another object. Used by L{NVDAObject.__eq__}. @param other: the other object to compare with. @type other: L{NVDAObject} @return: True if equal, false otherwise. @rtype: boolean
- _get_firstChild()
Retrieves the first object that this object contains. @return: the first child object if it exists else None.
- _get_states()
Retrieves the current states of this object (example: selected, focused). @return: a set of State constants from L{controlTypes}.
- script_changeSelection(gesture)
- _WaitForValueChangeForAction(action, fetcher, timeout=0.15)
- _toggleBooleanAttribute(gesture, getStateFun, msgOff, msgOn)
- script_toggleBold(gesture)
- script_toggleItalic(gesture)
- script_toggleUnderline(gesture)
- script_toggleStrikethrough(gesture)
- __gestures = {'kb:alt+backspace': 'changeSelection', 'kb:alt+pageDown': 'changeSelection', 'kb:alt+pageUp': 'changeSelection', 'kb:alt+shift+pageDown': 'changeSelection', 'kb:alt+shift+pageUp': 'changeSelection', 'kb:control+2': 'toggleBold', 'kb:control+3': 'toggleItalic', 'kb:control+4': 'toggleUnderline', 'kb:control+5': 'toggleStrikethrough', 'kb:control+a': 'changeSelection', 'kb:control+b': 'toggleBold', 'kb:control+downArrow': 'changeSelection', 'kb:control+end': 'changeSelection', 'kb:control+home': 'changeSelection', 'kb:control+i': 'toggleItalic', 'kb:control+leftArrow': 'changeSelection', 'kb:control+pageDown': 'changeSelection', 'kb:control+pageUp': 'changeSelection', 'kb:control+rightArrow': 'changeSelection', 'kb:control+shift+8': 'changeSelection', 'kb:control+space': 'changeSelection', 'kb:control+u': 'toggleUnderline', 'kb:control+upArrow': 'changeSelection', 'kb:control+v': 'changeSelection', 'kb:control+y': 'changeSelection', 'kb:control+z': 'changeSelection', 'kb:downArrow': 'changeSelection', 'kb:end': 'changeSelection', 'kb:enter': 'changeSelection', 'kb:home': 'changeSelection', 'kb:leftArrow': 'changeSelection', 'kb:numpadEnter': 'changeSelection', 'kb:pageDown': 'changeSelection', 'kb:pageUp': 'changeSelection', 'kb:rightArrow': 'changeSelection', 'kb:shift+control+downArrow': 'changeSelection', 'kb:shift+control+end': 'changeSelection', 'kb:shift+control+home': 'changeSelection', 'kb:shift+control+leftArrow': 'changeSelection', 'kb:shift+control+rightArrow': 'changeSelection', 'kb:shift+control+upArrow': 'changeSelection', 'kb:shift+downArrow': 'changeSelection', 'kb:shift+end': 'changeSelection', 'kb:shift+enter': 'changeSelection', 'kb:shift+f11': 'changeSelection', 'kb:shift+home': 'changeSelection', 'kb:shift+leftArrow': 'changeSelection', 'kb:shift+numpadEnter': 'changeSelection', 'kb:shift+pageDown': 'changeSelection', 'kb:shift+pageUp': 'changeSelection', 'kb:shift+rightArrow': 'changeSelection', 'kb:shift+space': 'changeSelection', 'kb:shift+tab': 'changeSelection', 'kb:shift+upArrow': 'changeSelection', 'kb:tab': 'changeSelection', 'kb:upArrow': 'changeSelection'}
- _abc_impl = <_abc._abc_data object>
- excelApplicationObject
- firstChild: Optional['NVDAObject']
Type definition for auto prop ‘_get_firstChild’
- headerCellTracker
- name: str
Type definition for auto prop ‘_get_name’
- states: Set[controlTypes.State]
- class NVDAObjects.window.excel.ExcelCellTextInfo(*args, **kwargs)
Bases:
NVDAObjectTextInfo
Constructor. Subclasses may extend this to perform implementation specific initialisation, calling their superclass method afterwards.
- _getFormatFieldAndOffsets(offset, formatConfig, calculateOffsets=True)
Retrieve the formatting information for a given offset and the offsets spanned by that field. Subclasses must override this if support for text formatting is desired. The base implementation associates text with line numbers if possible.
- _get_locationText()
A message that explains the location of the text position in friendly terms.
- _abc_impl = <_abc._abc_data object>
- locationText
- class NVDAObjects.window.excel.NvCellState(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
IntEnum
- EXPANDED = 2
- COLLAPSED = 4
- LINKED = 8
- HASPOPUP = 16
- PROTECTED = 32
- HASFORMULA = 64
- HASCOMMENT = 128
- CROPPED = 256
- OVERFLOWING = 512
- UNLOCKED = 1024
- class NVDAObjects.window.excel.ExcelCellInfo
Bases:
Structure
- _fields_ = [('text', <class 'comtypes.BSTR'>), ('address', <class 'comtypes.BSTR'>), ('inputTitle', <class 'comtypes.BSTR'>), ('inputMessage', <class 'comtypes.BSTR'>), ('nvCellStates', <class 'ctypes.c_longlong'>), ('rowNumber', <class 'ctypes.c_long'>), ('rowSpan', <class 'ctypes.c_long'>), ('columnNumber', <class 'ctypes.c_long'>), ('columnSpan', <class 'ctypes.c_long'>), ('outlineLevel', <class 'ctypes.c_long'>), ('comments', <class 'comtypes.BSTR'>), ('formula', <class 'comtypes.BSTR'>)]
- address
Structure/Union member
- columnNumber
Structure/Union member
- columnSpan
Structure/Union member
- comments
Structure/Union member
- formula
Structure/Union member
- inputMessage
Structure/Union member
- inputTitle
Structure/Union member
- nvCellStates
Structure/Union member
- outlineLevel
Structure/Union member
- rowNumber
Structure/Union member
- rowSpan
Structure/Union member
- text
Structure/Union member
Bases:
QuickNavItem
@param itemType: the type that was searched for (e.g. link, heading, table etc) @type itemType: string @param document: the browse mode document this item is a part of. @type document: L{BrowseModeTreeInterceptor}
Activates this item’s position. E.g. follows a link, presses a button etc.
Is this item a child of the given parent? This is used when representing items in a hierarchical tree structure, such as the Elements List. @param parent: the item of whom this item may be a child of. @type parent: L{QuickNavItem} @return: True if this item is a child, false otherwise. @rtype: bool
Reports the contents of this item. @param readUnit: the optional unit (e.g. line, paragraph) that should be used to announce the item position when moved to. If not given, then the full sise of the item is used. @type readUnit: a L{textInfos}.UNIT_* constant.
Moves the browse mode caret or focus to this item.
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
Bases:
ExcelCellInfoQuickNavItem
@param itemType: the type that was searched for (e.g. link, heading, table etc) @type itemType: string @param document: the browse mode document this item is a part of. @type document: L{BrowseModeTreeInterceptor}
Bases:
ExcelCellInfoQuickNavItem
@param itemType: the type that was searched for (e.g. link, heading, table etc) @type itemType: string @param document: the browse mode document this item is a part of. @type document: L{BrowseModeTreeInterceptor}
Bases:
object
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
The particular L{ExcelCellInfoQuicknavItem} subclass for objects that should be emitted from the L{iterate} method.
An Excel range object covering all the cells that should be emitted by the L{iterate} method.
Bases:
ExcelCellInfoQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
CommentExcelCellInfoQuickNavItem
An Excel range object covering all the cells that should be emitted by the L{iterate} method.
Bases:
ExcelCellInfoQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
FormulaExcelCellInfoQuickNavItem
An Excel range object covering all the cells that should be emitted by the L{iterate} method.
- class NVDAObjects.window.excel.ExcelCell(chooseBestAPI=True, **kwargs)
Bases:
ExcelBase
- excelCellInfo: ExcelCellInfo | None
Type info for auto property: _get_excelCellInfo
- _get_excelCellInfo() ExcelCellInfo | None
- doAction()
Performs an action supported by this object. If index is not given then the default action will be used if it exists.
- _get_columnHeaderText()
The text of the column headers for this cell. @rtype: str
- _get_rowHeaderText()
The text of the row headers for this cell. @rtype: str
- script_openDropdown(gesture)
- script_setColumnHeader(gesture)
Sets the current cell as start of column header. Pressing once will set this cell as the first column header for any cell lower and to the right of it within this region. Pressing twice will forget the current column header for this cell.
- script_setRowHeader(gesture)
Sets the current cell as start of row headers. Pressing once will set this cell as the first row header for any cell lower and to the right of it within this region. Pressing twice will forget the current row header for this cell.
- classmethod kwargsFromSuper(kwargs, relation=None)
Finds out if this class can be instanciated from the given super kwargs. If so it updates the kwargs to contain everything it will need to instanciate this class, and returns True. If this class can not be instanciated, it returns False and kwargs is not touched. @param relation: why is this class being instanciated? parent, focus, foreground etc… @type relation: string @param kwargs: the kwargs for constructing this class’s super class. @type kwargs: dict @rtype: boolean
- _get_excelRangeObject()
- _get_role()
The role or type of control this object represents (example: button, list, dialog).
- TextInfo
alias of
ExcelCellTextInfo
- _isEqual(other)
Calculates if this object is equal to another object. Used by L{NVDAObject.__eq__}. @param other: the other object to compare with. @type other: L{NVDAObject} @return: True if equal, false otherwise. @rtype: boolean
- _get_cellCoordsText()
An alternative text representation of cell coordinates e.g. “a1”. Will override presentation of rowNumber and columnNumber. Only implement if the representation is really different.
- _get_rowNumber()
Retrieves the row number of this object if it is in a table. @rtype: int
- _get_rowSpan()
The number of rows spanned by this cell. @rtype: int
- _get_columnNumber()
Retrieves the column number of this object if it is in a table. @rtype: int
- _get_colSpan()
- getCellPosition()
- _get_tableID()
The identifier of the table associated with this object if it is a table cell. This identifier must distinguish this table from other tables. If this is not implemented, table cell information will still be reported, but row and column information will always be reported even if the user moves to a cell in the same row/column.
- _get_name()
The name or label of this object (example: the text of a button).
- _get_states()
Retrieves the current states of this object (example: selected, focused). @return: a set of State constants from L{controlTypes}.
- event_typedCharacter(ch)
- _get_parent()
Retrieves this object’s parent (the object that contains this object). @return: the parent object if it exists else None.
- _get_next()
Retrieves the object directly after this object with the same parent. @return: the next object if it exists else None.
- _get_previous()
Retrieves the object directly before this object with the same parent. @return: the previous object if it exists else None.
- _get_description()
The description or help text of this object.
- _get_positionInfo()
Retrieves position information for this object such as its level, its index with in a group, and the number of items in that group. @return: a dictionary containing any of level, groupIndex and similarItemsInGroup.
- script_reportComment(gesture: InputGesture) None
Reports the note on the current cell. If pressed twice, presents the information in browse mode
- script_editComment(gesture)
Opens the note editing dialog
- reportFocus()
Announces this object in a way suitable such that it gained focus.
- __gestures = {'kb:NVDA+alt+c': 'reportComment', 'kb:NVDA+shift+c': 'setColumnHeader', 'kb:NVDA+shift+r': 'setRowHeader', 'kb:alt+downArrow': 'openDropdown', 'kb:shift+f2': 'editComment'}
- _abc_impl = <_abc._abc_data object>
- cellCoordsText: Optional[str]
Typing information for auto-property: _get_cellCoordsText
- colSpan
- columnHeaderText
- columnNumber
- description: str
Typing information for auto property _get_description
- excelRangeObject
- name: str
Type definition for auto prop ‘_get_name’
- next: Optional['NVDAObject']
The object directly after this object with the same parent.
- parent: Optional['NVDAObject']
This object’s parent (the object that contains this object).
- positionInfo: Dict[str, int]
Type definition for auto prop ‘_get_positionInfo’
- previous: Optional['NVDAObject']
The object directly before this object with the same parent.
- role: controlTypes.Role
Type definition for auto prop ‘_get_role’
- rowHeaderText
- rowNumber
- rowSpan
- states: Set[controlTypes.State]
- tableID
- class NVDAObjects.window.excel.ExcelSelection(chooseBestAPI=True, **kwargs)
Bases:
ExcelBase
- role: controlTypes.Role = 29
Type definition for auto prop ‘_get_role’
- _get_states()
Retrieves the current states of this object (example: selected, focused). @return: a set of State constants from L{controlTypes}.
- _get_name()
The name or label of this object (example: the text of a button).
- _get_parent()
Retrieves this object’s parent (the object that contains this object). @return: the parent object if it exists else None.
- _get_rowNumber()
Retrieves the row number of this object if it is in a table. @rtype: int
- _get_rowSpan()
The number of rows spanned by this cell. @rtype: int
- _get_columnNumber()
Retrieves the column number of this object if it is in a table. @rtype: int
- _get_colSpan()
- makeTextInfo(position)
- _abc_impl = <_abc._abc_data object>
- colSpan
- columnNumber
- name: str
Type definition for auto prop ‘_get_name’
- parent: Optional['NVDAObject']
This object’s parent (the object that contains this object).
- rowNumber
- rowSpan
- states: Set[controlTypes.State]
- class NVDAObjects.window.excel.ExcelDropdownItem(chooseBestAPI=True, **kwargs)
Bases:
Window
- firstChild: Optional['NVDAObject'] = None
Type definition for auto prop ‘_get_firstChild’
- lastChild: Optional['NVDAObject'] = None
Type definition for auto prop ‘_get_lastChild’
- children: List['NVDAObject'] = []
Type definition for auto prop ‘_get_children’
- role: controlTypes.Role = 15
Type definition for auto prop ‘_get_role’
- _get_previous()
Retrieves the object directly before this object with the same parent. @return: the previous object if it exists else None.
- _get_next()
Retrieves the object directly after this object with the same parent. @return: the next object if it exists else None.
- _get_treeInterceptor()
Retrieves the treeInterceptor associated with this object. If a treeInterceptor has not been specifically set, the L{treeInterceptorHandler} is asked if it can find a treeInterceptor containing this object. @return: the treeInterceptor
- _get_positionInfo()
Retrieves position information for this object such as its level, its index with in a group, and the number of items in that group. @return: a dictionary containing any of level, groupIndex and similarItemsInGroup.
- _abc_impl = <_abc._abc_data object>
- next: Optional['NVDAObject']
The object directly after this object with the same parent.
- positionInfo: Dict[str, int]
Type definition for auto prop ‘_get_positionInfo’
- previous: Optional['NVDAObject']
The object directly before this object with the same parent.
- treeInterceptor: Optional[TreeInterceptor]
Type definition for auto prop ‘_get_treeInterceptor’
- class NVDAObjects.window.excel.ExcelDropdown(chooseBestAPI=True, **kwargs)
Bases:
Window
- classmethod kwargsFromSuper(kwargs, relation=None)
Finds out if this class can be instanciated from the given super kwargs. If so it updates the kwargs to contain everything it will need to instanciate this class, and returns True. If this class can not be instanciated, it returns False and kwargs is not touched. @param relation: why is this class being instanciated? parent, focus, foreground etc… @type relation: string @param kwargs: the kwargs for constructing this class’s super class. @type kwargs: dict @rtype: boolean
- role: controlTypes.Role = 14
Type definition for auto prop ‘_get_role’
- excelCell = None
- _get__highlightColors()
- _get_children()
Retrieves a list of all the objects directly contained by this object (who’s parent is this object). @rtype: list of L{NVDAObject}
- getChildAtIndex(index)
- _get_childCount()
Retrieves the number of children this object contains. @rtype: int
- _get_firstChild()
Retrieves the first object that this object contains. @return: the first child object if it exists else None.
- _get_selection()
- script_selectionChange(gesture)
- script_closeDropdown(gesture)
- event_gainFocus()
This code is executed if a gain focus event is received by this object.
- __gestures = {'kb:downArrow': 'selectionChange', 'kb:end': 'selectionChange', 'kb:enter': 'closeDropdown', 'kb:escape': 'closeDropdown', 'kb:home': 'selectionChange', 'kb:leftArrow': 'selectionChange', 'kb:rightArrow': 'selectionChange', 'kb:space': 'closeDropdown', 'kb:upArrow': 'selectionChange'}
- _abc_impl = <_abc._abc_data object>
- _highlightColors
- childCount
- children: List['NVDAObject']
Type definition for auto prop ‘_get_children’
- firstChild: Optional['NVDAObject']
Type definition for auto prop ‘_get_firstChild’
- selection: textInfos.TextInfo
- class NVDAObjects.window.excel.ExcelMergedCell(chooseBestAPI=True, **kwargs)
Bases:
ExcelCell
- _get_cellCoordsText()
An alternative text representation of cell coordinates e.g. “a1”. Will override presentation of rowNumber and columnNumber. Only implement if the representation is really different.
- _get_rowSpan()
The number of rows spanned by this cell. @rtype: int
- _get_colSpan()
- _abc_impl = <_abc._abc_data object>
- cellCoordsText: Optional[str]
Typing information for auto-property: _get_cellCoordsText
- colSpan
- rowSpan
- class NVDAObjects.window.excel.ExcelFormControl(chooseBestAPI=True, **kwargs)
Bases:
ExcelBase
- isFocusable: bool = True
Type definition for auto prop ‘_get_isFocusable’
- _roleMap = {0: Role.BUTTON, 1: Role.CHECKBOX, 2: Role.COMBOBOX, 3: Role.EDITABLETEXT, 4: Role.BOX, 5: Role.LABEL, 6: Role.LIST, 7: Role.RADIOBUTTON, 8: Role.SCROLLBAR, 9: Role.SPINBUTTON}
- _get_excelControlFormatObject()
- _get_excelOLEFormatObject()
- _get_role()
The role or type of control this object represents (example: button, list, dialog).
- _get_states()
Retrieves the current states of this object (example: selected, focused). @return: a set of State constants from L{controlTypes}.
- _get_name()
The name or label of this object (example: the text of a button).
- _get_index()
- _get_topLeftCell()
- _get_bottomRightCell()
- _getFormControlScreenCoordinates()
- script_doAction(gesture)
- doAction()
Performs an action supported by this object. If index is not given then the default action will be used if it exists.
- __gestures = {'kb(desktop):numpadEnter': 'doAction', 'kb:enter': 'doAction', 'kb:space': 'doAction'}
- _abc_impl = <_abc._abc_data object>
- bottomRightCell
- excelControlFormatObject
- excelOLEFormatObject
- index
- name: str
Type definition for auto prop ‘_get_name’
- role: controlTypes.Role
Type definition for auto prop ‘_get_role’
- states: Set[controlTypes.State]
- topLeftCell
Bases:
ExcelQuickNavItem
@param itemType: the type that was searched for (e.g. link, heading, table etc) @type itemType: string @param document: the browse mode document this item is a part of. @type document: L{BrowseModeTreeInterceptor}
Moves the browse mode caret or focus to this item.
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
Bases:
ExcelQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
ExcelFormControlQuickNavItem
Fetches a Microsoft Excel collection object from a Microsoft excel worksheet object. E.g. charts, notes, or formula. @param worksheetObject: a Microsoft excel worksheet object. @return: a Microsoft excel collection object.
returns a generator that emits L{QuickNavItem} objects for this collection. @param position: an excelRangeObject representing either the TopLeftCell of the currently selected form control or ActiveCell in a worksheet
Only allows certain items fom a collection to be emitted. E.g. a chart . @param item: an item from a Microsoft excel collection (e.g. chart object). @return True if this item should be allowd, false otherwise. @rtype: bool
- class NVDAObjects.window.excel.ExcelFormControlListBox(chooseBestAPI=True, **kwargs)
Bases:
ExcelFormControl
- getChildAtIndex(index)
- _get_childCount()
Retrieves the number of children this object contains. @rtype: int
- _get_firstChild()
Retrieves the first object that this object contains. @return: the first child object if it exists else None.
- _get_lastChild()
Retrieves the last object that this object contains. @return: the last child object if it exists else None.
- script_moveUp(gesture)
- script_moveDown(gesture)
- doAction()
Performs an action supported by this object. If index is not given then the default action will be used if it exists.
- __gestures = {'kb:downArrow': 'moveDown', 'kb:upArrow': 'moveUp'}
- _abc_impl = <_abc._abc_data object>
- childCount
- firstChild: Optional['NVDAObject']
Type definition for auto prop ‘_get_firstChild’
- lastChild: Optional['NVDAObject']
Type definition for auto prop ‘_get_lastChild’
- class NVDAObjects.window.excel.ExcelFormControlDropDown(chooseBestAPI=True, **kwargs)
Bases:
ExcelFormControl
- script_moveUp(gesture)
- script_moveDown(gesture)
- _get_value()
The value of this object (example: the current percentage of a scrollbar, the selected option in a combo box).
- __gestures = {'kb:downArrow': 'moveDown', 'kb:upArrow': 'moveUp'}
- _abc_impl = <_abc._abc_data object>
- value: str
Typing information for auto property _get_value
- class NVDAObjects.window.excel.ExcelFormControlScrollBar(chooseBestAPI=True, **kwargs)
Bases:
ExcelFormControl
- _get_value()
The value of this object (example: the current percentage of a scrollbar, the selected option in a combo box).
- moveValue(up=False, large=False)
- script_moveUpSmall(gesture)
- script_moveDownSmall(gesture)
- script_moveUpLarge(gesture)
- __gestures = {'kb:downArrow': 'moveDownSmall', 'kb:pageDown': 'moveDownLarge', 'kb:pageUp': 'moveUpLarge', 'kb:upArrow': 'moveUpSmall'}
- _abc_impl = <_abc._abc_data object>
- script_moveDownLarge(gesture)
- value: str
Typing information for auto property _get_value
NVDAObjects.window.excelCellBorder module
- NVDAObjects.window.excelCellBorder.getCellBorderStyleDescription(bordersObj, reportBorderColor=False)
NVDAObjects.window.scintilla module
- NVDAObjects.window.scintilla.INVALID_POSITION = -1
Represents an invalid position within a document.
- class NVDAObjects.window.scintilla.CharacterRangeStruct
Bases:
Structure
- _fields_ = [('cpMin', <class 'ctypes.c_long'>), ('cpMax', <class 'ctypes.c_long'>)]
- cpMax
Structure/Union member
- cpMin
Structure/Union member
- class NVDAObjects.window.scintilla.ScintillaTextInfo(*args, **kwargs)
Bases:
OffsetsTextInfo
Constructor. Subclasses may extend this to perform implementation specific initialisation, calling their superclass method afterwards.
- class TextRangeStruct
Bases:
Structure
- _fields_ = [('chrg', <class 'NVDAObjects.window.scintilla.CharacterRangeStruct'>), ('lpstrText', <class 'ctypes.c_char_p'>)]
- chrg
Structure/Union member
- lpstrText
Structure/Union member
- _get_encoding()
- _getOffsetFromPoint(x, y)
- _getPointFromOffset(offset)
- _getFormatFieldAndOffsets(offset, formatConfig, calculateOffsets=True)
Retrieve the formatting information for a given offset and the offsets spanned by that field. Subclasses must override this if support for text formatting is desired. The base implementation associates text with line numbers if possible.
- _getCaretOffset()
- _setCaretOffset(offset)
- _getSelectionOffsets()
- _setSelectionOffsets(start, end)
- _getStoryText()
Retrieve the entire text of the object. @return: The entire text of the object. @rtype: str
- _getStoryLength()
- _getLineCount()
- _getTextRange(start, end)
Retrieve the text in a given offset range. @param start: The start offset. @type start: int @param end: The end offset (exclusive). @type end: int @return: The text contained in the requested range. @rtype: str
- _getWordOffsets(offset)
- _getLineNumFromOffset(offset)
- _getLineOffsets(offset)
- _getParagraphOffsets(offset)
- _getCharacterOffsets(offset)
- _abc_impl = <_abc._abc_data object>
- encoding: str | None
The encoding internal to the underlying text info implementation.
- class NVDAObjects.window.scintilla.Scintilla(chooseBestAPI=True, **kwargs)
Bases:
EditableTextWithAutoSelectDetection
,Window
- TextInfo
alias of
ScintillaTextInfo
- _get_name()
The name or label of this object (example: the text of a button).
- _get_role()
The role or type of control this object represents (example: button, list, dialog).
- _get_states()
Retrieves the current states of this object (example: selected, focused). @return: a set of State constants from L{controlTypes}.
- _abc_impl = <_abc._abc_data object>
- name: str
Type definition for auto prop ‘_get_name’
NVDAObjects.window.winConsole module
- class NVDAObjects.window.winConsole.WinConsole(chooseBestAPI=True, **kwargs)
Bases:
Terminal
,EditableTextWithoutAutoSelectDetection
,Window
Base class for NVDA’s legacy Windows Console support. This is used in situations where UIA isn’t available. Please consider using NVDAObjects.UIA.winConsoleUIA instead.
- STABILIZE_DELAY = 0.03
The time to wait before fetching text after a change event.
- _get_windowThreadID()
- _get_TextInfo()
- _get_diffAlgo()
This property controls which diffing algorithm should be used by this object. If the object contains a strictly contiguous span of text (i.e. textInfos.POSITION_ALL refers to the entire contents of the object and not just one visible screen of text), then diffHandler.prefer_dmp (character-based diffing) is suitable. Otherwise, use diffHandler.prefer_difflib.
@Note: Return either diffHandler.prefer_dmp() or diffHandler.prefer_difflib() so that the diffAlgo user preference can override this choice.
Called when this object becomes the navigator object. @param isFocus: true if the navigator object was set due to a focus change. @type isFocus: bool
- event_gainFocus()
This code is executed if a gain focus event is received by this object.
- event_loseFocus()
- event_nameChange()
- _getText()
Retrieve the text of this object. This will be used to determine the new text to speak. The base implementation uses the L{TextInfo}. However, subclasses should override this if there is a better way to retrieve the text.
- script_caret_backspaceCharacter(gesture)
- script_close(gesture)
- script_flush_queuedChars(gesture)
- __gestures = {'kb:alt+f4': 'close', 'kb:control+c': 'flush_queuedChars', 'kb:control+d': 'flush_queuedChars', 'kb:control+pause': 'flush_queuedChars', 'kb:enter': 'flush_queuedChars', 'kb:numpadEnter': 'flush_queuedChars', 'kb:tab': 'flush_queuedChars'}
- TextInfo
The TextInfo class this object should use to provide access to text. @type: type; L{textInfos.TextInfo}
- _abc_impl = <_abc._abc_data object>
- diffAlgo
- windowThreadID
NVDAObjects.window.winword module
- class NVDAObjects.window.winword.WinWordColorIndex(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
IntEnum
- wdBlack = 1
- wdBlue = 2
- wdBrightGreen = 4
- wdDarkBlue = 9
- wdDarkRed = 13
- wdDarkYellow = 14
- wdGray25 = 16
- wdGray50 = 15
- wdGreen = 11
- wdPink = 5
- wdRed = 6
- wdTeal = 10
- wdTurquoise = 3
- wdViolet = 12
- wdWhite = 8
- wdYellow = 7
- class NVDAObjects.window.winword.WinWordColor(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
IntEnum
- wdBlack = 0
- wdBlue = 16711680
- wdBrightGreen = 65280
- wdDarkBlue = 8388608
- wdDarkRed = 128
- wdDarkYellow = 32896
- wdGray25 = 12632256
- wdGray50 = 8421504
- wdGreen = 32768
- wdPink = 16711935
- wdRed = 255
- wdTeal = 8421376
- wdTurquoise = 16776960
- wdViolet = 8388736
- wdWhite = 16777215
- wdYellow = 65535
Bases:
TextInfoQuickNavItem
See L{QuickNavItem.__init__} for itemType and document argument definitions. @param textInfo: the textInfo position this item represents. @type textInfo: L{textInfos.TextInfo}
Is this item a child of the given parent? This is used when representing items in a hierarchical tree structure, such as the Elements List. @param parent: the item of whom this item may be a child of. @type parent: L{QuickNavItem} @return: True if this item is a child, false otherwise. @rtype: bool
Bases:
TextInfoQuickNavItem
A QuickNavItem representing an item that MS Word stores as a collection (e.g. link, table etc).
See L{TextInfoQuickNavItem} for itemType and document argument definitions. @param collectionItem: an item from an MS Word collection e.g. HyperLink object.
Fetches a Microsoft Word range object from a Microsoft Word item in a collection. E.g. a HyperLink object. @param item: an item from a collection (E.g. a HyperLink object).
Bases:
WordDocumentCollectionQuickNavItem
See L{TextInfoQuickNavItem} for itemType and document argument definitions. @param collectionItem: an item from an MS Word collection e.g. HyperLink object.
Fetches a Microsoft Word range object from a Microsoft Word item in a collection. E.g. a HyperLink object. @param item: an item from a collection (E.g. a HyperLink object).
Bases:
WordDocumentCollectionQuickNavItem
See L{TextInfoQuickNavItem} for itemType and document argument definitions. @param collectionItem: an item from an MS Word collection e.g. HyperLink object.
Fetches a Microsoft Word range object from a Microsoft Word item in a collection. E.g. a HyperLink object. @param item: an item from a collection (E.g. a HyperLink object).
Bases:
WordDocumentCollectionQuickNavItem
See L{TextInfoQuickNavItem} for itemType and document argument definitions. @param collectionItem: an item from an MS Word collection e.g. HyperLink object.
Bases:
WordDocumentCollectionQuickNavItem
See L{TextInfoQuickNavItem} for itemType and document argument definitions. @param collectionItem: an item from an MS Word collection e.g. HyperLink object.
Moves the browse mode caret or focus to this item.
Bases:
WordDocumentCollectionQuickNavItem
See L{TextInfoQuickNavItem} for itemType and document argument definitions. @param collectionItem: an item from an MS Word collection e.g. HyperLink object.
Fetches a Microsoft Word range object from a Microsoft Word item in a collection. E.g. a HyperLink object. @param item: an item from a collection (E.g. a HyperLink object).
Bases:
object
Allows iterating over an MS Word collection (e.g. HyperLinks) emitting L{QuickNavItem} objects.
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param rangeObj: a Microsoft Word range object where the collection should be fetched from. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
WordDocumentCollectionQuickNavItem
Fetches a Microsoft Word collection object from a Microsoft Word range object. E.g. HyperLinks from a range. @param rangeObj: a Microsoft Word range object. @return: a Microsoft Word collection object.
Only allows certain items fom a collection to be emitted. E.g. a table who’s borders are enabled. @param item: an item from a Microsoft Word collection (e.g. HyperLink object). @return True if this item should be allowd, false otherwise. @rtype: bool
returns a generator that emits L{QuickNavItem} objects for this collection.
Bases:
WinWordCollectionQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param rangeObj: a Microsoft Word range object where the collection should be fetched from. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
WordDocumentFieldQuickNavItem
Fetches a Microsoft Word collection object from a Microsoft Word range object. E.g. HyperLinks from a range. @param rangeObj: a Microsoft Word range object. @return: a Microsoft Word collection object.
Only allows certain items fom a collection to be emitted. E.g. a table who’s borders are enabled. @param item: an item from a Microsoft Word collection (e.g. HyperLink object). @return True if this item should be allowd, false otherwise. @rtype: bool
Bases:
WinWordCollectionQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param rangeObj: a Microsoft Word range object where the collection should be fetched from. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
WordDocumentCommentQuickNavItem
Fetches a Microsoft Word collection object from a Microsoft Word range object. E.g. HyperLinks from a range. @param rangeObj: a Microsoft Word range object. @return: a Microsoft Word collection object.
Bases:
WinWordCollectionQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param rangeObj: a Microsoft Word range object where the collection should be fetched from. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
WordDocumentRevisionQuickNavItem
Fetches a Microsoft Word collection object from a Microsoft Word range object. E.g. HyperLinks from a range. @param rangeObj: a Microsoft Word range object. @return: a Microsoft Word collection object.
Bases:
WinWordCollectionQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param rangeObj: a Microsoft Word range object where the collection should be fetched from. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
Fetches a Microsoft Word collection object from a Microsoft Word range object. E.g. HyperLinks from a range. @param rangeObj: a Microsoft Word range object. @return: a Microsoft Word collection object.
Bases:
WinWordCollectionQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param rangeObj: a Microsoft Word range object where the collection should be fetched from. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
Fetches a Microsoft Word collection object from a Microsoft Word range object. E.g. HyperLinks from a range. @param rangeObj: a Microsoft Word range object. @return: a Microsoft Word collection object.
Only allows certain items fom a collection to be emitted. E.g. a table who’s borders are enabled. @param item: an item from a Microsoft Word collection (e.g. HyperLink object). @return True if this item should be allowd, false otherwise. @rtype: bool
Bases:
WinWordCollectionQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param rangeObj: a Microsoft Word range object where the collection should be fetched from. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
Fetches a Microsoft Word collection object from a Microsoft Word range object. E.g. HyperLinks from a range. @param rangeObj: a Microsoft Word range object. @return: a Microsoft Word collection object.
Only allows certain items fom a collection to be emitted. E.g. a table who’s borders are enabled. @param item: an item from a Microsoft Word collection (e.g. HyperLink object). @return True if this item should be allowd, false otherwise. @rtype: bool
Bases:
WinWordCollectionQuicknavIterator
See L{QuickNavItemIterator} for itemType, document and direction definitions. @param rangeObj: a Microsoft Word range object where the collection should be fetched from. @param includeCurrent: if true then any item at the initial position will be also emitted
rather than just further ones.
alias of
WordDocumentChartQuickNavItem
Fetches a Microsoft Word collection object from a Microsoft Word range object. E.g. HyperLinks from a range. @param rangeObj: a Microsoft Word range object. @return: a Microsoft Word collection object.
Only allows certain items fom a collection to be emitted. E.g. a table who’s borders are enabled. @param item: an item from a Microsoft Word collection (e.g. HyperLink object). @return True if this item should be allowd, false otherwise. @rtype: bool
- class NVDAObjects.window.winword.LazyControlField_RowAndColumnHeaderText(ti)
Bases:
ControlField
- get(name, default=None)
Return the value for key if key is in the dictionary, else default.
- class NVDAObjects.window.winword.WordDocumentTextInfo(*args, **kwargs)
Bases:
TextInfo
Constructor. Subclasses must extend this, calling the superclass method first. @param position: The initial position of this range; one of the POSITION_* constants or a position object supported by the implementation. @param obj: The object containing the range of text being represented.
- _get_unit_mouseChunk()
- _get_locationText()
A message that explains the location of the text position in friendly terms.
- copyToClipboard(notify)
Copy the content of this instance to the clipboard. @return: C{True} if successful, C{False} otherwise. @rtype: bool @param notify: whether to emit a confirmation message @type notify: boolean
- find(text, caseSensitive=False, reverse=False)
Locates the given text and positions this TextInfo object at the start. @param text: the text to search for @type text: string @param caceSensitive: true if case sensitivity search should be used, False if not @type caseSensitive: bool @param reverse: true then the search will go from current position towards the start of the text, if false then towards the end. @type reverse: bool @returns: True if text is found, false otherwise @rtype: bool
- shouldIncludeLayoutTables = True
- activate()
Activate this position. For example, this might activate the object at this position or click the point at this position. @raise NotImplementedError: If not supported.
- _expandToLineAtCaret()
- getTextWithFields(formatConfig: Dict | None = None) List[str | FieldCommand]
Retrieves 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. @param formatConfig: Document formatting configuration, useful if you wish to force a particular
configuration for a particular task.
@return: A sequence of text strings interspersed with associated field commands.
- _normalizeControlField(field)
- _normalizeFormatField(field, extraDetail=False)
- expand(unit)
Expands the start and end of this text info object to a given unit @param unit: a unit constant @type unit: string
- compareEndPoints(other, which)
compares one end of this range to one end of another range. Subclasses must implement this. @param other: the text range to compare with. @type other: L{TextInfo} @param which: The ends to compare; one of “startToStart”, “startToEnd”, “endToStart”, “endToEnd”. @return: -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. @rtype: int
- setEndPoint(other, which)
Sets one end of this range to one end of another range. Subclasses must implement this. @param other: The range from which an end is being obtained. @type other: L{TextInfo} @param which: The ends to use; one of “startToStart”, “startToEnd”, “endToStart”, “endToEnd”.
- _get_isCollapsed()
@return: C{True} if representing a collapsed range, C{False} if the range is expanded to cover one or more characters. @rtype: bool
- collapse(end=False)
Collapses this text info object so that both endpoints are the same. @param end: Whether to collapse to the end; C{True} to collapse to the end, C{False} to collapse to the start. @type end: bool
- copy()
duplicates this text info object so that changes can be made to either one with out afecting the other
- _get_text()
The text with in this range. Subclasses must implement this. @return: The text. @note: The text is not guaranteed to be the exact length of the range in offsets.
- _move(unit, direction, endPoint=None, _rangeObj=None)
- move(unit, direction, endPoint=None)
Moves one or both of the endpoints of this object by the given unit and direction. @param unit: the unit to move by; one of the UNIT_* constants. @param direction: a positive value moves forward by a number of units, a negative value moves back a number of units @type: int @param 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. @return: The number of units moved;
negative indicates backward movement, positive indicates forward movement, 0 means no movement.
@rtype: int
- _get_bookmark()
- _get_pointAtStart()
Retrieves x and y coordinates corresponding with the textInfo start. It should return Point. The base implementation uses L{boundingRects}. @rtype: L{locationHelper.Point}
- updateCaret()
Moves the system caret to the position of this text info object
- updateSelection()
Moves the selection (usually the system caret) to the position of this text info object
- getMathMl(field)
Get MathML for a math control field. This will only be called for control fields with a role of L{controlTypes.Role.MATH}. @raise LookupError: If MathML can’t be retrieved for this field.
- _abc_impl = <_abc._abc_data object>
- bookmark
- isCollapsed
- locationText
- pointAtStart
- text: str
Typing information for auto-property: _get_text
- unit_mouseChunk
- class NVDAObjects.window.winword.BrowseModeWordDocumentTextInfo(*args, **kwargs)
Bases:
BrowseModeDocumentTextInfo
,RootProxyTextInfo
Constructor. Subclasses must extend this, calling the superclass method first. @param position: The initial position of this range; one of the POSITION_* constants or a position object supported by the implementation. @param obj: The object containing the range of text being represented.
- _get_focusableNVDAObjectAtStart()
retreaves the deepest focusable NVDAObject related to the start of the range. Usually it is just the owner NVDAObject, but in the case of virtualBuffers it may be a descendant object. @returns: the NVDAObject at the start
- _abc_impl = <_abc._abc_data object>
- focusableNVDAObjectAtStart
- class NVDAObjects.window.winword.WordDocumentTreeInterceptor(*args, **kwargs)
Bases:
BrowseModeDocumentTreeInterceptor
- TextInfo
alias of
BrowseModeWordDocumentTextInfo
- _nativeAppSelectionMode: bool = True
Whether native selection mode is turned on or off
- _activateLongDesc(controlField)
Activates (presents) the long description for a particular field (usually a graphic). @param controlField: the field who’s long description should be activated. This field is guaranteed to have states containing HASLONGDESC state. @type controlField: dict
- _get_isAlive()
Whether this interceptor is alive. If it is not alive, it will be removed.
- _get_ElementsListDialog()
- _iterHeadings(nodeType, direction, rangeObj, includeCurrent)
- _iterNodesByType(nodeType, direction='next', pos=None)
Yields L{QuickNavItem} objects representing the ordered positions in this document according to the type being searched for (e.g. link, heading, table etc). @param itemType: the type being searched for (e.g. link, heading, table etc) @type itemType: string @param direction: the direction in which to search (next, previous, up) @type direction: string @param pos: the position in the document from where to start the search. @type pos: Usually an L{textInfos.TextInfo} @raise NotImplementedError: This type is not supported by this BrowseMode implementation
- _activatePosition(info=None)
- script_nextRow(gesture)
moves to the next table row
- script_previousRow(gesture)
moves to the previous table row
- script_nextColumn(gesture)
moves to the next table column
- script_previousColumn(gesture)
moves to the previous table column
- _iterTextStyle(kind: str, direction: _Movement = _Movement.NEXT, pos: TextInfo | None = None) Generator[TextInfoQuickNavItem, None, None]
- __gestures = {'kb:control+alt+downArrow': 'nextRow', 'kb:control+alt+leftArrow': 'previousColumn', 'kb:control+alt+rightArrow': 'nextColumn', 'kb:control+alt+upArrow': 'previousRow', 'kb:pageDown': None, 'kb:pageUp': None, 'kb:shift+pageDown': None, 'kb:shift+pageUp': None, 'kb:shift+tab': 'trapNonCommandGesture', 'kb:tab': 'trapNonCommandGesture'}
- ElementsListDialog
- _abc_impl = <_abc._abc_data object>
- isAlive
- class NVDAObjects.window.winword.WordDocument(chooseBestAPI=True, **kwargs)
Bases:
Window
- winwordColorToNVDAColor(val)
- _get_WinwordVersion()
- _get_documentWindowHandle()
- _get_WinwordWindowObject()
- _get_WinwordDocumentObject()
- _get_WinwordApplicationObject()
- _get_WinwordSelectionObject()
- _WaitForValueChangeForAction(action, fetcher, timeout=0.15)
- script_toggleBold(gesture)
- script_toggleItalic(gesture)
- script_toggleUnderline(gesture)
- script_toggleAlignment(gesture)
- script_changeParagraphLeftIndent(gesture)
- script_toggleSuperscriptSubscript(gesture)
- script_moveParagraphDown(gesture)
- script_moveParagraphUp(gesture)
- script_increaseDecreaseOutlineLevel(gesture)
- script_increaseDecreaseFontSize(gesture)
- script_toggleDisplayNonprintingCharacters(gesture)
- script_tab(gesture)
- reportTab()
- getLocalizedMeasurementTextForPointSize(offset)
- script_changeLineSpacing(gesture)
- script_changeParagraphSpacing(gesture: inputCore.InputGesture)
- WinwordApplicationObject
- WinwordDocumentObject
- WinwordSelectionObject
- WinwordVersion
- WinwordWindowObject
- _abc_impl = <_abc._abc_data object>
- documentWindowHandle
- initOverlayClass()
- __gestures = {'kb:alt+shift+downArrow': 'moveParagraphDown', 'kb:alt+shift+leftArrow': 'increaseDecreaseOutlineLevel', 'kb:alt+shift+rightArrow': 'increaseDecreaseOutlineLevel', 'kb:alt+shift+upArrow': 'moveParagraphUp', 'kb:control+0': 'changeParagraphSpacing', 'kb:control+1': 'changeLineSpacing', 'kb:control+2': 'changeLineSpacing', 'kb:control+5': 'changeLineSpacing', 'kb:control+=': 'toggleSuperscriptSubscript', 'kb:control+[': 'increaseDecreaseFontSize', 'kb:control+]': 'increaseDecreaseFontSize', 'kb:control+alt+1': 'increaseDecreaseOutlineLevel', 'kb:control+alt+2': 'increaseDecreaseOutlineLevel', 'kb:control+alt+3': 'increaseDecreaseOutlineLevel', 'kb:control+b': 'toggleBold', 'kb:control+e': 'toggleAlignment', 'kb:control+i': 'toggleItalic', 'kb:control+j': 'toggleAlignment', 'kb:control+l': 'toggleAlignment', 'kb:control+m': 'changeParagraphLeftIndent', 'kb:control+pageDown': 'caret_moveByLine', 'kb:control+pageUp': 'caret_moveByLine', 'kb:control+r': 'toggleAlignment', 'kb:control+shift+,': 'increaseDecreaseFontSize', 'kb:control+shift+.': 'increaseDecreaseFontSize', 'kb:control+shift+8': 'toggleDisplayNonprintingCharacters', 'kb:control+shift+=': 'toggleSuperscriptSubscript', 'kb:control+shift+m': 'changeParagraphLeftIndent', 'kb:control+shift+n': 'increaseDecreaseOutlineLevel', 'kb:control+shift+t': 'changeParagraphLeftIndent', 'kb:control+t': 'changeParagraphLeftIndent', 'kb:control+u': 'toggleUnderline', 'kb:shift+tab': 'tab', 'kb:tab': 'tab'}
- class NVDAObjects.window.winword.WordDocument_WwN(chooseBestAPI=True, **kwargs)
Bases:
WordDocument
- WinwordWindowObject
- _abc_impl = <_abc._abc_data object>
- documentWindowHandle
- _get_documentWindowHandle()
- _get_WinwordWindowObject()
- __gestures = {'kb:shift+tab': None, 'kb:tab': None}
- class NVDAObjects.window.winword.ElementsListDialog(document)
Bases:
ElementsListDialog
- ELEMENT_TYPES = (('link', 'Lin&ks'), ('heading', '&Headings'), ('annotation', '&Annotations'), ('chart', '&Charts'), ('error', '&Errors'))