docs » cp.ui.Table


Represents an AXTable in the Apple Accessibility UX API.

API Overview

API Documentation

Functions

cellTextValue

Signature cp.ui.Table.cellTextValue(cell) -> boolean
Type Function
Description Returns the cell's text value.
Parameters
  • `cell` - The cell to check
Returns
  • The combined text value of the cell.

cellTextValueIs

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 check
  • `value` - The text value to compare.
Returns
  • `true` if the cell text value equals the provided `value`.

discloseRow

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.

findRow

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.

is

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.

matches

Signature cp.ui.Table.matches(element)
Type Function
Description Checks if the element is a valid table.
Parameters
  • `element` - The element to check.
Returns
  • `true` if it matches.

matchesContent

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.

visitRow

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.

Constructors

new

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.

Methods

columnsUI

Signature `cp.ui.Table:columnsUI() -> table of axuielements nil` </span>
Type Method
Description Return a list of column headers, if present.
Parameters
  • None
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.

horizontalScrollBarUI

Signature `cp.ui.Table:horizontalScrollBarUI() -> axuielement nil` </span>
Type Method
Description Finds the horizontal scroll bar UI element, if present.
Parameters
  • None
Returns
  • The UI element, or `nil`.

isFocused

Signature cp.ui.Table:isFocused() -> boolean
Type Method
Description Checks if the table is focused by the user.
Parameters
  • None
Returns
  • `true` if the element is focused.

isShowing

Signature cp.ui.Table:isShowing() -> boolean
Type Method
Description Checks if the table is visible.
Parameters
  • None
Returns
  • `true` if the element is visible.

parent

Signature cp.ui.Table:parent() -> value
Type Method
Description The table's parent, as provided in the constructor.
Parameters
  • None
Returns
  • The table's parent.

rowsUI

Signature `cp.ui.Table:rowsUI([filterFn]) -> table of axuielements nil` </span>
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`.

topRowsUI

Signature `cp.ui.Table:topRowsUI(filterFn) -> table of axuielements nil` </span>
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`.

UI

Signature `cp.ui.Table:UI() -> axuielement nil` </span>
Type Method
Description Returns the axuielement that contains the actual rows.
Parameters
  • None
Returns
  • The content UI element, or `nil`.

uncached

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
  • None

verticalScrollBarUI

Signature `cp.ui.Table:verticalScrollBarUI() -> axuielement nil` </span>
Type Method
Description Finds the vertical scroll bar UI element, if present.
Parameters
  • None
Returns
  • The UI element, or `nil`.

results matching ""

    No results matching ""