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

Latest commit

 

History

History
71 lines (57 loc) · 5.02 KB

cp.ui.TextArea.md

File metadata and controls

71 lines (57 loc) · 5.02 KB

docs » cp.ui.TextArea


UI Text Area.

API Overview

  • Functions - API calls offered directly by the extension
  • matches
  • Constructors - API calls which return an object, typically one that offers API methods
  • TextArea
  • Fields - Variables which can only be accessed from an object returned by a constructor
  • focused
  • value
  • Methods - API calls which can only be made on an object returned by a constructor
  • append
  • prepend

API Documentation

Functions

Signature cp.ui.TextArea.matches(element) -> boolean
Type Function
Description Checks to see if an element matches what we think it should be.
Parameters
  • element - An axuielementObject to check.
Returns
  • true if matches otherwise false

Constructors

Signature cp.ui.TextArea(parent, uiFinder) -> TextArea
Type Constructor
Description Creates a new TextArea instance.
Parameters
  • parent - The parent object.
  • uiFinder - A function which will return the hs._asm.axuielement when available.
Returns
  • A new TextArea object.

Fields

Signature cp.ui.TextArea.focused <cp.prop: boolean>
Type Field
Description Whether or not the Text Area if focused.
Signature cp.ui.TextArea.value <cp.prop: string>
Type Field
Description The current value of the text field.

Methods

Signature cp.ui.TextArea:append(moreText) -> string
Type Method
Description Appends moreText to the end of the current value, returning the combined text value. If no text is currently set, moreText becomes the value.
Parameters
  • moreText - The text to add.
Returns
  • The combined string value.
Signature cp.ui.TextArea:prepend(moreText) -> string
Type Method
Description Appends moreText to the beginning of the current value, returning the combined text value. If no text is currently set, moreText becomes the value.
Parameters
  • moreText - The text to add.
Returns
  • The combined string value.