Implements StarDict-based dictionary lookup from the reader menu, adapted from upstream PR #857 with /.dictionary/ folder path, std::vector compatibility (PR #802), HTML definition rendering, orientation-aware button hints, side button hints with CCW text rotation, sparse index caching to SD card, pronunciation line filtering, and reorganized reader menu with bookmark stubs. Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
483 B
C++
16 lines
483 B
C++
#pragma once
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class LookupHistory {
|
|
public:
|
|
static std::vector<std::string> load(const std::string& cachePath);
|
|
static void addWord(const std::string& cachePath, const std::string& word);
|
|
static void removeWord(const std::string& cachePath, const std::string& word);
|
|
static bool hasHistory(const std::string& cachePath);
|
|
|
|
private:
|
|
static std::string filePath(const std::string& cachePath);
|
|
static constexpr int MAX_ENTRIES = 500;
|
|
};
|