MetaImGUI 1.0.0
ImGui Application Template for C++20
Loading...
Searching...
No Matches
UIRenderer.h
Go to the documentation of this file.
1/*
2 MetaImGUI
3 Copyright (C) 2026 A P Nicholson
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include <memory>
22#include <string>
23
24// Forward declarations
25struct GLFWwindow;
26
27namespace MetaImGUI {
28
29// Forward declarations
30struct UpdateInfo;
31struct UIEvents;
32class ISSTracker;
33
41public:
44
45 // Disable copy and move
46 UIRenderer(const UIRenderer&) = delete;
47 UIRenderer& operator=(const UIRenderer&) = delete;
50
56 bool Initialize(GLFWwindow* window);
57
61 void Shutdown();
62
66 void BeginFrame();
67
71 void EndFrame();
72
77 void RenderMainWindow(UIEvents& events);
78
85 void RenderMenuBar(UIEvents& events, bool showDemoWindow, bool showISSTracker);
86
94 void RenderStatusBar(const std::string& statusMessage, float fps, const char* version, bool updateInProgress);
95
100 void RenderAboutWindow(bool& showAboutWindow);
101
107 void RenderUpdateNotification(bool& showUpdateNotification, UpdateInfo* updateInfo);
108
113 void ShowDemoWindow(bool& showDemoWindow);
114
120 void RenderISSTrackerWindow(bool& showISSTracker, ISSTracker* issTracker);
121
126 static void HelpMarker(const char* desc);
127
128private:
129 bool m_initialized = false;
130};
131
132} // namespace MetaImGUI
ISS Tracker that fetches ISS position data asynchronously.
Definition ISSTracker.h:51
Handles all ImGui rendering operations.
Definition UIRenderer.h:40
void ShowDemoWindow(bool &showDemoWindow)
Show ImGui demo window.
void RenderUpdateNotification(bool &showUpdateNotification, UpdateInfo *updateInfo)
Render the update notification dialog.
void RenderAboutWindow(bool &showAboutWindow)
Render the about dialog.
UIRenderer(const UIRenderer &)=delete
void RenderStatusBar(const std::string &statusMessage, float fps, const char *version, bool updateInProgress)
Render the status bar.
UIRenderer & operator=(UIRenderer &&)=delete
UIRenderer & operator=(const UIRenderer &)=delete
void Shutdown()
Shutdown ImGui context.
UIRenderer(UIRenderer &&)=delete
void BeginFrame()
Begin a new ImGui frame.
void RenderMenuBar(UIEvents &events, bool showDemoWindow, bool showISSTracker)
Render the menu bar.
static void HelpMarker(const char *desc)
Helper to show tooltip with question mark.
void RenderISSTrackerWindow(bool &showISSTracker, ISSTracker *issTracker)
Render the ISS tracker window.
void RenderMainWindow(UIEvents &events)
Render the main application window.
bool Initialize(GLFWwindow *window)
Initialize ImGui context and backends.
void EndFrame()
End the current ImGui frame and render.
Decoupled UI-event bus shared between UIRenderer and Application.
Definition UIEvents.h:33