Files

43 lines
1.1 KiB
C++
Raw Permalink Normal View History

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 "AppGLFW.hpp"
#include "ILog.hpp"
#include "PixelariumGallery.hpp"
#include "imgui_proxy.hpp"
#include "resource.hpp"
2025-08-18 22:39:43 +00:00
namespace pixelarium::application
2025-08-18 22:39:43 +00:00
{
2025-09-26 21:09:51 +02:00
/// @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 AppGLFW
2025-08-18 22:39:43 +00:00
{
public:
2025-09-22 23:13:28 +02:00
DefaultApp(const utils::log::ILog& log, pixelarium::resources::ImageResourcePool& pool)
2025-10-11 17:23:58 +02:00
: application::AppGLFW(log), pool_(pool), gallery_(log, pool)
2025-08-18 22:39:43 +00:00
{
2026-01-23 23:00:35 +00:00
gallery_.SetLoadFunction([&]() -> void { this->LoadImageDialogue(); });
2025-08-18 22:39:43 +00:00
}
protected:
void MenuBarOptionsColumn1() override;
void MenuBarOptionsColumn2() override;
void Run() override;
2025-10-11 17:23:58 +02:00
protected:
resources::ImageResourcePool& pool_;
application::PixelariumImageGallery gallery_;
protected:
2026-01-23 23:00:35 +00:00
void LoadImageDialogue();
2025-08-18 22:39:43 +00:00
private:
2025-09-13 14:49:59 +02:00
bool image_listp_{true};
2025-08-18 22:39:43 +00:00
bool demop_{false};
ImVec2 curr_dim_;
};
} // namespace pixelarium::application