mirror of
https://github.com/sebastiandine/Card-Collection-Manager-3.git
synced 2026-08-28 23:01:09 +00:00
55ace147bc
* initial development * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * pokemon * pokemon * pokemon * pokemon * pokemon * pokemon * improvements * improvements * ci/cd * ci/cd * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements --------- Co-authored-by: sdine <sdine@sdine.com>
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#pragma once
|
|
|
|
// ImageViewerDialog: full-size image viewer with prev/next navigation.
|
|
|
|
#include <wx/dialog.h>
|
|
#include <wx/button.h>
|
|
#include <wx/event.h>
|
|
#include <wx/image.h>
|
|
#include <wx/panel.h>
|
|
#include <wx/sizer.h>
|
|
#include <wx/stattext.h>
|
|
|
|
#include <filesystem>
|
|
#include <vector>
|
|
|
|
namespace ccm::ui {
|
|
|
|
class ImageViewerDialog : public wxDialog {
|
|
public:
|
|
ImageViewerDialog(wxWindow* parent,
|
|
std::vector<std::filesystem::path> imagePaths,
|
|
std::size_t startIndex);
|
|
|
|
private:
|
|
bool loadImageAt(std::size_t index);
|
|
void prefetchNeighbors();
|
|
void show(std::size_t index);
|
|
void onPrev(wxCommandEvent&);
|
|
void onNext(wxCommandEvent&);
|
|
|
|
std::vector<std::filesystem::path> paths_;
|
|
std::size_t index_{0};
|
|
std::vector<wxImage> imageCache_;
|
|
std::vector<bool> imageCacheReady_;
|
|
|
|
wxPanel* imageHost_{nullptr};
|
|
wxStaticText* caption_{nullptr};
|
|
wxButton* prevButton_{nullptr};
|
|
wxButton* nextButton_{nullptr};
|
|
};
|
|
|
|
} // namespace ccm::ui
|