NVDAObjects.UIA package
Support for UI Automation (UIA) controls.
- class NVDAObjects.UIA.UIATextInfo(*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.
- _cache_controlFieldNVDAObjectClass = True
- _get_controlFieldNVDAObjectClass()
The NVDAObject class to be used by the _getTextWithFieldsForUIARange method when instantiating NVDAObjects in order to generate control fields for content. L{UIA} is usually what you want, but if you know the class will always mutate to a certain subclass (E.g. WordDocumentNode) then performance gains can be made by returning the subclass here.
- _controlFieldUIACachedPropertyIDs = {30005, 30006, 30007, 30008, 30009, 30010, 30013, 30019, 30025, 30036, 30043, 30045, 30046, 30047, 30062, 30063, 30064, 30065, 30068, 30070, 30079, 30084, 30085, 30086, 30101, 30102, 30103, 30152, 30153, 30154, 30157, 30159}
- _get__controlFieldUIACacheRequest()
The UIA cacheRequest object that will be used when fetching all UIA elements needed when generating control fields for this TextInfo’s content.
- UIAFormatUnits = [1, 2, 0]
The UI Automation text units (in order of resolution) that should be used when fetching formatting.
- 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
- _getFormatFieldFontName(fetch: Callable[[int], int], formatField: FormatField)
- _getFormatFieldFontSize(fetch: Callable[[int], int], formatField: FormatField)
- _getFormatFieldFontAttributes(fetch: Callable[[int], int], formatField: FormatField)
- _getFormatFieldSuperscriptsAndSubscripts(fetch: Callable[[int], int], formatField: FormatField)
- _getFormatFieldStyle(fetch: Callable[[int], int], formatField: FormatField)
- _getFormatFieldIndent(fetch: Callable[[int], int], formatField: FormatField)
Helper function to get indent formatting from UIA, using the fetch function passed as parameter. The indent formatting is reported according to MS Word’s convention. @param fetch: gets formatting information from UIA. @return: The indent formatting informations corresponding to what has been retrieved via the fetcher.
- _getFormatFieldAlignment(fetch: Callable[[int], int], formatField: FormatField)
- _getFormatFieldColor(fetch: Callable[[int], int], formatField: FormatField)
- _getFormatFieldLineSpacing(fetch: Callable[[int], int], formatField: FormatField)
- _getFormatFieldLinks(fetch: Callable[[int], int], formatField: FormatField)
- _getFormatFieldHeadings(fetch: Callable[[int], int], formatField: FormatField)
- _getFormatFieldAnnotationTypes(fetch: Callable[[int], int], formatField: FormatField, formatConfig: Dict)
- _getFormatFieldCulture(fetch: Callable[[int], int], formatField: FormatField)
- _getFormatFieldAtRange(textRange: IUIAutomationTextRangeT, formatConfig: Dict, ignoreMixedValues: bool = False) FormatField
Fetches formatting for the given UI Automation Text range. @param textRange: the text range whos formatting should be fetched. @param formatConfig: the types of formatting requested. @type formatConfig: a dictionary of NVDA document formatting configuration keys
with values set to true for those types that should be fetched.
- @param ignoreMixedValues: If True, formatting that is mixed according to UI Automation will not be included.
If False, L{UIAHandler.utils.MixedAttributeError} will be raised if UI Automation gives back a mixed attribute value signifying that the caller may want to try again with a smaller range.
@return: The formatting for the given text range.
- _getIndentValueDisplayString(val: float) str
A function returning the string to display in formatting info. @param val: an indent value measured in points, fetched via
an UIAHandler.UIA_Indentation*AttributeId attribute.
@return: The string used in formatting information to report the length of an indentation.
- _rangeObj: IUIAutomationTextRangeT
- _get_NVDAObjectAtStart()
Get the 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
- _get_UIAElementAtStart()
Fetches the deepest UIA element at the start of the text range. This may be via UIA’s getChildren (in the case of embedded controls), or GetEnClosingElement.
- _get_bookmark()
- UIAControlTypesWhereNameIsContent = {50000, 50005, 50006, 50011, 50019, 50020, 50031}
- _getControlFieldForUIAObject(obj: UIA, isEmbedded=False, startOfNode=False, endOfNode=False) ControlField
Fetch control field information for the given UIA NVDAObject. @param obj: the NVDAObject the control field is for. @param isEmbedded: True if this NVDAObject is for a leaf node (has no useful children). @param startOfNode: True if the control field represents the very start of this object. @param endOfNode: True if the control field represents the very end of this object. @return: The control field for this object
- _getTextFromUIARange(textRange: IUIAutomationTextRangeT) str
Fetches plain text from the given UI Automation text range. Just calls getText(-1). This only exists to be overridden for filtering.
- _getTextWithFields_text(textRange: IUIAutomationTextRangeT, formatConfig: Dict, UIAFormatUnits: List[int] | None = None) Generator[FieldCommand, None, None]
Yields format fields and text for the given UI Automation text range, split up by the first available UI Automation text unit that does not result in mixed attribute values. @param textRange: the UI Automation text range to walk. @param formatConfig: a dictionary of NVDA document formatting configuration keys
with values set to true for those types that should be fetched.
- @param UIAFormatUnits: the UI Automation text units (in order of resolution) that should be used to split the text so as to avoid mixed attribute values. This is None by default.
If the parameter is a list of 1 or more units, The range will be split by the first unit in the list, and this method will be recursively run on each subrange, with the remaining units in this list given as the value of this parameter. If this parameter is an empty list, then formatting and text is fetched for the entire range, but any mixed attribute values are ignored and no splitting occures. If this parameter is None, text and formatting is fetched for the entire range in one go, but if mixed attribute values are found, it will split by the first unit in self.UIAFormatUnits, and run this method recursively on each subrange, providing the remaining units from self.UIAFormatUnits as the value of this parameter.
- _getTextWithFieldsForUIARange(rootElement: IUIAutomationElement, textRange: IUIAutomationTextRangeT, formatConfig: Dict, includeRoot: bool = False, alwaysWalkAncestors: bool = True, recurseChildren: bool = True, _rootElementClipped: Tuple[bool, bool] = (True, True)) Generator[str | FieldCommand, None, None]
Yields start and end control fields, and text, for the given UI Automation text range. @param rootElement: the highest ancestor that encloses the given text range. This function will not walk higher than this point. @param textRange: the UI Automation text range whos content should be fetched. @param formatConfig: the types of formatting requested. @type formatConfig: a dictionary of NVDA document formatting configuration keys
with values set to true for those types that should be fetched.
@param includeRoot: If true, then a control start and end will be yielded for the root element. @param alwaysWalkAncestors: If true then control fields will be yielded for any element enclosing the given text range, that is a descendant of the root element. If false then the root element may be assumed to be the only ancestor. @param recurseChildren: If true, this function will be recursively called for each child of the given text range, clipped to the bounds of this text range. Formatted text between the children will also be yielded. If false, only formatted text will be yielded. @param _rootElementClipped: Indicates if textRange represents all of the given rootElement,
or is clipped at the start or end.
- 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.
- _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.
- _getBoundingRectsFromUIARange(textRange: IUIAutomationTextRangeT) RectLTWH
Fetches per line bounding rectangles from the given UI Automation text range. Note that if the range object doesn’t cover a whole line (e.g. a character), the bounding rectangle will be restricted to the range.
- _get_boundingRects()
Per line bounding rectangles for the visible text in this range. Implementations should ensure that the bounding rectangles don’t contain off screen coordinates. @rtype: [L{locationHelper.RectLTWH}] @raise NotImplementedError: If not supported. @raise LookupError: If not available (i.e. off screen, hidden, etc.)
- expand(unit: str) None
Expands the start and end of this text info object to a given unit @param unit: a unit constant @type unit: string
- move(unit: str, direction: int, endPoint: str | None = 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
- copy()
duplicates this text info object so that changes can be made to either one with out afecting the other
- collapse(end: bool = 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
- compareEndPoints(other: UIATextInfo, which: str)
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: UIATextInfo, which: str)
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”.
- updateSelection()
Moves the selection (usually the system caret) to the position of this text info object
- updateCaret() None
Moves the system caret to the position of this text info object
- NVDAObjectAtStart: NVDAObjects.NVDAObject
Typing information for auto-property: _get_NVDAObjectAtStart
- UIAElementAtStart
- _abc_impl = <_abc._abc_data object>
- _controlFieldUIACacheRequest
- bookmark
- boundingRects
- controlFieldNVDAObjectClass
- text: str
Typing information for auto-property: _get_text
- class NVDAObjects.UIA.UIA(chooseBestAPI=True, **kwargs)
Bases:
Window
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _UIACustomProps = <UIAHandler.customProps.CustomPropertiesCommon object>
- _UIACustomAnnotationTypes = <UIAHandler.customAnnotations.CustomAnnotationTypesCommon object>
- shouldAllowDuplicateUIAFocusEvent = False
- _get__coreCycleUIAPropertyCacheElementCache()
A dictionary per core cycle that is ready to map UIA property IDs to UIAElements with that property already cached. An example of where multiple cache elements may exist would be where the UIA NVDAObject was instantiated with a UIA element already containing a UI Automation cache (appropriate for generating control fields) but another UIA NVDAObject property (E.g. states) has a set of UIA properties of its own which should be bulk-fetched, and did not exist in the original cache.
- _getUIACacheablePropertyValue(ID, ignoreDefault=False)
Fetches the value for a UI Automation property from an element cache available in this core cycle. If not cached then a new value will be fetched.
- _prefetchUIACacheForPropertyIDs(IDs)
Fetch values for all the given UI Automation property IDs in one cache request, making them available for this core cycle.
- 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, ignoreNonNativeElementsWithFocus=True)
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
- getNormalizedUIATextRangeFromElement(UIAElement)
Simply fetches a UIA text range for the given UIAElement, allowing subclasses to process the range first.
- _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
- event_gainFocus()
This code is executed if a gain focus event is received by this object.
- event_loseFocus()
- _get_shouldAllowUIAFocusEvent()
- _lastLiveRegionChangeInfo = (None, None)
Keeps track of the last live region change (text, time)
- _get__shouldAllowUIALiveRegionChangeEvent()
This property decides whether a live region change event should be allowed. It compaires live region event with the last one received, only allowing the event if the text (name) is different, or if the time since the last one is at least 0.5 seconds.
- _getUIAPattern(ID, interface, cache=False)
- _get_UIAInvokePattern()
- _get_UIAGridPattern()
- _get_UIARangeValuePattern()
- _get_UIAValuePattern()
- _get_UIATogglePattern()
- _get_UIASelectionItemPattern()
- _get_UIASelectionPattern()
- _get_UIASelectionPattern2()
- getSelectedItemsCount(maxItems=None)
Fetches the number of descendants currently selected. For performance, this method will only count up to the given maxCount number, and if there is one more above that, then sys.maxint is returned stating that many items are selected.
- _get_selectionContainer() UIA | None
An ancestor NVDAObject which manages the selection for this object and other descendants.
- UIAAnnotationObjects: Dict[int, IUIAutomationElement]
typing for auto-property: UIAAnnotationObjects
- _get_UIAAnnotationObjects() Dict[int, IUIAutomationElement]
Returns this UIAElement’s annotation objects, in a dict keyed by their annotation type ID.
- _get_UIATextPattern()
- _get_UIATableItemPattern()
- _get_UIATextEditPattern()
- _get_UIALegacyIAccessiblePattern()
- _TextInfo
alias of
UIATextInfo
- _cache_TextInfo = False
- _get_TextInfo()
- setFocus()
Tries to force this object to take the focus.
- _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.
- _get_UIAAutomationId()
- _get_UIAFrameworkId() str
- name: str
Typing info for auto property _get_name()
- _get_name() str
The name or label of this object (example: the text of a button).
- _get_liveRegionPoliteness()
Retrieves the priority with which updates to live regions should be treated. The base implementation returns C{aria.AriaLivePoliteness.OFF}, indicating that the object isn’t a live region. Subclasses supporting live region events must implement this.
- _get_role()
The role or type of control this object represents (example: button, list, dialog).
- _get_UIAFullDescription()
- _get_UIAHelpText()
- _get_description()
The description or help text of this object.
- _get_keyboardShortcut()
The shortcut key that activates this object(example: alt+t). @rtype: str
- _UIAStatesPropertyIDs = {30008, 30009, 30010, 30019, 30022, 30025, 30036, 30046, 30070, 30079, 30086, 30103, 30138, 30155}
- _get_states()
Retrieves the current states of this object (example: selected, focused). @return: a set of State constants from L{controlTypes}.
- _getReadOnlyState() bool
- _get_presentationType()
- correctAPIForRelation(obj, relation=None)
- _get_parent()
Retrieves this object’s parent (the object that contains this object). @return: the parent 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_next() UIA | None
Retrieves the object directly after this object with the same parent. @return: the next 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_UIAChildren()
- _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}
- _get_childCount()
Retrieves the number of children this object contains. @rtype: int
- _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
- _getTextFromHeaderElement(element: IUIAutomationElement) str | None
- _get_rowHeaderText()
The text of the row headers for this cell. @rtype: str
- _get_columnNumber()
Retrieves the column number of this object if it is in a table. @rtype: int
- _get_columnSpan()
The number of columns spanned by this cell. @rtype: int
- _get_columnHeaderText()
The text of the column headers for this cell. @rtype: str
- _get_rowCount()
Retrieves the number of rows this object contains if its a table. @rtype: int
- _get_columnCount()
Retrieves the number of columns this object contains if its a table. @rtype: int
- _get_table()
Retrieves the object that represents the table that this object is contained in, if this object is a table cell. @rtype: L{NVDAObject}
- _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_processID()
Retrieves an identifier of the process this object is a part of.
- _get_location()
The location of this object on the screen. @return: left, top, width and height of the object. @rtype: tuple of int
- _get_UIAValue() str | None
- _get_UIARangeValue() float | None
- _get_value() str | None
The value of this object (example: the current percentage of a scrollbar, the selected option in a combo box).
- _get_actionCount()
Retrieves the number of actions supported by this object.
- getActionName(index=None)
Retrieves the name of an action supported by this object. If index is not given then the default action will be used if it exists. @param index: the optional 0-based index of the wanted action. @type index: int @return: the action’s name @rtype: str
- doAction(index=None)
Performs an action supported by this object. If index is not given then the default action will be used if it exists.
- _get_hasFocus()
Whether this object has focus. @rtype: bool
- _get_hasIrrelevantLocation()
Returns whether the location of this object is irrelevant for mouse or magnification tracking or highlighting, either because it is programatically hidden (State.INVISIBLE), off screen or the object has no location.
- _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.
- scrollIntoView()
Scroll this object into view on the screen if possible.
- isDescendantOf(obj: NVDAObject) bool
is this object a descendant of obj?
- _get_controllerFor()
Retrieves the object/s that this object controls.
- event_UIA_controllerFor() None
- event_UIA_elementSelected()
- event_valueChange()
- event_UIA_systemAlert()
A base implementation for UI Automation’s system Alert event. This just reports the element that received the alert in speech and braille, similar to how focus is presented. Skype for business toast notifications being one example.
- event_UIA_notification(notificationKind: int | None = None, notificationProcessing: int | None = 4, displayString: str | None = None, activityId: str | None = None)
Introduced in Windows 10 Fall Creators Update (build 16299). This base implementation announces all notifications from the UIA element. Unlike other events, the text to be announced is not the name of the object, and parameters control how the incoming notification should be processed. Subclasses can override this event and can react to notification processing instructions.
- event_UIA_dragDropEffect()
- event_UIA_dropTargetEffect()
- TextInfo
The TextInfo class this object should use to provide access to text. @type: type; L{textInfos.TextInfo}
- UIAAutomationId
- UIAChildren
- UIAFrameworkId
- UIAFullDescription
- UIAGridPattern
- UIAHelpText
- UIAInvokePattern
- UIALegacyIAccessiblePattern
- UIARangeValue
- UIARangeValuePattern
- UIASelectionItemPattern
- UIASelectionPattern
- UIASelectionPattern2
- UIATableItemPattern
- UIATextEditPattern
- UIATextPattern
- UIATogglePattern
- UIAValue
- UIAValuePattern
- _abc_impl = <_abc._abc_data object>
- _coreCycleUIAPropertyCacheElementCache
- _shouldAllowUIALiveRegionChangeEvent
- actionCount
- childCount
- children: List['NVDAObject']
Type definition for auto prop ‘_get_children’
- columnCount
- columnHeaderText
- columnNumber
- columnSpan
- controllerFor
- description: str
Typing information for auto property _get_description
- devInfo: List[str]
Information about this object useful to developers.
- firstChild: Optional['NVDAObject']
Type definition for auto prop ‘_get_firstChild’
- hasFocus: bool
Type definition for auto prop ‘_get_hasFocus’
- hasIrrelevantLocation
- keyboardShortcut
- lastChild: Optional['NVDAObject']
Type definition for auto prop ‘_get_lastChild’
- liveRegionPoliteness
- location
- parent: Optional['NVDAObject']
This object’s parent (the object that contains this object).
- positionInfo: Dict[str, int]
Type definition for auto prop ‘_get_positionInfo’
- presentationType
- previous: Optional['NVDAObject']
The object directly before this object with the same parent.
- processID: int
Type definition for auto prop ‘_get_processID’
- role: controlTypes.Role
Type definition for auto prop ‘_get_role’
- rowCount
- rowHeaderText
- rowNumber
- rowSpan
- shouldAllowUIAFocusEvent
- states: Set[controlTypes.State]
- table
- tableID
- value: str
Typing information for auto property _get_value
- class NVDAObjects.UIA.InaccurateTextChangeEventEmittingEditableText(chooseBestAPI=True, **kwargs)
Bases:
EditableTextBase
,UIA
InaccurateTextChangeEventEmittingEditableText is deprecated without a replacement.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.XamlEditableText(chooseBestAPI=True, **kwargs)
Bases:
EditableTextBase
,UIA
An UIA element with editable text exposed by the XAML framework.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.TreeviewItem(chooseBestAPI=True, **kwargs)
Bases:
UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _get_value()
The value of this object (example: the current percentage of a scrollbar, the selected option in a combo box).
- _get__level()
- _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>
- _level
- positionInfo: Dict[str, int]
Type definition for auto prop ‘_get_positionInfo’
- value: str
Typing information for auto property _get_value
- class NVDAObjects.UIA.MenuItem(chooseBestAPI=True, **kwargs)
Bases:
UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _get_description()
The description or help text of this object.
- _abc_impl = <_abc._abc_data object>
- description: str
Typing information for auto property _get_description
- class NVDAObjects.UIA.UIColumnHeader(chooseBestAPI=True, **kwargs)
Bases:
UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _get_description()
The description or help text of this object.
- _abc_impl = <_abc._abc_data object>
- description: str
Typing information for auto property _get_description
- class NVDAObjects.UIA.UIItem(chooseBestAPI=True, **kwargs)
Bases:
UIA
UIA list items in an Items View repeate the name as the value
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _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.
- _get_value()
The value of this object (example: the current percentage of a scrollbar, the selected option in a combo box).
- _abc_impl = <_abc._abc_data object>
- positionInfo: Dict[str, int]
Type definition for auto prop ‘_get_positionInfo’
- value: str
Typing information for auto property _get_value
- class NVDAObjects.UIA.SensitiveSlider(chooseBestAPI=True, **kwargs)
Bases:
UIA
A slider that tends to give focus to its thumb control
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- event_focusEntered()
- event_valueChange()
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.ControlPanelLink(chooseBestAPI=True, **kwargs)
Bases:
UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _get_description()
The description or help text of this object.
- _abc_impl = <_abc._abc_data object>
- description: str
Typing information for auto property _get_description
- class NVDAObjects.UIA.ComboBoxWithoutValuePattern(chooseBestAPI=True, **kwargs)
Bases:
UIA
A combo box without the Value pattern. UIA combo boxes don’t necessarily support the Value pattern unless they take arbitrary text values. However, NVDA expects combo boxes to have a value and to fire valueChange events. The value is obtained by retrieving the selected item’s name. The valueChange event is fired on this object by L{ListItem.event_stateChange}.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _get_UIASelectionPattern()
- _get_value()
The value of this object (example: the current percentage of a scrollbar, the selected option in a combo box).
- UIASelectionPattern
- _abc_impl = <_abc._abc_data object>
- value: str
Typing information for auto property _get_value
- class NVDAObjects.UIA.ListItem(chooseBestAPI=True, **kwargs)
Bases:
UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- event_stateChange()
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.Dialog(chooseBestAPI=True, **kwargs)
Bases:
Dialog
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.Toast_win8(chooseBestAPI=True, **kwargs)
Bases:
Notification
,UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- event_UIA_toolTipOpened()
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.Toast_win10(chooseBestAPI=True, **kwargs)
Bases:
Notification
,UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _lastToastTimestamp = None
- _lastToastRuntimeID = None
- event_UIA_window_windowOpen()
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.ToolTip(chooseBestAPI=True, **kwargs)
-
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- event_UIA_toolTipOpened()
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.WpfTextView(chooseBestAPI=True, **kwargs)
Bases:
EditableTextBase
,UIA
WpfTextView fires name state changes once a second, plus when IUIAutomationTextRange::GetAttributeValue is called. This causes major lag when using this control with Braille in NVDA. (#2759) For now just ignore the events.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- event_nameChange()
- event_stateChange()
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.SearchField(chooseBestAPI=True, **kwargs)
Bases:
EditableTextWithSuggestions
,UIA
An edit field that presents suggestions based on a search term. This is now an empty class as functionality has been moved to the base EditableText behaviour.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.SuggestionsList(chooseBestAPI=True, **kwargs)
Bases:
UIA
A list of suggestions in response to search terms being entered. This list shows suggestions without selecting the top suggestion. Examples include suggestions lists in modern apps such as Settings app in Windows 10 and later.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _abc_impl = <_abc._abc_data object>
- event_UIA_layoutInvalidated()
- class NVDAObjects.UIA.SuggestionListItem(chooseBestAPI=True, **kwargs)
Bases:
UIA
Recent Windows releases use suggestions lists for various things, including Start menu suggestions, Store, Settings app and so on. Unlike suggestions list class, top suggestion is automatically selected. Note that support for reporting the selection is now handled generically on the base NVDAObject.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _abc_impl = <_abc._abc_data object>
- role: controlTypes.Role = 15
Type definition for auto prop ‘_get_role’
- class NVDAObjects.UIA.NetUIDropdownAnchor(chooseBestAPI=True, **kwargs)
Bases:
UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _abc_impl = <_abc._abc_data object>
- name: str
Typing info for auto property _get_name()
- _get_name()
The name or label of this object (example: the text of a button).
- class NVDAObjects.UIA.PlaceholderNetUITWMenuItem(chooseBestAPI=True, **kwargs)
Bases:
UIA
Bounces focus from a netUI dead placeholder menu item when no item is selected up to the menu itself.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _abc_impl = <_abc._abc_data object>
- focusRedirect
- shouldAllowUIAFocusEvent = True
- _get_focusRedirect()
- class NVDAObjects.UIA.DevExpressXtraRichEdit(chooseBestAPI=True, **kwargs)
Bases:
UIA
“At least some versions of the DevExpress Xtra Rich Edit control have a broken implementation of the UIA Text Pattern. Work around this by checking whether the document range is valid.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- TextInfo
The TextInfo class this object should use to provide access to text. @type: type; L{textInfos.TextInfo}
- _abc_impl = <_abc._abc_data object>
- _get_TextInfo()
- class NVDAObjects.UIA.ProgressBar(chooseBestAPI=True, **kwargs)
Bases:
UIA
,ProgressBar
#12727: In the past, UIA progress bars could have a different range than what could be expected from a progress bar, i.e. a percentage from 0 to 100. This overlay class ensures that the reported value wil be between the accepted range of progress bar values.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _abc_impl = <_abc._abc_data object>
- value: str
Typing information for auto property _get_value
- _get_value() str | None
The value of this object (example: the current percentage of a scrollbar, the selected option in a combo box).
Submodules
NVDAObjects.UIA.VisualStudio module
Object overlay classes for Visual Studio components available in Visual Studio and SQL Server Management Studio.
- class NVDAObjects.UIA.VisualStudio.IntelliSenseItem(chooseBestAPI=True, **kwargs)
Bases:
UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _get_name()
The name or label of this object (example: the text of a button).
- event_UIA_elementSelected()
- _abc_impl = <_abc._abc_data object>
- name: str
Typing info for auto property _get_name()
- class NVDAObjects.UIA.VisualStudio.IntelliSenseList(chooseBestAPI=True, **kwargs)
Bases:
UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.VisualStudio.IntelliSenseLiveRegion(chooseBestAPI=True, **kwargs)
Bases:
UIA
Visual Studio uses both Intellisense menu item objects and a live region to communicate Intellisense selections. NVDA uses the menu item approach and therefore the live region provides doubled information and is disabled.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _shouldAllowUIALiveRegionChangeEvent = False
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.VisualStudio.CompletionToolTip(chooseBestAPI=True, **kwargs)
Bases:
ToolTip
A tool tip for which duplicate open events can be fired.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _lastToolTipOpenedInfo = (None, None)
Keeps track of the last ToolTipOpened event (text, time)
- _preventDuplicateToolTipSeconds = 0.2
The duplicate tooltip events will be dropped within this time window
- event_UIA_toolTipOpened()
- _abc_impl = <_abc._abc_data object>
- NVDAObjects.UIA.VisualStudio.findExtraOverlayClasses(obj, clsList)
NVDAObjects.UIA.anaheimEdge module
UIA.anaheim_edge module for specialisations required for Chromium based Edge (code name anaheim). Note that the UIA.chromium module provides base behaviour for all Chromium based browsers, whereas this (anaheim_edge) module is only concerned with the window chrome / widgets that are specific to the browser.
This file is currently a placeholder, this line can be deleted when this file is populated. Normally blank files would not be included in NVDA’s repository, however in this case it has been in order to head off any confusion between the two very different implementations of Edge.
NVDAObjects.UIA.chromium module
- class NVDAObjects.UIA.chromium.ChromiumUIATextInfo(*args, **kwargs)
Bases:
UIAWebTextInfo
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.
- expand(unit)
Expands the start and end of this text info object to a given unit @param unit: a unit constant @type unit: string
- _getFormatFieldAtRange(textRange, formatConfig, ignoreMixedValues=False)
Fetches formatting for the given UI Automation Text range. @param textRange: the text range whos formatting should be fetched. @param formatConfig: the types of formatting requested. @type formatConfig: a dictionary of NVDA document formatting configuration keys
with values set to true for those types that should be fetched.
- @param ignoreMixedValues: If True, formatting that is mixed according to UI Automation will not be included.
If False, L{UIAHandler.utils.MixedAttributeError} will be raised if UI Automation gives back a mixed attribute value signifying that the caller may want to try again with a smaller range.
@return: The formatting for the given text range.
- _getControlFieldForUIAObject(obj, isEmbedded=False, startOfNode=False, endOfNode=False)
Fetch control field information for the given UIA NVDAObject. @param obj: the NVDAObject the control field is for. @param isEmbedded: True if this NVDAObject is for a leaf node (has no useful children). @param startOfNode: True if the control field represents the very start of this object. @param endOfNode: True if the control field represents the very end of this object. @return: The control field for this object
- _abc_impl = <_abc._abc_data object>
- _rangeObj: IUIAutomationTextRangeT
- class NVDAObjects.UIA.chromium.ChromiumUIA(chooseBestAPI=True, **kwargs)
Bases:
UIAWeb
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _TextInfo
alias of
ChromiumUIATextInfo
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.chromium.ChromiumUIATreeInterceptor(*args, **kwargs)
Bases:
UIAWebTreeInterceptor
- _get_documentConstantIdentifier()
Get the constant identifier for this document. This identifier should uniquely identify all instances (not just one instance) of a document for at least the current session of the hosting application. Generally, the document URL should be used. Although the name of this property suggests that the identifier will be constant, With the introduction of SPAs (single page apps) the URL of a page may dynamically change over time. this property should reflect the most up to date URL. @return: The constant identifier for this document, C{None} if there is none.
- _abc_impl = <_abc._abc_data object>
- documentConstantIdentifier: str | None
Typing information for auto-property: _get_documentConstantIdentifier
- class NVDAObjects.UIA.chromium.ChromiumUIADocument(chooseBestAPI=True, **kwargs)
Bases:
ChromiumUIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- treeInterceptorClass
alias of
ChromiumUIATreeInterceptor
- _get_shouldCreateTreeInterceptor()
- _abc_impl = <_abc._abc_data object>
- shouldCreateTreeInterceptor
Whether to create a tree interceptor for this object. This is only relevant if L{treeInterceptorClass} is valid. Normally, this should be C{True}. However, for some objects (e.g. ARIA applications), a tree interceptor shouldn’t be used by default, but the user may wish to override this. In this case, this can be set to C{False} and updated later. @type: bool
NVDAObjects.UIA.excel module
- class NVDAObjects.UIA.excel.ExcelCustomProperties
Bases:
object
UIA ‘custom properties’ specific to Excel. Once registered, all subsequent registrations will return the same ID value.
- class NVDAObjects.UIA.excel.ExcelCustomAnnotationTypes
Bases:
object
UIA ‘custom annotation types’ specific to Excel. Once registered, all subsequent registrations will return the same ID value.
- class NVDAObjects.UIA.excel.ExcelObject(chooseBestAPI=True, **kwargs)
Bases:
UIA
Common base class for all Excel UIA objects
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _UIAExcelCustomProps = <NVDAObjects.UIA.excel.ExcelCustomProperties object>
- _UIAExcelCustomAnnotationTypes = <NVDAObjects.UIA.excel.ExcelCustomAnnotationTypes object>
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.excel.ExcelCell(chooseBestAPI=True, **kwargs)
Bases:
ExcelObject
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _coordinateRegEx = re.compile('([A-Z]+)([0-9]+)', re.IGNORECASE)
- shouldAllowDuplicateUIAFocusEvent = True
- name: str = ''
Typing info for auto property _get_name()
- role: controlTypes.Role = 29
Type definition for auto prop ‘_get_role’
- areGridlinesVisible: bool
Typing information for auto-property: _get_areGridlinesVisible
- _get_areGridlinesVisible() bool
- outlineThickness: Tuple[float] | None
Typing information for auto-property: _get_outlineThickness
- _get_outlineThickness() Tuple[float] | None
- rotation: float | None
Typing information for auto-property: _get_rotation
- _get_rotation() float | None
- script_showCellAppearanceInfo(gesture)
Shows a browseable message Listing information about a cell’s appearance such as outline and fill colors, rotation and size
- _hasSelection()
- _get_value()
The value of this object (example: the current percentage of a scrollbar, the selected option in a combo box).
- _get_errorText()
- _get_description()
Prepends error messages and collaborator presence to any existing description.
- _isContentTooLargeForCell: bool
Typing information for auto-property: _get__isContentTooLargeForCell
- _get__isContentTooLargeForCell() bool
- _nextCellHasContent: bool
Typing information for auto-property: _get__nextCellHasContent
- _get__nextCellHasContent() bool
- _get_states()
Retrieves the current states of this object (example: selected, focused). @return: a set of State constants from L{controlTypes}.
- static _getColumnRepresentationForNumber(n: int) str
Convert a decimal number to its base alphabet representation. See https://codereview.stackexchange.com/questions/182733/base-26-letters-and-base-10-using-recursion for more details about the approach used.
- static _getNumberRepresentationForColumn(column: str) int
Convert an alphabet number to its decimal representation. See https://codereview.stackexchange.com/questions/182733/base-26-letters-and-base-10-using-recursion for more details about the approach used.
- _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.
- script_reportComment(gesture)
Reports the note or comment thread on the current cell
- __gestures = {'kb:NVDA+alt+c': 'reportComment', 'kb:NVDA+o': 'showCellAppearanceInfo'}
- _abc_impl = <_abc._abc_data object>
- cellCoordsText: Optional[str]
Typing information for auto-property: _get_cellCoordsText
- description: str
Typing information for auto property _get_description
- errorText
- states: Set[controlTypes.State]
- value: str
Typing information for auto property _get_value
- class NVDAObjects.UIA.excel.ExcelWorksheet(chooseBestAPI=True, **kwargs)
Bases:
ExcelObject
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- role: controlTypes.Role = 28
Type definition for auto prop ‘_get_role’
- isPresentableFocusAncestor = False
- _get_parent()
Retrieves this object’s parent (the object that contains this object). @return: the parent object if it exists else None.
- _abc_impl = <_abc._abc_data object>
- parent: Optional['NVDAObject']
This object’s parent (the object that contains this object).
- class NVDAObjects.UIA.excel.CellEdit(chooseBestAPI=True, **kwargs)
Bases:
ExcelObject
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- name: str = ''
Typing info for auto property _get_name()
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.excel.BadExcelFormulaEdit(chooseBestAPI=True, **kwargs)
Bases:
ExcelObject
Suppresses focus events on the old formula bar, which does not have a usable UIA implementation. Excel used to focus the EXCEL6 window with the formula bar when editing a cell. However, now focus is moved to an edit control within the actual cell being edited, in the EXCEL7 window. Sometimes however focus (probably proxied from MSAA) still gets occasionally fired.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- shouldAllowUIAFocusEvent = False
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.excel.ExcelTable(chooseBestAPI=True, **kwargs)
Bases:
UIA
Represents a table within an Excel spreadsheet.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- event_focusExited()
- _abc_impl = <_abc._abc_data object>
NVDAObjects.UIA.spartanEdge module
- class NVDAObjects.UIA.spartanEdge.EdgeTextInfo(*args, **kwargs)
Bases:
UIAWebTextInfo
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.
- _abc_impl = <_abc._abc_data object>
- _rangeObj: IUIAutomationTextRangeT
- class NVDAObjects.UIA.spartanEdge.EdgeTextInfo_preGapRemoval(*args, **kwargs)
Bases:
EdgeTextInfo
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.
- _hasEmbedded()
Is this textInfo positioned on an embedded child?
- move(unit, direction, endPoint=None, skipReplacedContent=True)
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
- expand(unit)
Expands the start and end of this text info object to a given unit @param unit: a unit constant @type unit: string
- _getTextWithFieldsForUIARange(rootElement, textRange, formatConfig, includeRoot=True, recurseChildren=True, alwaysWalkAncestors=True, _rootElementClipped=(True, True))
Yields start and end control fields, and text, for the given UI Automation text range. @param rootElement: the highest ancestor that encloses the given text range. This function will not walk higher than this point. @param textRange: the UI Automation text range whos content should be fetched. @param formatConfig: the types of formatting requested. @type formatConfig: a dictionary of NVDA document formatting configuration keys
with values set to true for those types that should be fetched.
@param includeRoot: If true, then a control start and end will be yielded for the root element. @param alwaysWalkAncestors: If true then control fields will be yielded for any element enclosing the given text range, that is a descendant of the root element. If false then the root element may be assumed to be the only ancestor. @param recurseChildren: If true, this function will be recursively called for each child of the given text range, clipped to the bounds of this text range. Formatted text between the children will also be yielded. If false, only formatted text will be yielded. @param _rootElementClipped: Indicates if textRange represents all of the given rootElement,
or is clipped at the start or end.
- _abc_impl = <_abc._abc_data object>
- _rangeObj: IUIAutomationTextRangeT
- class NVDAObjects.UIA.spartanEdge.EdgeNode(chooseBestAPI=True, **kwargs)
Bases:
UIAWeb
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _edgeIsPreGapRemoval = False
- _TextInfo
alias of
EdgeTextInfo
- getNormalizedUIATextRangeFromElement(UIAElement)
Simply fetches a UIA text range for the given UIAElement, allowing subclasses to process the range first.
- _get__isTextEmpty()
@return C{True} if the text contained in the object is considered empty by the underlying implementation. In most cases this will match {isCollapsed}, however some implementations may consider a single space or line feed as an empty range.
- _abc_impl = <_abc._abc_data object>
- _isTextEmpty
- class NVDAObjects.UIA.spartanEdge.EdgeList(chooseBestAPI=True, **kwargs)
Bases:
List
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.spartanEdge.EdgeHTMLRootContainer(chooseBestAPI=True, **kwargs)
Bases:
EdgeNode
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- event_gainFocus()
This code is executed if a gain focus event is received by this object.
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.spartanEdge.EdgeHTMLTreeInterceptor(*args, **kwargs)
Bases:
UIAWebTreeInterceptor
- _get_documentConstantIdentifier()
Get the constant identifier for this document. This identifier should uniquely identify all instances (not just one instance) of a document for at least the current session of the hosting application. Generally, the document URL should be used. Although the name of this property suggests that the identifier will be constant, With the introduction of SPAs (single page apps) the URL of a page may dynamically change over time. this property should reflect the most up to date URL. @return: The constant identifier for this document, C{None} if there is none.
- _abc_impl = <_abc._abc_data object>
- documentConstantIdentifier: str | None
Typing information for auto-property: _get_documentConstantIdentifier
- class NVDAObjects.UIA.spartanEdge.EdgeHTMLRoot(chooseBestAPI=True, **kwargs)
Bases:
EdgeNode
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- treeInterceptorClass
alias of
EdgeHTMLTreeInterceptor
- _get_shouldCreateTreeInterceptor()
- _isIframe()
Override, the root node is never an iFrame
- _get_role()
The role or type of control this object represents (example: button, list, dialog).
- _abc_impl = <_abc._abc_data object>
- role: controlTypes.Role
Type definition for auto prop ‘_get_role’
- shouldCreateTreeInterceptor
Whether to create a tree interceptor for this object. This is only relevant if L{treeInterceptorClass} is valid. Normally, this should be C{True}. However, for some objects (e.g. ARIA applications), a tree interceptor shouldn’t be used by default, but the user may wish to override this. In this case, this can be set to C{False} and updated later. @type: bool
NVDAObjects.UIA.sysListView32 module
Module for native UIA implementations of SysListView32, e.g. in Windows Forms.
- NVDAObjects.UIA.sysListView32.findExtraOverlayClasses(obj: NVDAObject, clsList: List[Type[NVDAObject]]) None
- class NVDAObjects.UIA.sysListView32.SysListViewList(chooseBestAPI=True, **kwargs)
Bases:
UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.sysListView32.SysListViewItem(chooseBestAPI=True, **kwargs)
Bases:
ListItem
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _get_name() str
The name or label of this object (example: the text of a button).
- _get_indexInParent() int | None
The index of this object in its parent object. @return: The 0 based index, C{None} if there is no parent. @raise NotImplementedError: If not supported by the underlying object.
- _get_positionInfo() Dict[str, int]
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>
- indexInParent: int | None
Type definition for auto prop ‘_get_indexInParent’
- name: str
Typing info for auto property _get_name()
- positionInfo: Dict[str, int]
Type definition for auto prop ‘_get_positionInfo’
NVDAObjects.UIA.web module
- NVDAObjects.UIA.web.splitUIAElementAttribs(attribsString)
Split an UIA Element attributes string into a dict of attribute keys and values. An invalid attributes string does not cause an error, but strange results may be returned. @param attribsString: The UIA Element attributes string to convert. @type attribsString: str @return: A dict of the attribute keys and values, where values are strings @rtype: {str: str}
- class NVDAObjects.UIA.web.UIAWebTextInfo(*args, **kwargs)
Bases:
UIATextInfo
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_UIAElementAtStartWithReplacedContent()
Fetches the deepest UIAElement at the start of the text range whose name has been overridden by the author (such as aria-label).
- _moveToEdgeOfReplacedContent(back=False)
If within replaced content (E.g. aria-label is used), moves to the first or last character covered, so that a following call to move in the same direction will move out of the replaced content, in order to ensure that the content only takes up one character stop.
- _collapsedMove(unit, direction, skipReplacedContent)
A simple collapsed move (i.e. both ends move together), but whether it classes replaced content as one character stop can be configured via the skipReplacedContent argument.
- move(unit, direction, endPoint=None, skipReplacedContent=True)
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
- _getControlFieldForUIAObject(obj, isEmbedded=False, startOfNode=False, endOfNode=False)
Fetch control field information for the given UIA NVDAObject. @param obj: the NVDAObject the control field is for. @param isEmbedded: True if this NVDAObject is for a leaf node (has no useful children). @param startOfNode: True if the control field represents the very start of this object. @param endOfNode: True if the control field represents the very end of this object. @return: The control field for this object
- 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.
- UIAElementAtStartWithReplacedContent
- _abc_impl = <_abc._abc_data object>
- _rangeObj: IUIAutomationTextRangeT
- class NVDAObjects.UIA.web.UIAWeb(chooseBestAPI=True, **kwargs)
Bases:
UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _TextInfo
alias of
UIAWebTextInfo
- _isIframe()
- _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_ariaProperties()
- RE_ARIA_CURRENT_PROP_VALUE = re.compile('current=(?!false)(\\w+);')
- _get_isCurrent() IsCurrent
Gets the value that indicates whether this object is the current element in a set of related elements. This maps to aria-current.
- _get_roleText()
A custom role string for this object, which is used for braille and speech presentation, which will override the standard label for this object’s role property. No string is provided by default, meaning that NVDA will fall back to using role. Examples of where this property might be overridden are shapes in Powerpoint, or ARIA role descriptions.
- _get_placeholder()
If it exists for this object get the value of the placeholder text. For example this might be the aria-placeholder text for a field in a web page. @return: the placeholder text else None @rtype: String or None
- _get_landmark()
If this object represents an ARIA landmark, fetches the ARIA landmark role. @return: ARIA landmark role else None
- _abc_impl = <_abc._abc_data object>
- ariaProperties
- isCurrent: controlTypes.IsCurrent
type info for auto property _get_isCurrent
- landmark: Optional[str]
Typing information for auto property _get_landmark
- placeholder
- role: controlTypes.Role
Type definition for auto prop ‘_get_role’
- roleText: Optional[str]
Type definition for auto prop ‘_get_roleText’
- states: Set[controlTypes.State]
- class NVDAObjects.UIA.web.List(chooseBestAPI=True, **kwargs)
Bases:
UIAWeb
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- _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>
- states: Set[controlTypes.State]
Bases:
UIATextRangeQuickNavItem
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
A helper for L{UIAWebTreeInterceptor._iterNodesByType} that specifically yields L{HeadingControlQuickNavItem} objects found in the given document, starting the search from the given position, searching in the given direction. See L{browseMode._iterNodesByType} for details on these specific arguments.
- class NVDAObjects.UIA.web.UIAWebTreeInterceptor(*args, **kwargs)
Bases:
ReviewCursorManager
,UIABrowseModeDocument
- TextInfo
alias of
UIABrowseModeDocumentTextInfo
- _nativeAppSelectionMode: bool = False
Whether native selection mode is turned on or off
- makeTextInfo(position)
- shouldPassThrough(obj, reason=None)
Determine whether pass through mode should be enabled (focus mode) or disabled (browse mode) for a given object. @param obj: The object in question. @type obj: L{NVDAObjects.NVDAObject} @param reason: The reason for this query; one of the output reasons, or C{None} for manual pass through mode activation by the user. @return: C{True} if pass through mode (focus mode) should be enabled, C{False} if it should be disabled (browse mode).
- _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
- _abc_impl = <_abc._abc_data object>
NVDAObjects.UIA.winConsoleUIA module
- class NVDAObjects.UIA.winConsoleUIA.ConsoleUIATextInfo(*args, **kwargs)
Bases:
UIATextInfo
A TextInfo implementation for consoles with an IMPROVED, but not FORMATTED, API level.
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.
- _getBoundingRange(obj, position)
Returns the UIA text range to which the console should be bounded, and whether the textInfo should be collapsed after instantiation.
- 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
- _move(unit, direction, endPoint=None)
Perform a move without respect to bounding.
- _get_text() str
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.
- _abc_impl = <_abc._abc_data object>
- text: str
Typing information for auto-property: _get_text
- _rangeObj: IUIAutomationTextRangeT
- class NVDAObjects.UIA.winConsoleUIA.ConsoleUIATextInfoWorkaroundEndInclusive(*args, **kwargs)
Bases:
ConsoleUIATextInfo
Implementation of various workarounds for pre-microsoft/terminal#4018 conhost: fixes expand/collapse, uses rangeFromPoint instead of broken GetVisibleRanges for bounding, and implements word movement support.
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.
- _getBoundingRange(obj, position)
Returns the UIA text range to which the console should be bounded, and whether the textInfo should be collapsed after instantiation.
- collapse(end=False)
Works around a UIA bug on conhost versions before microsoft/terminal#4018. When collapsing, consoles seem to incorrectly push the start of the textRange back one character. Correct this by bringing the start back up to where the end is.
- compareEndPoints(other, which)
Works around a UIA bug on conhost versions before microsoft/terminal#4018. Even when a console textRange’s start and end have been moved to the same position, the console incorrectly reports the end as being past the start. Compare to the start (not the end) when collapsed.
- setEndPoint(other, which)
Override of L{textInfos.TextInfo.setEndPoint}. Works around a UIA bug on conhost versions before microsoft/terminal#4018 that means we can not trust the “end” endpoint of a collapsed (empty) text range for comparisons.
- expand(unit)
Expands the start and end of this text info object to a given unit @param unit: a unit constant @type unit: string
- _move(unit, direction, endPoint=None)
Perform a move without respect to bounding.
- _getCurrentOffsetInThisLine(lineInfo)
Given a caret textInfo expanded to line, returns the index into the line where the caret is located. This is necessary since Uniscribe requires indices into the text to find word boundaries, but UIA only allows for relative movement.
- _getWordOffsetsInThisLine(offset, lineInfo)
- _isCollapsed()
Works around a UIA bug on conhost versions before microsoft/terminal#4018 that means we cannot trust the “end” endpoint of a collapsed (empty) text range for comparisons. Instead we check to see if we can get the first character from the text range. A collapsed range will not have any characters and will return an empty string.
- _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
- _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.
- _abc_impl = <_abc._abc_data object>
- isCollapsed
- text: str
Typing information for auto-property: _get_text
- _rangeObj: IUIAutomationTextRangeT
- class NVDAObjects.UIA.winConsoleUIA.consoleUIAWindow(chooseBestAPI=True, **kwargs)
Bases:
Window
- shouldAllowUIAFocusEvent = False
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.winConsoleUIA.WinConsoleUIA(chooseBestAPI=True, **kwargs)
Bases:
KeyboardHandlerBasedTypedCharSupport
- name: str = ''
Disable the name as it won’t be localized
- _get_apiLevel() WinConsoleAPILevel
This property shows which of several console UIA workarounds are needed in a given conhost instance. See the comments on the WinConsoleAPILevel enum for details.
- _get__caretMovementTimeoutMultiplier()
On older consoles, the caret can take a while to move.
- _get_windowThreadID()
- _get_TextInfo()
Overriding _get_TextInfo and thus the ConsoleUIATextInfo property on NVDAObjects.UIA.UIA ConsoleUIATextInfo bounds review to the visible text. ConsoleUIATextInfoWorkaroundEndInclusive fixes expand/collapse and implements word movement.
- _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.
- _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.
- detectPossibleSelectionChange()
Detects if the selection has been changed, and if so it speaks the change.
- event_UIA_notification(**kwargs)
In Windows Sun Valley 2 (SV2 M2), UIA notification events will be sent to announce new text. Block these for now to avoid double-reporting of text changes. @note: In the longer term, NVDA should leverage these events in place of the current LiveText strategy, as performance will likely be significantly improved and #11002 can be completely mitigated.
- TextInfo
The TextInfo class this object should use to provide access to text. @type: type; L{textInfos.TextInfo}
- _abc_impl = <_abc._abc_data object>
- _caretMovementTimeoutMultiplier
- apiLevel
- devInfo: List[str]
Information about this object useful to developers.
- diffAlgo
- windowThreadID
- NVDAObjects.UIA.winConsoleUIA.findExtraOverlayClasses(obj, clsList)
- class NVDAObjects.UIA.winConsoleUIA._DiffBasedWinTerminalUIA(chooseBestAPI=True, **kwargs)
Bases:
EnhancedTermTypedCharSupport
An overlay class for Windows Terminal (wt.exe) that uses diffing to speak new text.
- event_UIA_notification(**kwargs)
Block notification events when diffing to prevent double reporting.
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.winConsoleUIA._NotificationsBasedWinTerminalUIA(chooseBestAPI=True, **kwargs)
Bases:
UIA
An overlay class for Windows Terminal (wt.exe) that uses UIA notification events provided by the application to speak new text.
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- role: controlTypes.Role = 82
Override the role, which is controlTypes.Role.STATICTEXT by default.
- announceNewLineText = False
New line text is announced using UIA notification events
- event_UIA_notification(notificationKind: int | None = None, notificationProcessing: int | None = 4, displayString: str | None = None, activityId: str | None = None)
Introduced in Windows 10 Fall Creators Update (build 16299). This base implementation announces all notifications from the UIA element. Unlike other events, the text to be announced is not the name of the object, and parameters control how the incoming notification should be processed. Subclasses can override this event and can react to notification processing instructions.
- _abc_impl = <_abc._abc_data object>
NVDAObjects.UIA.wordDocument module
- class NVDAObjects.UIA.wordDocument.UIACustomAttributeID(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
IntEnum
- LINE_NUMBER = 0
- PAGE_NUMBER = 1
- COLUMN_NUMBER = 2
- SECTION_NUMBER = 3
- BOOKMARK_NAME = 4
- NVDAObjects.UIA.wordDocument.END_OF_ROW_MARK = '\x07'
the non-printable unicode character that represents the end of cell or end of row mark in Microsoft Word
- class NVDAObjects.UIA.wordDocument.ElementsListDialog(document)
Bases:
ElementsListDialog
- ELEMENT_TYPES = (('link', 'Lin&ks'), ('heading', '&Headings'), ('annotation', '&Annotations'), ('error', '&Errors'))
Bases:
TextAttribUIATextInfoQuickNavItem
See L{QuickNavItem.__init__} for itemType and document argument definitions. @param textInfo: the textInfo position this item represents. @type textInfo: L{textInfos.TextInfo}
a UIA text attribute to search for
A set of attribute values acceptable to match the search.
- NVDAObjects.UIA.wordDocument.getCommentInfoFromPosition(position)
Fetches information about the comment located at the given position in a word document. @param position: a TextInfo representing the span of the comment in the word document. @type L{TextInfo} @return: A dictionary containing keys of comment, author and date @rtype: dict
- NVDAObjects.UIA.wordDocument.getPresentableCommentInfoFromPosition(commentInfo)
Bases:
TextAttribUIATextInfoQuickNavItem
See L{QuickNavItem.__init__} for itemType and document argument definitions. @param textInfo: the textInfo position this item represents. @type textInfo: L{textInfos.TextInfo}
a UIA text attribute to search for
A set of attribute values acceptable to match the search.
- class NVDAObjects.UIA.wordDocument.WordDocumentTextInfo(*args, **kwargs)
Bases:
UIATextInfo
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.
- 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.
- _ensureRangeVisibility()
- updateSelection()
Moves the selection (usually the system caret) to the position of this text info object
- updateCaret()
Moves the system caret to the position of this text info object
- _get_locationText()
A message that explains the location of the text position in friendly terms.
- _getTextWithFields_text(textRange, formatConfig, UIAFormatUnits=None)
Yields format fields and text for the given UI Automation text range, split up by the first available UI Automation text unit that does not result in mixed attribute values. @param textRange: the UI Automation text range to walk. @param formatConfig: a dictionary of NVDA document formatting configuration keys
with values set to true for those types that should be fetched.
- @param UIAFormatUnits: the UI Automation text units (in order of resolution) that should be used to split the text so as to avoid mixed attribute values. This is None by default.
If the parameter is a list of 1 or more units, The range will be split by the first unit in the list, and this method will be recursively run on each subrange, with the remaining units in this list given as the value of this parameter. If this parameter is an empty list, then formatting and text is fetched for the entire range, but any mixed attribute values are ignored and no splitting occures. If this parameter is None, text and formatting is fetched for the entire range in one go, but if mixed attribute values are found, it will split by the first unit in self.UIAFormatUnits, and run this method recursively on each subrange, providing the remaining units from self.UIAFormatUnits as the value of this parameter.
- _get_controlFieldNVDAObjectClass()
The NVDAObject class to be used by the _getTextWithFieldsForUIARange method when instantiating NVDAObjects in order to generate control fields for content. L{UIA} is usually what you want, but if you know the class will always mutate to a certain subclass (E.g. WordDocumentNode) then performance gains can be made by returning the subclass here.
- _getControlFieldForUIAObject(obj, isEmbedded=False, startOfNode=False, endOfNode=False)
Fetch control field information for the given UIA NVDAObject. @param obj: the NVDAObject the control field is for. @param isEmbedded: True if this NVDAObject is for a leaf node (has no useful children). @param startOfNode: True if the control field represents the very start of this object. @param endOfNode: True if the control field represents the very end of this object. @return: The control field for this object
- _getTextFromUIARange(textRange)
Fetches plain text from the given UI Automation text range. Just calls getText(-1). This only exists to be overridden for filtering.
- _getTextForCodepointMovement() str
#8576, #10960: In Word, list bullets are exposed in text but are ignored when moving by character. Therefore in
getTextWithFields
, the bullets are stripped from the text and exposed in theline-prefix
field. To stay compatible with this, we can’t simply use thetext
property, as it can potentially contain bullets that should be stripped.
- _isEndOfRow()
Is this textInfo positioned on an end-of-row mark?
- 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
- expand(unit)
Expands the start and end of this text info object to a given unit @param unit: a unit constant @type unit: string
- 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.
- _getFormatFieldAtRange(textRange, formatConfig, ignoreMixedValues=False)
Fetches formatting for the given UI Automation Text range. @param textRange: the text range whos formatting should be fetched. @param formatConfig: the types of formatting requested. @type formatConfig: a dictionary of NVDA document formatting configuration keys
with values set to true for those types that should be fetched.
- @param ignoreMixedValues: If True, formatting that is mixed according to UI Automation will not be included.
If False, L{UIAHandler.utils.MixedAttributeError} will be raised if UI Automation gives back a mixed attribute value signifying that the caller may want to try again with a smaller range.
@return: The formatting for the given text range.
- _getIndentValueDisplayString(val: float) str
A function returning the string to display in formatting info in Word documents. @param val: an indent value measured in points, fetched via
an UIAHandler.UIA_Indentation*AttributeId attribute.
@return: The string used in formatting information to report the length of an indentation.
- _abc_impl = <_abc._abc_data object>
- controlFieldNVDAObjectClass
- locationText
- _rangeObj: IUIAutomationTextRangeT
- class NVDAObjects.UIA.wordDocument.WordBrowseModeDocument(*args, **kwargs)
Bases:
UIABrowseModeDocument
- _shouldSetFocusToObj(obj: NVDAObject) bool
Determine whether an object should receive focus. Subclasses may extend or override this method. @param obj: The object in question. @type obj: L{NVDAObjects.NVDAObject}
- shouldPassThrough(obj, reason=None)
Determine whether pass through mode should be enabled (focus mode) or disabled (browse mode) for a given object. @param obj: The object in question. @type obj: L{NVDAObjects.NVDAObject} @param reason: The reason for this query; one of the output reasons, or C{None} for manual pass through mode activation by the user. @return: C{True} if pass through mode (focus mode) should be enabled, C{False} if it should be disabled (browse mode).
- script_tab(gesture)
- script_shiftTab(gesture)
- _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
- class ElementsListDialog(document)
Bases:
ElementsListDialog
- ELEMENT_TYPES = (('link', 'Lin&ks'), ('heading', '&Headings'), ('annotation', '&Annotations'), ('error', '&Errors'))
- filterTimer: wx.CallLater | None
- _iterTextStyle(kind: str, direction: _Movement = _Movement.NEXT, pos: TextInfo | None = None) Generator[TextInfoQuickNavItem, None, None]
- _abc_impl = <_abc._abc_data object>
- class NVDAObjects.UIA.wordDocument.WordDocumentNode(chooseBestAPI=True, **kwargs)
Bases:
UIA
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- TextInfo
alias of
WordDocumentTextInfo
- _get_mathMl()
Obtain the MathML markup for an object containing math content. This will only be called (and thus only needs to be implemented) for objects with a role of L{controlTypes.Role.MATH}. @raise LookupError: If MathML can’t be retrieved for this object.
- _get_role()
The role or type of control this object represents (example: button, list, dialog).
- _abc_impl = <_abc._abc_data object>
- mathMl
- role: controlTypes.Role
Type definition for auto prop ‘_get_role’
- class NVDAObjects.UIA.wordDocument.WordDocument(chooseBestAPI=True, **kwargs)
Bases:
UIADocumentWithTableNavigation
,WordDocumentNode
,WordDocument
An NVDAObject for a UI Automation element. @param windowHandle: if a UIAElement is not specifically given, then this windowHandle is used to fetch its root UIAElement @type windowHandle: int @param UIAElement: the UI Automation element that should be represented by this NVDAObject The UI Automation element must have been created with a L{UIAHandler.handler.baseCacheRequest} @type UIAElement: L{UIAHandler.IUIAutomationElement} @param initialUIACachedPropertyIDs: Extra UI Automation properties the given UIAElement has already had cached with a UIA cache request that inherits from L{UIAHandler.handler.baseCacheRequest}. Cached values of these properties will be available for the remainder of the current core cycle. After that, new values will be fetched. @type initialUIACachedPropertyIDs: L{UIAHandler.IUIAutomationCacheRequest}
- treeInterceptorClass
alias of
WordBrowseModeDocument
- shouldCreateTreeInterceptor = False
Whether to create a tree interceptor for this object. This is only relevant if L{treeInterceptorClass} is valid. Normally, this should be C{True}. However, for some objects (e.g. ARIA applications), a tree interceptor shouldn’t be used by default, but the user may wish to override this. In this case, this can be set to C{False} and updated later. @type: bool
- announceEntireNewLine = True
- name: str = ''
Typing info for auto property _get_name()
- event_textChange()
- event_UIA_notification(activityId=None, **kwargs)
Introduced in Windows 10 Fall Creators Update (build 16299). This base implementation announces all notifications from the UIA element. Unlike other events, the text to be announced is not the name of the object, and parameters control how the incoming notification should be processed. Subclasses can override this event and can react to notification processing instructions.
- _caretMoveBySentenceHelper(gesture, direction)
- script_reportCurrentComment(gesture: InputGesture) None
Reports the text of the comment where the system caret is located. If pressed twice, presents the information in a browsable message
- script_setColumnHeader(gesture)
- script_setRowHeader(gesture)
- __gestures = {'kb:NVDA+alt+c': 'reportCurrentComment', 'kb:NVDA+shift+c': 'setColumnHeader', 'kb:NVDA+shift+r': 'setRowHeader', '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'}
- _abc_impl = <_abc._abc_data object>