fix: reworked ui components

This commit is contained in:
Furqan-14
2026-06-10 21:51:43 +05:30
parent 5f5c09eaa9
commit fa35589f81
12 changed files with 378 additions and 25 deletions
+9 -1
View File
@@ -182,7 +182,15 @@ public:
[[nodiscard]] virtual int pageCount() const noexcept = 0;
[[nodiscard]] virtual DocumentMetadata metadata() const noexcept = 0;
[[nodiscard]] virtual std::expected<std::shared_ptr<PdfPage>, EngineError>
// A single entry in the document outline (bookmarks), flattened with a depth level.
struct OutlineItem {
std::string title;
int pageIndex = -1; // -1 if the destination page can't be resolved
int level = 0; // 0 = top-level
};
[[nodiscard]] virtual std::expected<std::vector<OutlineItem>, EngineError> extractOutline() const = 0;
[[nodiscard]] virtual std::expected<std::shared_ptr<PdfPage>, EngineError>
getPage(int pageIndex) = 0;
[[nodiscard]] virtual std::expected<std::vector<FontInfo>, EngineError>