2025-08-18 22:39:43 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
2025-09-13 14:49:59 +02:00
|
|
|
#include <cstddef>
|
2025-08-18 22:39:43 +00:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
#include "AppGLFW.hpp"
|
|
|
|
|
#include "imgui.h"
|
2025-09-13 14:49:59 +02:00
|
|
|
#include "rendering/RenderImageManager.hpp"
|
2025-08-18 22:39:43 +00:00
|
|
|
#include "resources/resource.hpp"
|
|
|
|
|
#include "utilities/ILog.hpp"
|
|
|
|
|
|
|
|
|
|
namespace pixelarium::ui
|
|
|
|
|
{
|
|
|
|
|
class MyApp : public application::AppGLFW
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
MyApp(const utils::log::ILog& log, pixelarium::resources::ImageResourcePool& pool)
|
2025-09-13 14:49:59 +02:00
|
|
|
: application::AppGLFW(log),
|
|
|
|
|
pool_(pool),
|
|
|
|
|
render_manager_(std::make_unique<render::RenderImageManager>(pool, log))
|
2025-08-18 22:39:43 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void MenuBarOptionsColumn1() override;
|
|
|
|
|
void MenuBarOptionsColumn2() override;
|
|
|
|
|
void Run() override;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void LoadImageProt();
|
|
|
|
|
void ImageGalleryRender();
|
2025-09-13 14:49:59 +02:00
|
|
|
void RenderImages();
|
2025-08-18 22:39:43 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
resources::ImageResourcePool& pool_;
|
2025-09-13 14:49:59 +02:00
|
|
|
std::unique_ptr<render::RenderImageManager> render_manager_;
|
|
|
|
|
bool image_listp_{true};
|
|
|
|
|
bool auto_show_selectd_image_{true};
|
2025-08-18 22:39:43 +00:00
|
|
|
bool demop_{false};
|
|
|
|
|
ImVec2 curr_dim_;
|
2025-09-13 14:49:59 +02:00
|
|
|
size_t selected_image_{0};
|
2025-08-18 22:39:43 +00:00
|
|
|
};
|
|
|
|
|
} // namespace pixelarium::ui
|