#pragma once #if !defined(RAID_TEST_APPLICATION_HPP_INCLUDED) #define RAID_TEST_APPLICATION_HPP_INCLUDED 1 #include #include "raid/raid.hpp" #include "./frames/config.hpp" #include "./frames/data_table.hpp" namespace raid_test { class Application : public raid::Application { private: struct Frame { using render_fn_t = void (*)(bool& open); const char* title; render_fn_t render; }; static constexpr Frame FRAMES[] = { {.title = CONFIG_TITLE, .render = &renderConfig}, {.title = DATA_TABLE_TITLE, .render = &renderDataTable} }; static constexpr std::size_t NUM_FRAMES = sizeof(FRAMES) / sizeof(FRAMES[0]); raid::FileConfig mConfig; bool mShowMetrics = false; std::array mFrameOpen{}; public: [[nodiscard]] raid::FileConfig& getConfig() noexcept { return mConfig; } protected: bool init() override; void configureImgui() override; void render() override; std::string getFolderName() override; std::string getWindowTitle() override; }; extern Application gApplication; } // namespace raid_test #endif // !defined(RAID_TEST_APPLICATION_HPP_INCLUDED)