Proper image rendering ux (#5)

* can draw from selection

* add light-weight render manager to render many images simultaneously

* [debug me] currently the image close button does not do

* the unselected image can be closed now

* can close images and manually open them on demand

* cosmetic

* image view stuff in render subdirectory

* cosmetic

* generate docs

* review

windows support

some cosmetics

💅 and pin libCZI module
This commit is contained in:
m-aXimilian
2025-09-13 14:49:59 +02:00
committed by Maximilian Kueffner
parent 2990f3313d
commit bce12b0bb4
21 changed files with 436 additions and 131 deletions
+10 -5
View File
@@ -1,12 +1,13 @@
#pragma once
#include <cstddef>
#include <memory>
#include "AppGLFW.hpp"
#include "imgui.h"
#include "rendering/RenderImageManager.hpp"
#include "resources/resource.hpp"
#include "utilities/ILog.hpp"
#include "viewmodels/ImageViewFactory.hpp"
namespace pixelarium::ui
{
@@ -14,9 +15,10 @@ class MyApp : public application::AppGLFW
{
public:
MyApp(const utils::log::ILog& log, pixelarium::resources::ImageResourcePool& pool)
: application::AppGLFW(log), pool_(pool)
: application::AppGLFW(log),
pool_(pool),
render_manager_(std::make_unique<render::RenderImageManager>(pool, log))
{
image_view_model_ = std::make_unique<ImageViewFactory>(pool_);
}
protected:
@@ -27,12 +29,15 @@ class MyApp : public application::AppGLFW
private:
void LoadImageProt();
void ImageGalleryRender();
void RenderImages();
private:
resources::ImageResourcePool& pool_;
std::unique_ptr<ImageViewFactory> image_view_model_;
bool image_listp_{false};
std::unique_ptr<render::RenderImageManager> render_manager_;
bool image_listp_{true};
bool auto_show_selectd_image_{true};
bool demop_{false};
ImVec2 curr_dim_;
size_t selected_image_{0};
};
} // namespace pixelarium::ui