dtRdr::GUI::Wx::BookView - view of an open book
This contains the history, widget, book, tree, ...
my $bv = dtRdr::GUI::Wx::BookView->new($book);
This serves as both a dispatch point (for onclick handlers) and as an external interface. In order to properly use the history, you should call this rather than the htmlwidget methods.
$is_handled = $bv->load_url($url);
Only if you're reading a book (for now.)
Returns true if the TOC node is visible.
Jump to an object (currently this must be an annotation, but all it needs to be is something which responds to id(), book(), and node() methods, where the value of id maps to an anchor name on the resultant page.)
my $range = $bv->selection_as_range;
my $hl = $bv->highlight_at_selection;
Create a note and launch the note editor.
my $nt = $bv->note_at_selection;
my $bm = $bv->bookmark_at_selection;
Probably a private method -- else you break the history.
Because some book formats allow toc items to point to other nodes, book->find_toc is called to determine which node to render. This method is preferred over
render_node() because it gives the book a chance to switcharoo the rendered node in the event of a reference/goto.
requested_toc to the node given by $id, but sets
current_toc to the found node and renders that.
Renders the next or previous "page" of the book. This should be analogous to turning pages in a physical book.
PageDown shows the next linear piece of content.
PageUp is the opposite of PageDown.
Ctrl+PageUp/down does a tree jump, staying on the same depth if possible.
Home/End do scrolling.
Moves to the next page in the book. Within a node, "page" is a relative term equal to one visible screen of content. At the end of the node, the "next node" will be loaded.
Page-up in the widget. If at the top of the screen, load the (linearly) previous node and scroll to the bottom.
These take no arguments. The view has everything it needs to handle the moments.
Add the current url and position to the history (call this before moving onward.)
Eric Wilhelm <ewilhelm at cpan dot org>
Copyright (C) 2006 Eric L. Wilhelm and OSoft, All Rights Reserved.
Absolutely, positively NO WARRANTY, neither express or implied, is offered with this software. You use this software at your own risk. In case of loss, no person or entity owes you anything whatsoever. You have been warned.
The dotReader(TM) is OSI Certified Open Source Software licensed under the GNU General Public License (GPL) Version 2, June 1991. Non-encrypted and encrypted packages are usable in connection with the dotReader(TM). The ability to create, edit, or otherwise modify content of such encrypted packages is self-contained within the packages, and NOT provided by the dotReader(TM), and is addressed in a separate commercial license.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.