documentBase module
- documentBase._TableID
A variety of types can be used for a tableID. Known to be a tuple for UIA, an integer for virtual buffers.
alias of
Union
[int
,Tuple
,Any
]
- class documentBase._Axis(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
str
,Enum
- ROW = 'row'
- COLUMN = 'column'
- _generate_next_value_(start, count, last_values)
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_values: the list of values assigned
- _new_member_(**kwargs)
Create and return a new object. See help(type) for accurate signature.
- _use_args_ = True
- _member_names_ = ['ROW', 'COLUMN']
- _member_map_ = {'COLUMN': _Axis.COLUMN, 'ROW': _Axis.ROW}
- _value2member_map_ = {'column': _Axis.COLUMN, 'row': _Axis.ROW}
- _unhashable_values_ = []
- _member_type_
alias of
str
- _value_repr_()
Return repr(self).
- class documentBase._Movement(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
str
,Enum
- NEXT = 'next'
- PREVIOUS = 'previous'
- FIRST = 'first'
- LAST = 'last'
- _generate_next_value_(start, count, last_values)
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_values: the list of values assigned
- _new_member_(**kwargs)
Create and return a new object. See help(type) for accurate signature.
- _use_args_ = True
- _member_names_ = ['NEXT', 'PREVIOUS', 'FIRST', 'LAST']
- _member_map_ = {'FIRST': _Movement.FIRST, 'LAST': _Movement.LAST, 'NEXT': _Movement.NEXT, 'PREVIOUS': _Movement.PREVIOUS}
- _value2member_map_ = {'first': _Movement.FIRST, 'last': _Movement.LAST, 'next': _Movement.NEXT, 'previous': _Movement.PREVIOUS}
- _unhashable_values_ = []
- _member_type_
alias of
str
- _value_repr_()
Return repr(self).
- class documentBase._TableSelection(axis: _Axis, lastRow: int, lastCol: int, trueRow: int, rowSpan: int, trueCol: int, colSpan: int)
Bases:
object
Caches information about user navigating around the table. This class is used to store true row/column number when navigating through merged cells. lastRow/lastCol store coordinates of the last cell user explicitly navigated to. If they don’t match current selection we invalidate this cache. If they match, we use trueRow/trueCol to maintain row/column through merged cells.
- lastRow: int
- lastCol: int
- trueRow: int
- rowSpan: int
- trueCol: int
- colSpan: int
- class documentBase._TableCell(tableID: int | Tuple | Any, row: int, col: int, rowSpan: int, colSpan: int)
Bases:
object
Contains information about a cell in the table with matching tableID
- tableID: int | Tuple | Any
- row: int
- col: int
- rowSpan: int
- colSpan: int
- class documentBase.TextContainerObject(*args, **kwargs)
Bases:
AutoPropertyObject
An object that contains text which can be accessed via a call to a makeTextInfo method. E.g. NVDAObjects, BrowseModeDocument TreeInterceptors.
- _get_TextInfo()
- property selection
- _get_selection()
- _set_selection(info)
- TextInfo
- _abc_impl = <_abc._abc_data object>
Bases:
TextContainerObject
,ScriptableObject
A document that supports standard table navigiation comments (E.g. control+alt+arrows to move between table cells). The document could be an NVDAObject, or a BrowseModeDocument treeIntercepter for example.
If “Include layout tables” option is on, this will compute the set of layout tables that this textInfo is enclosed in, otherwise it will return empty set. @param info: the position where the layout tables should be looked for. @returns: A set of table IDs or empty set.
Fetches information about the deepest table cell at the given position. @param info: the position where the table cell should be looked for. @returns: Information about requested cell. @raises: LookupError if there is no table cell at this position.
Fetches information about the deepest table dimension. @param info: the position where the table cell should be looked for. @returns: a tuple of table height and width. @raises: LookupError if there is no table cell at this position.
Starting from the given start position, Locates the table cell with the given row and column coordinates and table ID. @param startPos: the position to start searching from. @type startPos: L{textInfos.TextInfo} @param tableID: the ID of the table. @param row: the row number of the cell @type row: int @param column: the column number of the table cell @type column: int @returns: the table cell’s position in the document @rtype: L{textInfos.TextInfo} @raises: LookupError if the cell does not exist
The number of missing cells L{_getNearestTableCell} is allowed to skip over to locate the next available cell
Locates the nearest table cell relative to another table cell in a given direction, given its coordinates. For example, this is used to move to the cell in the next column, previous row, etc. This method will skip over missing table cells (where L{_getTableCellAt} raises LookupError), up to the number of times set by _missingTableCellSearchLimit set on this instance. @param startPos: the position in the document to start searching from. @param cell: the cell information of start position. @param movement: the direction (“next” or “previous”) @param axis: the axis of movement (“row” or “column”) @returns: the position of the nearest table cell
Locates the first or last cell in current row or column given coordinates of current cell. When jumping to the first row/column, It will try to set current row/column index to 1. When jumping to the last row/column, it will query table dimensions and set row/column index to corresponding dimension. After figuring out exact coordinates of the cell it will try to jump directly to that cell, or if that fails (due to missing table cell), it will walk in the opposite direction skipping missing cells up to the number of times set by _missingTableCellSearchLimit set on this instance. @param startPos: the position in the document to start searching from. @param cell: the cell information of start position. @param movement: the direction (“first” or “last”) @param axis: the axis of movement (“row” or “column”) @returns: the position of the destination table cell
moves to the next table row
moves to the previous table row
moves to the next table column
moves to the previous table column
moves to the first table row
moves to the last table row
moves to the first table column
moves to the last table column
Reads the row horizontally from the current cell rightwards to the last cell in the row.
Reads the column vertically from the current cell downwards to the last cell in the column.
Reads the current row horizontally from left to right without moving the system caret.
Reads the current column vertically from top to bottom without moving the system caret.
Toggles on and off the inclusion of layout tables in browse mode