69 void onKeypress(std::function<
void(
const std::optional<sf::Event>&)> callback);
87 void onKeyRelease(std::function<
void(
const std::optional<sf::Event>&)> callback);
109 void onTextEntered(std::function<
void(
const std::optional<sf::Event>&)> callback);
122 bool occurred(
const std::optional<sf::Event>& event)
override;
123 bool filter(
const std::optional<sf::Event>& event,
Core* component)
override;
124 void fire(
const std::optional<sf::Event>& event)
override;
#define ML_EXPORT(ClassName)
Register a Malena type with the framework.
Virtual base class for all Malena framework objects.
Base class for all per-event dispatchers in the Malena event system.
Base class for all event-receiving traits.
Trait that adds keyboard-input callbacks to any Core object.
void onTextEntered(std::function< void(const std::optional< sf::Event > &)> callback)
Register a callback invoked when a unicode character is entered while this component has focus,...
void onKeyRelease(std::function< void(const std::optional< sf::Event > &)> callback)
Register a callback invoked when a key is released while this component has focus,...
void onKeypress(std::function< void(const std::optional< sf::Event > &)> callback)
Register a callback invoked when a key is pressed while this component has focus, receiving the raw S...
void onKeyRelease(std::function< void()> callback)
Register a no-argument callback invoked when a key is released while this component has focus.
void onKeypress(std::function< void()> callback)
Register a no-argument callback invoked when a key is pressed while this component has focus.
void onTextEntered(std::function< void()> callback)
Register a no-argument callback invoked when a unicode character is entered while this component has ...