Files
pixelarium/lib/app/DefaultApp.hpp
T
m-aXimilian 1ea83d9d11 Czi rendering (#10)
* add dimension selector sliders to czi view

* version doc & version bump

* cosmetic

* fix build?

* multi-dimension selection enabled in czi view

* remove the parameterized reset function of the renderer

it is not and is conceptually questionable

doc updates & some minor improvements

auto-update CZI-view when sliders are moved

set initial window size

fix windows build and msvc build

For reasons I don not comprehend, on Windows, we must include
=opencv2/core/mat.hpp= as the very last header in the =CvMatRender.hpp=.
If this is at any other position building on Windows, compilation will
break w/ all kinds of cryptic errors regarding OpenCV.

When building w/ msvc =__PRETTY_FUNCTION__= is not defined. =ILog.hpp=
now defines it. This should be revised to only be set when the
compiler is msvc. For the time being, it is considered sufficient though.
2026-02-16 20:36:48 +01:00

47 lines
1.2 KiB
C++

#pragma once
#include <cstddef>
#include <memory>
#include "AppGLFW.hpp"
#include "imgui.h"
#include "rendering/RenderImageManager.hpp"
#include "resources/resource.hpp"
#include "utilities/ILog.hpp"
namespace pixelarium::ui
{
/// @brief Default implementation of AppGLFW.
/// This can either be used as is, as an example or as a base class
/// providing some defaults for a more custom implementation.
class DefaultApp : public application::AppGLFW
{
public:
DefaultApp(const utils::log::ILog& log, pixelarium::resources::ImageResourcePool& pool)
: application::AppGLFW(log),
pool_(pool),
render_manager_(std::make_unique<render::RenderImageManager>(pool, log))
{
}
protected:
void MenuBarOptionsColumn1() override;
void MenuBarOptionsColumn2() override;
void Run() override;
private:
void LoadImage();
void ImageGalleryRender();
void RenderImages();
private:
resources::ImageResourcePool& pool_;
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