Files
crosspoint-reader/lib/Epub/Epub/Section.h
2025-12-03 22:06:45 +11:00

30 lines
637 B
C++

#pragma once
#include "Epub.h"
class Page;
class EpdRenderer;
class Section {
Epub* epub;
const int spineIndex;
EpdRenderer* renderer;
std::string cachePath;
void onPageComplete(const Page* page);
public:
int pageCount = 0;
int currentPage = 0;
explicit Section(Epub* epub, const int spineIndex, EpdRenderer* renderer)
: epub(epub), spineIndex(spineIndex), renderer(renderer) {
cachePath = epub->getCachePath() + "/" + std::to_string(spineIndex);
}
~Section() = default;
bool hasCache();
void setupCacheDir() const;
void clearCache() const;
bool persistPageDataToSD();
void renderPage();
};