#pragma once #include #include "activities/Activity.h" #include "activities/home/FileBrowserActivity.h" class Xtc; class ReaderActivity final : public Activity { std::string initialBookPath; std::string currentBookPath; // Track current book path for navigation static std::unique_ptr loadXtc(const std::string& path); static bool isXtcFile(const std::string& path); static bool isTxtFile(const std::string& path); static bool isBmpFile(const std::string& path); void goToLibrary(const std::string& fromBookPath = ""); void onGoToEpubReader(const std::string& path); void onGoToXtcReader(std::unique_ptr xtc); void onGoToTxtReader(const std::string& path); void onGoToBmpViewer(const std::string& path); void onGoBack(); public: explicit ReaderActivity(GfxRenderer& renderer, MappedInputManager& mappedInput, std::string initialBookPath) : Activity("Reader", renderer, mappedInput), initialBookPath(std::move(initialBookPath)) {} void onEnter() override; bool isReaderActivity() const override { return true; } };