Add Book map and Page browser features

- Book map: shows a map of content, including TOC,
  boomarks, read pages, non-linear flows...
- Page browser: shows thumbnails of pages.

- ReaderThumbnail: new Reader module that provides
  a service for generating thumbnails of book pages.
  It makes available these 2 new fullscreen widgets.
- ReaderBookmark, ReaderLink, Statistics: add methods
  to return new views of bookmarks, previous locations
  and read pages, that are needed by BookMapWidget.
- ReaderToc: compute TOC max_depth.
- ReaderBookmark, ReaderHighlight: send events on
  bookmark add/update/remove so thumbnails of the
  pages impacted can be trashed.
This commit is contained in:
poire-z
2022-01-04 21:58:56 +01:00
parent 2530e954a2
commit bc16b32395
12 changed files with 3012 additions and 5 deletions

View File

@@ -1710,8 +1710,13 @@ function ReaderHighlight:editHighlightStyle(page, i)
default_provider = self.view.highlight.saved_drawer or
G_reader_settings:readSetting("highlight_drawing_style", "lighten"),
callback = function(radio)
self.view.highlight.saved[page][i].drawer = radio.provider
item.drawer = radio.provider
UIManager:setDirty(self.dialog, "ui")
self.ui:handleEvent(Event:new("BookmarkUpdated",
self.ui.bookmark:getBookmarkForHighlight({
page = self.ui.paging and item.pos0.page or item.pos0,
datetime = item.datetime,
})))
end,
})
end