21#ifndef LSH_CORE_DEVICE_CLICKABLE_MANAGER_HPP
22#define LSH_CORE_DEVICE_CLICKABLE_MANAGER_HPP
37#if defined(LSH_DEBUG) || defined(LSH_STATIC_CONFIG_RUNTIME_CHECKS)
38extern etl::array<Clickable *, CONFIG_MAX_CLICKABLES> clickables;
41[[nodiscard]]
auto getId(uint8_t clickableIndex) -> uint8_t;
43[[nodiscard]]
auto getIndex(uint8_t clickableId) -> uint8_t;
44[[nodiscard]]
auto tryGetIndex(uint8_t clickableId, uint8_t &clickableIndex)
A class that represents a clickable object, like a button, and its associated logic.
Definition clickable.hpp:42
Safe wrapper for ETL array with Arduino min/max macros neutralized locally.
Globally stores all clickables (like buttons) and to operates over them.
Definition clickable_manager.cpp:33
auto getId(uint8_t clickableIndex) -> uint8_t
Return the static wire ID for one registered clickable index.
Definition clickable_manager.cpp:91
void finalizeSetup()
Validate the configured clickable table before runtime checks start.
Definition clickable_manager.cpp:174
auto tryGetIndex(uint8_t clickableId, uint8_t &clickableIndex) -> bool
Resolves a clickable ID to its dense runtime index with a single map lookup.
Definition clickable_manager.cpp:143
auto clickableExists(uint8_t clickableId) -> bool
Get if the clickable actually exists.
Definition clickable_manager.cpp:161
auto getClickable(uint8_t clickableId) -> Clickable *
Get a single clickable.
Definition clickable_manager.cpp:103
auto getIndex(uint8_t clickableId) -> uint8_t
Get a single clickable index (in device vector of clickable).
Definition clickable_manager.cpp:125
Internal bridge that imports static profile resources into the library's scope.