|
MetaImGUI 1.0.0
ImGui Application Template for C++20
|
Handles all ImGui rendering operations. More...
#include <UIRenderer.h>
Public Member Functions | |
| UIRenderer () | |
| ~UIRenderer () | |
| UIRenderer (const UIRenderer &)=delete | |
| UIRenderer & | operator= (const UIRenderer &)=delete |
| UIRenderer (UIRenderer &&)=delete | |
| UIRenderer & | operator= (UIRenderer &&)=delete |
| bool | Initialize (GLFWwindow *window) |
| Initialize ImGui context and backends. | |
| void | Shutdown () |
| Shutdown ImGui context. | |
| void | BeginFrame () |
| Begin a new ImGui frame. | |
| void | EndFrame () |
| End the current ImGui frame and render. | |
| void | RenderMainWindow (UIEvents &events) |
| Render the main application window. | |
| void | RenderMenuBar (UIEvents &events, bool showDemoWindow, bool showISSTracker) |
| Render the menu bar. | |
| void | RenderStatusBar (const std::string &statusMessage, float fps, const char *version, bool updateInProgress) |
| Render the status bar. | |
| void | RenderAboutWindow (bool &showAboutWindow) |
| Render the about dialog. | |
| void | RenderUpdateNotification (bool &showUpdateNotification, UpdateInfo *updateInfo) |
| Render the update notification dialog. | |
| void | ShowDemoWindow (bool &showDemoWindow) |
| Show ImGui demo window. | |
| void | RenderISSTrackerWindow (bool &showISSTracker, ISSTracker *issTracker) |
| Render the ISS tracker window. | |
Static Public Member Functions | |
| static void | HelpMarker (const char *desc) |
| Helper to show tooltip with question mark. | |
Handles all ImGui rendering operations.
UIRenderer encapsulates all ImGui-specific rendering logic, keeping the Application class focused on high-level orchestration and state management.
Definition at line 40 of file UIRenderer.h.
|
default |
| MetaImGUI::UIRenderer::~UIRenderer | ( | ) |
Definition at line 77 of file UIRenderer.cpp.
References Shutdown().
|
delete |
|
delete |
| void MetaImGUI::UIRenderer::BeginFrame | ( | ) |
Begin a new ImGui frame.
Definition at line 116 of file UIRenderer.cpp.
| void MetaImGUI::UIRenderer::EndFrame | ( | ) |
End the current ImGui frame and render.
Definition at line 122 of file UIRenderer.cpp.
|
static |
Helper to show tooltip with question mark.
| desc | Tooltip description text |
Definition at line 615 of file UIRenderer.cpp.
References MetaImGUI::UILayout::TEXT_WRAP_POS_MULTIPLIER.
| bool MetaImGUI::UIRenderer::Initialize | ( | GLFWwindow * | window | ) |
Initialize ImGui context and backends.
| window | GLFW window pointer |
Definition at line 81 of file UIRenderer.cpp.
References MetaImGUI::ThemeManager::Apply(), and MetaImGUI::ThemeManager::Modern.
|
delete |
|
delete |
| void MetaImGUI::UIRenderer::RenderAboutWindow | ( | bool & | showAboutWindow | ) |
Render the about dialog.
| showAboutWindow | Reference to visibility flag |
Definition at line 303 of file UIRenderer.cpp.
References MetaImGUI::UILayout::ABOUT_WINDOW_HEIGHT, MetaImGUI::UILayout::ABOUT_WINDOW_WIDTH, MetaImGUI::Localization::Instance(), and MetaImGUI::UILayout::VERTICAL_SPACING_SMALL.
| void MetaImGUI::UIRenderer::RenderISSTrackerWindow | ( | bool & | showISSTracker, |
| ISSTracker * | issTracker | ||
| ) |
Render the ISS tracker window.
| showISSTracker | Reference to visibility flag |
| issTracker | Pointer to ISSTracker instance |
Definition at line 495 of file UIRenderer.cpp.
References MetaImGUI::ISSPosition::altitude, MetaImGUI::ISSTracker::GetCurrentPosition(), MetaImGUI::ISSTracker::GetPositionHistory(), MetaImGUI::ISSTracker::IsTracking(), MetaImGUI::ISSPosition::latitude, MetaImGUI::ISSPosition::longitude, MetaImGUI::ISSTracker::StartTracking(), MetaImGUI::ISSTracker::StopTracking(), MetaImGUI::ISSPosition::timestamp, MetaImGUI::ISSPosition::valid, and MetaImGUI::ISSPosition::velocity.
| void MetaImGUI::UIRenderer::RenderMainWindow | ( | UIEvents & | events | ) |
Render the main application window.
| events | UI event bus — Show About / Show Demo / Show Input fire signals here |
Definition at line 127 of file UIRenderer.cpp.
References MetaImGUI::Signal< Args >::Emit(), MetaImGUI::Localization::Instance(), MetaImGUI::UILayout::LEFT_MARGIN, MetaImGUI::UIEvents::showAboutRequested, MetaImGUI::UIEvents::showDemoWindow, MetaImGUI::UIEvents::showInputDialogRequested, MetaImGUI::UILayout::STATUS_BAR_HEIGHT, MetaImGUI::UILayout::TOP_MARGIN, and MetaImGUI::UILayout::VERTICAL_SPACING_SMALL.
| void MetaImGUI::UIRenderer::RenderMenuBar | ( | UIEvents & | events, |
| bool | showDemoWindow, | ||
| bool | showISSTracker | ||
| ) |
Render the menu bar.
| events | UI event bus — menu items fire signals on this object |
| showDemoWindow | Current state of demo window visibility (for tick mark) |
| showISSTracker | Current state of ISS tracker window visibility (for tick mark) |
Definition at line 163 of file UIRenderer.cpp.
References MetaImGUI::ThemeManager::Apply(), MetaImGUI::UIEvents::checkUpdatesRequested, MetaImGUI::ThemeManager::Classic, MetaImGUI::ThemeManager::Dark, MetaImGUI::Signal< Args >::Emit(), MetaImGUI::UIEvents::exitRequested, MetaImGUI::ThemeManager::GetCurrent(), MetaImGUI::Localization::Instance(), MetaImGUI::ThemeManager::Light, MetaImGUI::ThemeManager::Modern, MetaImGUI::UIEvents::showAboutRequested, MetaImGUI::UIEvents::toggleDemoWindow, and MetaImGUI::UIEvents::toggleISSTracker.
| void MetaImGUI::UIRenderer::RenderStatusBar | ( | const std::string & | statusMessage, |
| float | fps, | ||
| const char * | version, | ||
| bool | updateInProgress | ||
| ) |
Render the status bar.
| statusMessage | Status message to display |
| fps | Current FPS |
| version | Version string |
| updateInProgress | Whether an update check is in progress |
Definition at line 236 of file UIRenderer.cpp.
References MetaImGUI::UILayout::ITEM_SPACING_X, MetaImGUI::UILayout::ITEM_SPACING_Y, MetaImGUI::UILayout::STATUS_BAR_HEIGHT, MetaImGUI::UILayout::STATUS_CIRCLE_PADDING, MetaImGUI::UILayout::STATUS_CIRCLE_RADIUS, MetaImGUI::UILayout::STATUS_RIGHT_SIDE_WIDTH, MetaImGUI::UILayout::WINDOW_PADDING_X, and MetaImGUI::UILayout::WINDOW_PADDING_Y.
| void MetaImGUI::UIRenderer::RenderUpdateNotification | ( | bool & | showUpdateNotification, |
| UpdateInfo * | updateInfo | ||
| ) |
Render the update notification dialog.
| showUpdateNotification | Reference to visibility flag |
| updateInfo | Pointer to update information |
Definition at line 350 of file UIRenderer.cpp.
References MetaImGUI::UILayout::BUTTON_CLOSE_WIDTH, MetaImGUI::UILayout::BUTTON_HEIGHT, MetaImGUI::UILayout::BUTTON_OPEN_RELEASE_WIDTH, MetaImGUI::UILayout::BUTTON_REMIND_LATER_WIDTH, MetaImGUI::UpdateInfo::currentVersion, MetaImGUI::UpdateInfo::latestVersion, LOG_ERROR, MetaImGUI::UILayout::RELEASE_NOTES_HEIGHT, MetaImGUI::UpdateInfo::releaseNotes, MetaImGUI::UpdateInfo::releaseUrl, MetaImGUI::UILayout::UPDATE_WINDOW_HEIGHT, MetaImGUI::UILayout::UPDATE_WINDOW_WIDTH, and MetaImGUI::UpdateInfo::updateAvailable.
| void MetaImGUI::UIRenderer::ShowDemoWindow | ( | bool & | showDemoWindow | ) |
Show ImGui demo window.
| showDemoWindow | Reference to visibility flag |
Definition at line 489 of file UIRenderer.cpp.
| void MetaImGUI::UIRenderer::Shutdown | ( | ) |