some decouplings (#2)
* logger business * code review * rm c-style array * extract image rendering to view * missing view files * init view abstractions * leverage concepts and provide a templateized Enumerate function * RVO * get rid of some warnings * logger business * code review * rm c-style array * extract image rendering to view * missing view files * init view abstractions * leverage concepts and provide a templateized Enumerate function * RVO * get rid of some warnings * logger business * code review * rm c-style array * init view abstractions * leverage concepts and provide a templateized Enumerate function * RVO * get rid of some warnings * logger business * code review * rm c-style array * init view abstractions * leverage concepts and provide a templateized Enumerate function * RVO * get rid of some warnings * Factor out AppGLFW base class The intention here is to get rid of scaffolding in the consumer application class and allow to focus on the "important bits". * Some cleanup * dump unnecessary dependency * link stuff where needed & use only what's needed * remove deprecation warnings * add gallery toggle * make some includes private * add presets * remove dir locals, use presets instead `projectile-configure-project' in conjunction with CMakePresets.json will allow to configure the project. `projectile-compile-project' does sth similar for the compile command. This is equivalent to something like ~cmake --preset clang-debug && cmake --build build --preset clang-debug~ * use presets in pipeline --------- Co-authored-by: m-aXimilian <keuffnermax@gmail.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "AppGLFW.hpp"
|
||||
#include "imgui.h"
|
||||
#include "resources/resource.hpp"
|
||||
#include "utilities/ILog.hpp"
|
||||
#include "viewmodels/ImageViewFactory.hpp"
|
||||
|
||||
namespace pixelarium::ui
|
||||
{
|
||||
class MyApp : public application::AppGLFW
|
||||
{
|
||||
public:
|
||||
MyApp(const utils::log::ILog& log, pixelarium::resources::ImageResourcePool& pool)
|
||||
: application::AppGLFW(log), pool_(pool)
|
||||
{
|
||||
image_view_model_ = std::make_unique<ImageViewFactory>(pool_);
|
||||
}
|
||||
|
||||
protected:
|
||||
void MenuBarOptionsColumn1() override;
|
||||
void MenuBarOptionsColumn2() override;
|
||||
void Run() override;
|
||||
|
||||
private:
|
||||
void LoadImageProt();
|
||||
void ImageGalleryRender();
|
||||
|
||||
private:
|
||||
resources::ImageResourcePool& pool_;
|
||||
std::unique_ptr<ImageViewFactory> image_view_model_;
|
||||
bool image_listp_{false};
|
||||
bool demop_{false};
|
||||
ImVec2 curr_dim_;
|
||||
};
|
||||
} // namespace pixelarium::ui
|
||||
Reference in New Issue
Block a user