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:
committed by
Maximilian Kueffner
parent
2990f3313d
commit
bce12b0bb4
+10
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user