Listeners.hpp
A class for tracking font event listeners for Widgets.
-
class Listeners
- #include <Listeners.hpp>
Track a set of JavaScript Listeners with their callback IDs.
Public Functions
-
inline Listeners()
-
inline size_t GetSize() const
How many listeners are we tracking?
-
inline Listeners &Set(const std::string &name, size_t fun_id)
Use a pre-calculated function ID with a new listener.
-
template<typename ...Ts>
inline Listeners &Set(const std::string &name, const std::function<void(Ts... args)> &in_fun) Calculate its own function ID with JSWrap.
-
inline void Clear()
Remove all listeners.
-
inline operator bool() const
true/false : do any listeners exist?
Public Static Functions
-
inline Listeners()