Logo Search packages:      
Sourcecode: djvulibre version File versions  Download package

DjVuNavDir Class Reference

#include <DjVuNavDir.h>

Inheritance diagram for DjVuNavDir:

GPEnabled

List of all members.


Detailed Description

DjVu Navigation Directory.

This class implements the {navigation directory} of a multipage DjVu document - basically a list of pages that this document is composed of. We would like to emphasize, that this is the list of namely { pages}, not { files}. Any page may include any number of additional files. When you've got an all-in-one-file multipage DjVu document (DjVm archive) you may get the files list from {DjVmDir0} class.

The {DjVuNavDir} class can decode and encode the navigation directory from { NDIR} IFF chunk. It's normally created by the library during decoding procedure and can be accessed like any other component of the {DjVuImage} being decoded.

In a typical multipage DjVu document the navigation directory is stored in a separate IFF file containing only one chunk: { NDIR} chunk. This file should be included (by means of the { INCL} chunk) into every page of the document to enable the navigation.

Definition at line 120 of file DjVuNavDir.h.


Public Member Functions

void decode (ByteStream &str)
 Decodes the directory contents from the given {ByteStream}.
void delete_page (int page_num)
 Deletes page with number page_num# from the directory.
void encode (ByteStream &str)
 Encodes the directory contents into the given {ByteStream}.
int get_count (void) const
int get_memory_usage (void) const
int get_pages_num (void) const
 Returns the number of pages in the directory.
void insert_page (int where, const char *name)
int name_to_page (const char *name) const
GUTF8String page_to_name (int page) const
GURL page_to_url (int page) const
int url_to_page (const GURL &url) const

Static Public Member Functions

static GP< DjVuNavDircreate (ByteStream &str, const GURL &dir_url)
static GP< DjVuNavDircreate (const GURL &dir_url)

Protected Member Functions

 DjVuNavDir (ByteStream &str, const GURL &dir_url)
 DjVuNavDir (const GURL &dir_url)

Protected Attributes

volatile int count
 The reference counter.

Private Attributes

GURL baseURL
GCriticalSection lock
GMap< GUTF8String, int > name2page
GArray< GUTF8Stringpage2name
GMap< GURL, int > url2page

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index