mirror of
https://github.com/sebastiandine/Card-Collection-Manager-3.git
synced 2026-08-29 01:08:49 +00:00
major: initial release
* 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>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user