* Since fontchooser is replaced by selectmenu, it
is no longer needed. So I rewrite it into font.lua
module which can cache faces that shared among all
UIs.
* add progressBar method in graphics.lua to draw
reading progress.
* add reading progress information in reading menu.
It is just a demo. Should be clean up in next release
when the real reading menu is out. :)
Now you get a instance rotate :) With only one bug.
I have to restore to previous rotation state of the
native system after exists. Because the native system
does poll the new rotation state that changed by ioctl.
Currently, I don't know how to force the native system
to detect the changes.
* move rotation mode to global variable, now check rotation
with Screen.cur_rotation_mode
* move screenRotate to screen module so other UIs can use it.
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.