This mode is used with ZOOM_FIT_TO_CONTENT_WIDTH, so
when press KEY_PGFWD, you jump to lower part of current
page. When hit page bottom, you do a real page turn. It
now behaviors the same like the native reader as I
mentioned in issue #41.
The first time you set to ZOOM_FIT_TO_CONTENT_WIDTH mode,
the reader will setup proper zoom factor and offset, then
switch to ZOOM_FIT_TO_CONTENT_WIDTH_PAN mode. When you hit
the page bottom, the reader will set the mode back to
ZOOM_FIT_TO_CONTENT_WIDTH mode and do a real page turn.
This is especially useful if you want PDF pages which bouding box
includes headers or footers which are full page width files like #25
I opted to ignore margins with Shift+F to be consistant with other zoom
modes.
It's important for us to take maring into account because rouding error
can force us to skip right marging. However, this shouldn't be done
when not in pan_by_page mode, so this diff is artifically large
re-apply the changes introduced by HW in commit:
3c56f50cae
I mistakenly overwrote it when merging from djvu
branch. :(
Since the title needs to be cleaned in two places,
I turn it into a method.
NOTE that the jumpstack maintaining strategy has
been changed in this commit compared to commit #15
and #31. Now current viewing page in kept in the
stack to preserve the notes.
Add unireader class for better code reuse.
Now pdfreader and djvureader are subclass of
unireader.
Every subclass needs to have a init() method
that will be called in reader.lua.