2025-12-17 23:32:18 +11:00
|
|
|
#pragma once
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
#include "../ActivityWithSubactivity.h"
|
|
|
|
|
|
|
|
|
|
class Epub;
|
|
|
|
|
|
|
|
|
|
class ReaderActivity final : public ActivityWithSubactivity {
|
|
|
|
|
std::string initialEpubPath;
|
|
|
|
|
const std::function<void()> onGoBack;
|
|
|
|
|
static std::unique_ptr<Epub> loadEpub(const std::string& path);
|
|
|
|
|
|
|
|
|
|
void onSelectEpubFile(const std::string& path);
|
|
|
|
|
void onGoToFileSelection();
|
|
|
|
|
void onGoToEpubReader(std::unique_ptr<Epub> epub);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit ReaderActivity(GfxRenderer& renderer, InputManager& inputManager, std::string initialEpubPath,
|
|
|
|
|
const std::function<void()>& onGoBack)
|
2025-12-21 21:17:00 +11:00
|
|
|
: ActivityWithSubactivity("Reader", renderer, inputManager),
|
2025-12-17 23:32:18 +11:00
|
|
|
initialEpubPath(std::move(initialEpubPath)),
|
|
|
|
|
onGoBack(onGoBack) {}
|
|
|
|
|
void onEnter() override;
|
|
|
|
|
};
|