Skip to main content

FrameBufferResizeEvent.ixx File

Event representing a change in the framebuffer size. More...

Included Headers

#include <cstdint> #include <string> #include <format> #include <helios.util.Guid> #include <helios.window.event.WindowEvent>

Namespaces Index

namespacehelios
namespacewindow

Window management and configuration. More...

namespaceevent

Window event definitions. More...

Classes Index

classFrameBufferResizeEvent

Event representing a change in the framebuffer's size. More...

Description

Event representing a change in the framebuffer size.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file FrameBufferResizeEvent.ixx
3 * @brief Event representing a change in the framebuffer size.
4 */
5module;
6
7#include <cstdint>
8#include <string>
9#include <format>
10
11export module helios.window.event.FrameBufferResizeEvent;
12
13import helios.window.event.WindowEvent;
14
15import helios.util.Guid;
16
17using namespace helios::window::event;
18
19export namespace helios::window::event {
20
21 /**
22 * @brief Event representing a change in the framebuffer's size.
23 *
24 * The event should be triggered whenever a change in the underlying
25 * framebuffer of a window is detected, indicating that the rendering context
26 * (e.g. OpenGL) might need adjustments. FramebufferResizeEvents
27 * carry the width and the height of the framebuffer.
28 */
29 class FrameBufferResizeEvent final : public WindowEvent {
30
31 public:
32 /**
33 * @brief The width of the framebuffer in pixels.
34 */
35 const int width;
36
37
38 /**
39 * @brief The height of the framebuffer in pixels
40 */
41 const int height;
42
43
44 /**
45 * @brief Constructs a `FrameBufferResizeEvent`.
46 *
47 * @param sourceGuid The Guid of the source of the event.
48 * @param width The new width of the framebuffer.
49 * @param height The new height of the framebuffer.
50 */
53 ) noexcept :
57 {}
58
59
60 /**
61 * @brief Constructs a `FrameBufferResizeEvent`.
62 *
63 * @param sourceGuid The Guid of the source of the event.
64 * @param width The new width of the framebuffer.
65 * @param height The new height of the framebuffer.
66 * @param tag A `uint64_t` tag for identifying/categorizing the event.
67 */
70 int width, int height, uint64_t tag
71 ) noexcept :
75 {}
76
77
78 std::string toString() const noexcept override {
79 return std::format(
80 "FrameBufferResizeEvent[{0}, {1}, {2}, {3}]",
81 sourceGuid.value(),
82 tag(),
83 width,
85 );
86 }
87
88 };
89
90}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.