Logo Search packages:      
Sourcecode: djvulibre version File versions

DjVuANT Class Reference

#include <DjVuAnno.h>

Inheritance diagram for DjVuANT:

GPEnabled

List of all members.


Detailed Description

This class contains some trivial annotations of the page or of the document such as page border color, page alignment, initial zoom and display mode, hyperlinks and highlighted areas. All this information is put inside a textual chunk ANTa# in pseudo-lisp format. Decoding and encoding are normally done by {DjVuANT::decode}() and {DjVuANT::encode}() functions.

Definition at line 113 of file DjVuAnno.h.


Public Types

enum  {
  MODE_UNSPEC = 0, MODE_COLOR, MODE_FORE, MODE_BACK,
  MODE_BW
}
enum  {
  ZOOM_STRETCH = -4, ZOOM_ONE2ONE = -3, ZOOM_WIDTH = -2, ZOOM_PAGE = -1,
  ZOOM_UNSPEC = 0
}
enum  alignment {
  ALIGN_UNSPEC = 0, ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT,
  ALIGN_TOP, ALIGN_BOTTOM
}

Public Member Functions

GP< DjVuANTcopy (void) const
 Returns a copy of this object.
void decode (ByteStream &bs)
void encode (ByteStream &bs)
GUTF8String encode_raw (void) const
 Encodes data back into raw annotation data.
int get_count (void) const
unsigned int get_memory_usage () const
GUTF8String get_paramtags (void) const
 Obtain the XML flags for the default specifications.
GUTF8String get_xmlmap (const GUTF8String &name, const int height) const
 Obtain the <MAP></MAP> tag for these annotations.
bool is_empty (void) const
void merge (ByteStream &bs)
void writeMap (ByteStream &bs, const GUTF8String &name, const int height) const
 Write the <MAP></MAP> tag for these annotations.
void writeParam (ByteStream &out_str) const
 Write the XML flags for the default specifications.

Static Public Member Functions

static GP< DjVuANTcreate (void)
 Creates an empty annotation object.
static unsigned long int cvt_color (const char *color, unsigned long int def)
 Converts color from string in #RRGGBB notation to an unsigned integer.

Public Attributes

unsigned long int bg_color
alignment hor_align
GPList< GMapAreamap_areas
GMap< GUTF8String, GUTF8Stringmetadata
int mode
alignment ver_align
int zoom

Protected Member Functions

 DjVuANT (void)
 Constructs an empty annotation object.

Protected Attributes

volatile int count
 The reference counter.

Private Member Functions

void decode (class GLParser &parser)

Static Private Member Functions

static unsigned char decode_comp (char ch1, char ch2)
static void del_all_items (const char *name, class GLParser &parser)
static unsigned long int get_bg_color (class GLParser &parser)
static alignment get_hor_align (class GLParser &parser)
static GPList< GMapAreaget_map_areas (class GLParser &parser)
static GMap< GUTF8String,
GUTF8String
get_metadata (GLParser &parser)
static int get_mode (class GLParser &parser)
static alignment get_ver_align (class GLParser &parser)
static int get_zoom (class GLParser &parser)
static GUTF8String read_raw (ByteStream &str)

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

Generated by  Doxygen 1.6.0   Back to index