Skip to main content

GLFWWindowCloseSystem Class Template

Emits WindowCloseCommand when GLFW reports a close request. More...

Declaration

template <typename THandle, typename TCommandBuffer = NullCommandBuffer> class helios::glfw::systems::GLFWWindowCloseSystem<THandle, TCommandBuffer> { ... }

Public Member Typedefs Index

template <typename THandle, typename TCommandBuffer = NullCommandBuffer>
usingCommandBuffer_type = TCommandBuffer
template <typename THandle, typename TCommandBuffer = NullCommandBuffer>
usingEngineRoleTag = SystemRole

Engine role marker used by runtime registries. More...

Public Member Functions Index

template <typename THandle, typename TCommandBuffer = NullCommandBuffer>
voidupdate (UpdateContext &updateContext, TCommandBuffer &cmdBuffer) noexcept

Scans shown windows and queues close commands for requested closures. More...

Description

Emits WindowCloseCommand when GLFW reports a close request.

Template Parameters
THandle

Window handle type.

Definition at line 44 of file GLFWWindowCloseSystem.ixx.

Public Member Typedefs

CommandBuffer_type

template <typename THandle, typename TCommandBuffer = NullCommandBuffer>
using helios::glfw::systems::GLFWWindowCloseSystem< THandle, TCommandBuffer >::CommandBuffer_type = TCommandBuffer

Definition at line 49 of file GLFWWindowCloseSystem.ixx.

49 using CommandBuffer_type = TCommandBuffer;

EngineRoleTag

template <typename THandle, typename TCommandBuffer = NullCommandBuffer>
using helios::glfw::systems::GLFWWindowCloseSystem< THandle, TCommandBuffer >::EngineRoleTag = SystemRole

Engine role marker used by runtime registries.

Definition at line 54 of file GLFWWindowCloseSystem.ixx.

54 using EngineRoleTag = SystemRole;

Public Member Functions

update()

template <typename THandle, typename TCommandBuffer = NullCommandBuffer>
void helios::glfw::systems::GLFWWindowCloseSystem< THandle, TCommandBuffer >::update (UpdateContext & updateContext, TCommandBuffer & cmdBuffer)
inline noexcept

Scans shown windows and queues close commands for requested closures.

Parameters
updateContext

Frame-local update context.

Definition at line 61 of file GLFWWindowCloseSystem.ixx.

61 void update(UpdateContext& updateContext, TCommandBuffer& cmdBuffer) noexcept {
62
63 for (auto [entity, wc, glfw, wsc, active]: updateContext.view<
64 THandle,
65 WindowComponent<THandle>,
67 WindowShownComponent<THandle>,
68 Active<THandle>
69 >().whereEnabled()) {
70 if (glfwWindowShouldClose(glfw->handle)) {
71 cmdBuffer.template add<WindowCloseCommand<THandle>>(
72 entity.handle()
73 );
74 }
75 }
76 }

The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.