|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
The part shared by every Interaction: one callback to run when the input the component stands for reaches the entity. More...
#include <headers/guillaume/components/interaction.hpp>


Public Types | |
| using | EventHandler |
| Callback run when the input reaches the entity. | |
Public Member Functions | |
| InteractionBase (void) | |
| Construct an interaction without handler. | |
| void | setOnEventHandler (const EventHandler &handler) |
| Store the callback to run when the input reaches the entity. | |
| EventHandler | getOnEventHandler (void) const |
| Get the callback run when the input reaches the entity. | |
| Public Member Functions inherited from guillaume::ecs::Component | |
| bool | hasChanged (void) const |
| Tell whether a value of the component changed since the flags were last reset (the end of the previous frame). | |
| void | setHasChanged (bool hasChanged) |
| Raise or lower the changed flag. | |
| Component (void)=default | |
| Create a component that is not marked as changed. | |
| virtual | ~Component (void)=default |
| Virtual destructor, so components can be destroyed through the base class. | |
Public Attributes | |
| EventHandler | _onEventHandler |
The part shared by every Interaction: one callback to run when the input the component stands for reaches the entity.
User code (or a widget system) stores the handler; the input system of the matching event calls it during the Event phase.
| EventType | The event the component reacts to. It only makes each interaction a distinct component type; the handler receives nothing. |
Definition at line 54 of file interaction.hpp.
| using guillaume::components::InteractionBase< EventType >::EventHandler |
Callback run when the input reaches the entity.
Definition at line 57 of file interaction.hpp.
| EventHandler guillaume::components::InteractionBase< EventType >::getOnEventHandler | ( | void | ) | const |
Get the callback run when the input reaches the entity.
| void guillaume::components::InteractionBase< EventType >::setOnEventHandler | ( | const EventHandler & | handler | ) |
Store the callback to run when the input reaches the entity.
Always marks the component changed.
| handler | The callback, or nullptr to remove the current one. |
| EventHandler guillaume::components::InteractionBase< EventType >::_onEventHandler |
Callback run when the input reaches the entity; empty by default.
Definition at line 80 of file interaction.hpp.