#cp.ui.ScrollBar

Provides access to AXScrollBar axuielement values.


#API Overview

Constants - Useful values which cannot be changed

Constructors - API calls which return an object, typically one that offers API methods

Fields - Variables which can only be accessed from an object returned by a constructor

Methods - API calls which can only be made on an object returned by a constructor


#API Documentation

#Constants

Signaturecp.ui.ScrollBar.HORIZONTAL_ORIENTATION <string>
TypeConstant
DescriptionThe value for AXOrientation when it is horizontal.
NotesNone
Sourcesrc/extensions/cp/ui/ScrollBar.lua line 15

Signaturecp.ui.ScrollBar.VERTICAL_ORIENTATION <string>
TypeConstant
DescriptionThe value for AXOrientation when it is vertical.
NotesNone
Sourcesrc/extensions/cp/ui/ScrollBar.lua line 10

#Constructors

Signaturecp.ui.ScrollBar(parent, uiFinder) -> cp.ui.ScrollBar
TypeConstructor
DescriptionCreates 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/ScrollBar.lua line 33

#Fields

Signaturecp.ui.ScrollBar.hidden <cp.prop: boolean; read-only, live?>
TypeField
DescriptionIs true if the ScrollBar is currently hidden.
NotesNone
Sourcesrc/extensions/cp/ui/ScrollBar.lua line 69

Signaturecp.ui.ScrollBar.horizontal <cp.prop: boolean; read-only>
TypeField
DescriptionIs true if the ScrollBar is horizontal, otherwise false.
NotesNone
Sourcesrc/extensions/cp/ui/ScrollBar.lua line 60

Signaturecp.ui.ScrollBar.orientation <cp.prop: string; read-only>
TypeField
DescriptionThe AXOrientation string.
NotesNone
Sourcesrc/extensions/cp/ui/ScrollBar.lua line 44

Signaturecp.ui.ScrollBar.value <cp.prop: number; live?>
TypeField
DescriptionIs the numeric scroll value, typically between 0.0 and 1.0. May be set.
NotesNone
Sourcesrc/extensions/cp/ui/ScrollBar.lua line 76

Signaturecp.ui.ScrollBar.vertical <cp.prop: boolean; read-only>
TypeField
DescriptionIs true if the ScrollBar is vertical, otherwise false.
NotesNone
Sourcesrc/extensions/cp/ui/ScrollBar.lua line 51

#Methods

Signaturecp.ui.ScrollBar:loadLayout(layout)
TypeMethod
DescriptionLoads the provided layout table of configuration parameters.
Parameters
  • layout - the table of parameters.
Returns
    NotesNone
    ExamplesNone
    Sourcesrc/extensions/cp/ui/ScrollBar.lua line 115

    Signaturecp.ui.ScrollBar.matches(element) -> boolean
    TypeMethod
    DescriptionChecks if the element is a ScrollBar.
    Parameters
    • element - The axuielement being matched.
    Returns
    • true if matches, otherwise false.
    NotesNone
    ExamplesNone
    Sourcesrc/extensions/cp/ui/ScrollBar.lua line 20

    Signaturecp.ui.ScrollBar:saveLayout() -> table
    TypeMethod
    DescriptionSaves the ScrollBar layout configuration.
    Parameters
    • None
    Returns
    • a table with the configuration parameters.
    NotesNone
    ExamplesNone
    Sourcesrc/extensions/cp/ui/ScrollBar.lua line 100

    Signaturecp.ui.ScrollBar:shiftValueBy(amount) -> number
    TypeMethod
    DescriptionAttempts to shift the value by the specified amount.
    Parameters
    • amount - The amount to shift by.
    Returns
    • The new value, or nil if not available.
    NotesNone
    ExamplesNone
    Sourcesrc/extensions/cp/ui/ScrollBar.lua line 83