Something went wrong. Try again.
A fork of https://github.com/crosspoint-reader/crosspoint-reader
Something went wrong. Try again.
1.2 kB · 36 lines
C
at master
12345678910111213141516171819202122232425262728293031323334353637#pragma once#include <Epub.h>
#include <memory>
#include "../Activity.h"#include "util/ButtonNavigator.h"
class EpubReaderChapterSelectionActivity final : public Activity { std::shared_ptr<Epub> epub; std::string epubPath; ButtonNavigator buttonNavigator; int currentSpineIndex = 0; int selectorIndex = 0;
// Number of items that fit on a page, derived from logical screen height. // This adapts automatically when switching between portrait and landscape. int getPageItems() const;
// Total TOC items count int getTotalItems() const;
public: explicit EpubReaderChapterSelectionActivity(GfxRenderer& renderer, MappedInputManager& mappedInput, const std::shared_ptr<Epub>& epub, const std::string& epubPath, const int currentSpineIndex) : Activity("EpubReaderChapterSelection", renderer, mappedInput), epub(epub), epubPath(epubPath), currentSpineIndex(currentSpineIndex) {} void onEnter() override; void onExit() override; void loop() override; void render(RenderLock&&) override; bool isReaderActivity() const override { return true; }};