23#include "guillaume/components/focus.hpp"
29 _onFocusGained = handler;
35 return _onFocusGained;
40 _onFocusLost = handler;
55 if (_focused == focused) {
std::function< void(void)> Handler
Focus change callback.
void setOnFocusLostHandler(const Handler &handler)
Store the callback run when the entity loses the focus.
bool isFocused(void) const
Check whether the entity owns the input focus.
Handler getOnFocusLostHandler(void) const
Get the callback run when the entity loses the focus.
Handler getOnFocusGainedHandler(void) const
Get the callback run when the entity gains the focus.
void setFocused(bool focused)
Record whether the entity owns the input focus.
void setOnFocusGainedHandler(const Handler &handler)
Store the callback run when the entity gains the focus.
void setHasChanged(bool hasChanged)
Raise or lower the changed flag.
State. Every class here is plain data attached to an entity.