SmartPDF - lightweight pdf viewer app for rosapps
[reactos.git] / rosapps / smartpdf / poppler / poppler / Annot.h
1 //========================================================================
2 //
3 // Annot.h
4 //
5 // Copyright 2000-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
8
9 #ifndef ANNOT_H
10 #define ANNOT_H
11
12 #ifdef USE_GCC_PRAGMAS
13 #pragma interface
14 #endif
15
16 class XRef;
17 class Gfx;
18 class Catalog;
19
20 //------------------------------------------------------------------------
21 // Annot
22 //------------------------------------------------------------------------
23
24 class Annot {
25 public:
26
27 Annot(XRef *xrefA, Dict *acroForm, Dict *dict);
28 ~Annot();
29 GBool isOk() { return ok; }
30
31 void draw(Gfx *gfx);
32
33 // Get appearance object.
34 Object *getAppearance(Object *obj) { return appearance.fetch(xref, obj); }
35
36 private:
37
38 void generateAppearance(Dict *acroForm, Dict *dict);
39 void readArrayNum(Object *pdfArray, int key, double *value);
40
41 XRef *xref; // the xref table for this PDF file
42 Object appearance; // a reference to the Form XObject stream
43 // for the normal appearance
44 GooString *appearBuf;
45 double xMin, yMin, // annotation rectangle
46 xMax, yMax;
47 GBool ok;
48 };
49
50 //------------------------------------------------------------------------
51 // Annots
52 //------------------------------------------------------------------------
53
54 class Annots {
55 public:
56
57 // Extract non-link annotations from array of annotations.
58 Annots(XRef *xref, Catalog *catalog, Object *annotsObj);
59
60 ~Annots();
61
62 // Iterate through list of annotations.
63 int getNumAnnots() { return nAnnots; }
64 Annot *getAnnot(int i) { return annots[i]; }
65
66 private:
67
68 Annot **annots;
69 int nAnnots;
70 };
71
72 #endif