Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
126 lines (106 loc) · 11.3 KB

cp.ui.Outline.md

File metadata and controls

126 lines (106 loc) · 11.3 KB

docs » cp.ui.Outline


Represents an AXOutline axuielement.

API Overview

API Documentation

Functions

Signature cp.ui.Outline.matches(element) -> boolean
Type Function
Description Checks if the element is an Outline.

Constructors

Signature cp.ui.Outline(parent, uiFinder) -> cp.ui.Outline
Type Constructor
Description Creates a new Outline with the specified parent and uiFinder.
Parameters
  • parent - The parent instance.
  • uiFinder - A function or a cp.prop which will return the AXOutline axuielement.
Returns
  • The new Outline instance.

Methods

Signature cp.ui.Outline:childrenUI() -> table
Type Method
Description Provides a table containing the axuielements which are children of the outline.
Signature cp.ui.Outline:columns() -> table of cp.ui.Columns
Type Method
Description Returns the list of Columns in this Outline.
Signature cp.ui.Outline:columnsUI() -> table
Type Method
Description Provides a table containing the axuielements which are columns of the outline.
Signature cp.ui.Outline:createColumn(columnUI) -> cp.ui.Column
Type Method
Description Attempts to create a new Column with the provided columnUI axuielement.
Parameters
  • columnUI - the AXColumn axuielement to create a Column for.
Returns
  • The Column or an error if a problem occurred.
Notes
  • Subclasses which want to provide a custom Column implementation should override this method.
Signature cp.ui.Outline:createRow(rowUI) -> cp.ui.Row
Type Method
Description Attempts to create a new Row with the provided rowUI axuielement.
Parameters
  • rowUI - the AXRow axuielement to create a Row for.
Returns
  • The Row or an error if a problem occurred.
Notes
  • Subclasses which want to provide a custom Row implementation should override this method.
Signature cp.ui.Outline:fetchColumn(columnsUI) -> table of cp.ui.Columns
Type Method
Description Returns a table of the same length as columnsUI.
Parameters
  • columnsUI - The list of AXColumn axuielements to find.
Returns
  • A table with the same number of elements, containing the matching Column instances.
Signature cp.ui.Outline:fetchRow(rowUI) -> cp.ui.Row or nil
Type Method
Description Returns the Row that represents the provided rowUI, if it is actually present
Parameters
  • rowUI - The axuielement for the AXRow to find a Row for.
Returns
  • The Row, or nil if the rowUI is not in this Outline.
Signature cp.ui.Outline:fetchRows(rowsUI) -> table of cp.ui.Rows
Type Method
Description Returns a table of the same length as rowsUI.
Parameters
  • rowsUI - The list of AXRow axuielements to find.
Returns
  • A table with the same number of elements, containing the matching Row instances.
Signature cp.ui.Outline:filterRows(matcherFn) -> table of cp.ui.Rows or nil
Type Method
Description Returns a table only containing Rows which pass the predicate matcherFn.
Parameters
  • matcherFn - the function that will accept a Row and return a boolean.
Returns
  • A table of Rows, or nil if no UI is currently available.
Signature cp.ui.Outline:rows() -> table of cp.ui.Row or nil
Type Method
Description Provides a table with the list of cp.ui.Row elements for the rows.
Returns
  • A table containing the list of Rows in the Outline, or nil if the Outline is not presently available.
Signature cp.ui.Outline:rowsUI() -> table of axuielement
Type Method
Description Provides a table containing the axuielements which are rows in the outline.