Window.ixx File
Abstract window interface used by the helios framework. More...
Included Headers
#include <memory>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <helios.rendering.Viewport>
#include <helios.rendering.RenderTarget>
#include <helios.rendering.ViewportSnapshot>
#include <helios.util.log.LogManager>
#include <helios.util.log.Logger>
#include <helios.math.types>
#include <helios.window.WindowConfig>
#include <helios.util.Guid>
Namespaces Index
| namespace | helios |
| namespace | window |
Classes Index
| class | Window |
|
Abstract base class representing a generic window. More... | |
Macro Definitions Index
| #define | HELIOS_LOG_SCOPE "helios::window::Window" |
Description
Abstract window interface used by the helios framework.
Macro Definitions
HELIOS_LOG_SCOPE
|
Definition at line 23 of file Window.ixx.
23#define HELIOS_LOG_SCOPE "helios::window::Window"
File Listing
The file content with the documentation metadata removed is:
23#define HELIOS_LOG_SCOPE "helios::window::Window"
24export namespace helios::window {
40 util::Guid guid_;
47 inline static const helios::util::log::Logger& logger_ = helios::util::log::LogManager::loggerForScope(HELIOS_LOG_SCOPE);
69 int aspectRatioNumer_ = 0;
76 int aspectRatioDenom_ = 0;
82 std::unique_ptr<helios::rendering::RenderTarget> renderTarget_;
107 std::unique_ptr<helios::rendering::RenderTarget> renderTarget,
108 const WindowConfig& cfg
110 renderTarget_(std::move(renderTarget)),
113 title_(cfg.title),
114 aspectRatioNumer_(cfg.aspectRatioNumer),
115 aspectRatioDenom_(cfg.aspectRatioDenom),
116 guid_(util::Guid::generate()) {
118 if (!renderTarget_) {
134 [[nodiscard]] virtual bool shouldClose() const = 0;
145 virtual void setShouldClose(bool close) = 0;
153 [[nodiscard]] const util::Guid& guid() const noexcept {
175 virtual void swapBuffers() const noexcept = 0;
185 virtual void pollEvents() const noexcept = 0;
194 return width_;
204 return height_;
213 [[nodiscard]] helios::rendering::RenderTarget& renderTarget() const noexcept {
214 return *renderTarget_;
224 std::shared_ptr<helios::rendering::Viewport> addViewport(std::shared_ptr<helios::rendering::Viewport> viewport) const {
225 return renderTarget_->addViewport(std::move(viewport));
237 [[nodiscard]] std::vector<helios::rendering::ViewportSnapshot> viewportSnapshots() {
239 for (auto& viewport : renderTarget_->viewports()) {
255 virtual bool operator==(const Window& win) const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.