Files
crosspoint-reader-mod/src/util/LookupHistory.h
cottongin 8d4bbf284d feat: Add dictionary word lookup feature with cached index
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>
2026-02-12 19:36:14 -05:00

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;
};