Represents an AXTable in the Apple Accessibility UX API.
| Signature |
cp.ui.Table.cellTextValue(cell) -> boolean |
| Type |
Function |
| Description |
Returns the cell's text value. |
| Parameters |
|
| Returns |
- The combined text value of the cell.
|
| Signature |
cp.ui.Table.cellTextValueIs(cell, value) -> boolean |
| Type |
Function |
| Description |
Checks if the cell's text value equals value. |
| Parameters |
cell - The cell to checkvalue - The text value to compare.
|
| Returns |
true if the cell text value equals the provided value.
|
| Signature |
cp.ui.Table.discloseRow(row) -> boolean |
| Type |
Function |
| Description |
Discloses the row, if possible. |
| Parameters |
row - The row to disclose
|
| Returns |
true if the row is disclosable and is now expanded.
|
| Signature |
cp.ui.Table.findRow(rows, names) -> axuielement |
| Type |
Function |
| Description |
Finds the row at the sub-level named in the names table and returns it. |
| Parameters |
rows - The array of rows to process.names - The array of names to navigate down
|
| Returns |
- The row that was visited, or
nil if not.
|
| Signature |
cp.ui.Table.is(thing) -> boolean |
| Type |
Function |
| Description |
Checks if the thing is a Table. |
| Parameters |
thing - The thing to check
|
| Returns |
true if the thing is a Table instance.
|
| Signature |
cp.ui.Table.matches(element) |
| Type |
Function |
| Description |
Checks if the element is a valid table. |
| Parameters |
element - The element to check.
|
| Returns |
|
| Signature |
cp.ui.Table.matchesContent(element) -> boolean |
| Type |
Function |
| Description |
Checks if the element is a valid table content element. |
| Parameters |
element - The element to check
|
| Returns |
true if the element is a valid content element.
|
| Signature |
cp.ui.Table.visitRow(rows, names) -> axuielement |
| Type |
Function |
| Description |
Selects the row at the sub-level named in the names table. |
| Parameters |
rows - The array of rows to process.names - The array of names to navigate down
|
| Returns |
- The row that was visited, or
nil if not.
|
| Signature |
cp.ui.Table.new(parent, finder) -> Table |
| Type |
Constructor |
| Description |
Creates a new Table. |
| Parameters |
parent - The parent object.finder - A function which will return the axuielement that this table represents.
|
| Signature | cp.ui.Table:columnsUI() -> table of axuielements | nil |
| -----------------------------------------------------|---------------------------------------------------------------------------------------------------------|
| Type | Method |
| Description | Return a list of column headers, if present. |
| Parameters |
|
| Returns | - Table of column headers. If the table is visible but no column headers are defined, an empty table is returned. If it's not visible,
nil is returned.
|
| Signature | cp.ui.Table:horizontalScrollBarUI() -> axuielement | nil |
| -----------------------------------------------------|---------------------------------------------------------------------------------------------------------|
| Type | Method |
| Description | Finds the horizontal scroll bar UI element, if present. |
| Parameters |
|
| Returns | |
| Signature |
cp.ui.Table:isFocused() -> boolean |
| Type |
Method |
| Description |
Checks if the table is focused by the user. |
| Parameters |
|
| Returns |
true if the element is focused.
|
| Signature |
cp.ui.Table:isShowing() -> boolean |
| Type |
Method |
| Description |
Checks if the table is visible. |
| Parameters |
|
| Returns |
true if the element is visible.
|
| Signature |
cp.ui.Table:parent() -> value |
| Type |
Method |
| Description |
The table's parent, as provided in the constructor. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.Table:rowsUI([filterFn]) -> table of axuielements | nil |
| -----------------------------------------------------|---------------------------------------------------------------------------------------------------------|
| Type | Method |
| Description | Returns the list of rows in the table. An optional filter function may be provided. |
| Parameters |
filterFn - An optional function that will be called to check if individual rows should be included. If not provided, all rows are returned.
|
| Returns | - Table of rows. If the table is visible but no rows match, it will be an empty table, otherwise it will be
nil.
|
| Signature | cp.ui.Table:topRowsUI(filterFn) -> table of axuielements | nil |
| -----------------------------------------------------|---------------------------------------------------------------------------------------------------------|
| Type | Method |
| Description | Returns a list of top-level rows in the table. An optional filter function may be provided. |
| Parameters |
filterFn - An optional function that will be called to check if individual rows should be included. If not provided, all rows are returned.
|
| Returns | - Table of rows. If the table is visible but no rows match, it will be an empty table, otherwise it will be
nil.
|
| Signature | cp.ui.Table:UI() -> axuielement | nil |
| -----------------------------------------------------|---------------------------------------------------------------------------------------------------------|
| Type | Method |
| Description | Returns the axuielement that contains the actual rows. |
| Parameters |
|
| Returns | - The content UI element, or
nil.
|
| Signature |
cp.ui.Table:uncached() -> Table |
| Type |
Method |
| Description |
Calling this will force the table to look up the axuielement on demand, rather than caching the result. |
| Parameters |
|
| Signature | cp.ui.Table:verticalScrollBarUI() -> axuielement | nil |
| -----------------------------------------------------|---------------------------------------------------------------------------------------------------------|
| Type | Method |
| Description | Finds the vertical scroll bar UI element, if present. |
| Parameters |
|
| Returns | |