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