docs » cp.ui.ElementCache
Provides caching for Element subclasses that want to cache children.
- Constructors - API calls which return an object, typically one that offers API methods
- ElementCache
- Methods - API calls which can only be made on an object returned by a constructor
- cachedElement
- cacheElement
- clean
- fetchElement
- fetchElements
- reset
| Signature | cp.ui.ElementCache(parent[, createFn]) |
|---|---|
| Type | Constructor |
| Description | Creates and returns a new ElementCache, with the specified parent and function which |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.ElementCache:cachedElement(cache, ui) -> cp.ui.Element or nil |
|---|---|
| Type | Method |
| Description | Returns the cached Element, if it is present. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.ElementCache:cacheElement(element[, ui]) -> none |
|---|---|
| Type | Method |
| Description | Caches the provided Element. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.ElementCache:clean() |
|---|---|
| Type | Method |
| Description | Clears the cache of any invalid (aka dead) items. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.ElementCache:fetchElement(ui) -> cp.ui.Element or nil |
|---|---|
| Type | Method |
| Description | Retrieves the matching Element instance from the cache. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.ElementCache:fetchElements(uis) -> table of cp.ui.Elements or nil |
|---|---|
| Type | Method |
| Description | Fetches a list of Element instances linked to the provided axuielement list. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Signature | cp.ui.ElementCache:reset() -> none |
|---|---|
| Type | Method |
| Description | Removes all cached items from the cache. |
| Parameters |
|
| Returns |
|