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

Latest commit

 

History

History
113 lines (93 loc) · 8.66 KB

cp.ui.ScrollBar.md

File metadata and controls

113 lines (93 loc) · 8.66 KB

docs » cp.ui.ScrollBar


Provides access to AXScrollBar axuielement values.

API Overview

API Documentation

Constants

Signature cp.ui.ScrollBar.HORIZONTAL_ORIENTATION <string>
Type Constant
Description The value for AXOrientation when it is horizontal.
Signature cp.ui.ScrollBar.VERTICAL_ORIENTATION <string>
Type Constant
Description The value for AXOrientation when it is vertical.

Constructors

Signature cp.ui.ScrollBar(parent, uiFinder) -> cp.ui.ScrollBar
Type Constructor
Description Creates a new ScrollBar instance with the specified parent and uiFinder.
Parameters
  • parent - the parent object.
  • uiFinder - a function or cp.prop that provides the AXScrollBar axuielement.
Returns
  • The new ScrollBar.

Fields

Signature cp.ui.ScrollBar.hidden <cp.prop: boolean; read-only, live?>
Type Field
Description Is true if the ScrollBar is currently hidden.
Signature cp.ui.ScrollBar.horizontal <cp.prop: boolean; read-only>
Type Field
Description Is true if the ScrollBar is horizontal, otherwise false.
Signature cp.ui.ScrollBar.orientation <cp.prop: string; read-only>
Type Field
Description The AXOrientation string.
Signature cp.ui.ScrollBar.value <cp.prop: number; live?>
Type Field
Description Is the numeric scroll value, typically between 0.0 and 1.0. May be set.
Signature cp.ui.ScrollBar.vertical <cp.prop: boolean; read-only>
Type Field
Description Is true if the ScrollBar is vertical, otherwise false.

Methods

Signature cp.ui.ScrollBar:loadLayout(layout)
Type Method
Description Loads the provided layout table of configuration parameters.
Parameters
  • layout - the table of parameters.
Signature cp.ui.ScrollBar.matches(element) -> boolean
Type Method
Description Checks if the element is a ScrollBar.
Parameters
  • element - The axuielement being matched.
Returns
  • true if matches, otherwise false.
Signature cp.ui.ScrollBar:saveLayout() -> table
Type Method
Description Saves the ScrollBar layout configuration.
Returns
  • a table with the configuration parameters.
Signature cp.ui.ScrollBar:shiftValueBy(amount) -> number
Type Method
Description Attempts to shift the value by the specified amount.
Parameters
  • amount - The amount to shift by.
Returns
  • The new value, or nil if not available.