]> www.fi.muni.cz Git - evince.git/blob - pdf/xpdf/Outline.h
Import of Xpdf 2.02 for merge
[evince.git] / pdf / xpdf / Outline.h
1 //========================================================================
2 //
3 // Outline.h
4 //
5 // Copyright 2002-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
8
9 #ifndef OUTLINE_H
10 #define OUTLINE_H
11
12 #include <aconf.h>
13
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
17
18 #include "Object.h"
19 #include "CharTypes.h"
20
21 class GString;
22 class GList;
23 class XRef;
24 class LinkAction;
25
26 //------------------------------------------------------------------------
27
28 class Outline {
29 public:
30
31   Outline(Object *outlineObj, XRef *xref);
32   ~Outline();
33
34   GList *getItems() { return items; }
35
36 private:
37
38   GList *items;                 // NULL if document has no outline
39                                 //   [OutlineItem]
40 };
41
42 //------------------------------------------------------------------------
43
44 class OutlineItem {
45 public:
46
47   OutlineItem(Dict *dict, XRef *xrefA);
48   ~OutlineItem();
49
50   static GList *readItemList(Object *itemRef, XRef *xrefA);
51
52   void open();
53   void close();
54
55   Unicode *getTitle() { return title; }
56   int getTitleLength() { return titleLen; }
57   LinkAction *getAction() { return action; }
58   GBool isOpen() { return startsOpen; }
59   GBool hasKids() { return firstRef.isRef(); }
60   GList *getKids() { return kids; }
61
62 private:
63
64   XRef *xref;
65   Unicode *title;
66   int titleLen;
67   LinkAction *action;
68   Object firstRef;
69   Object nextRef;
70   GBool startsOpen;
71   GList *kids;                  // NULL unless this item is open [OutlineItem]
72 };
73
74 #endif