beta-0.89.2
[luatex.git] / source / libs / poppler / poppler-src / poppler / Outline.h
blob90190e6928019ba2566c45ef92cbf2b7d6e85b22
1 //========================================================================
2 //
3 // Outline.h
4 //
5 // Copyright 2002-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
9 //========================================================================
11 // Modified under the Poppler project - http://poppler.freedesktop.org
13 // All changes made under the Poppler project to this file are licensed
14 // under GPL version 2 or later
16 // Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com>
18 // To see a description of the changes please see the Changelog file that
19 // came with your tarball or type make ChangeLog if you are building from git
21 //========================================================================
23 #ifndef OUTLINE_H
24 #define OUTLINE_H
26 #ifdef USE_GCC_PRAGMAS
27 #pragma interface
28 #endif
30 #include "Object.h"
31 #include "CharTypes.h"
33 class GooString;
34 class GooList;
35 class XRef;
36 class LinkAction;
38 //------------------------------------------------------------------------
40 class Outline {
41 public:
43 Outline(Object *outlineObj, XRef *xref);
44 ~Outline();
46 GooList *getItems() { return items; }
48 private:
50 GooList *items; // NULL if document has no outline,
51 // otherwise, a list of OutlineItem
54 //------------------------------------------------------------------------
56 class OutlineItem {
57 public:
59 OutlineItem(Dict *dict, XRef *xrefA);
60 ~OutlineItem();
62 static GooList *readItemList(Object *firstItemRef, Object *lastItemRef,
63 XRef *xrefA);
65 void open();
66 void close();
68 Unicode *getTitle() { return title; }
69 int getTitleLength() { return titleLen; }
70 LinkAction *getAction() { return action; }
71 GBool isOpen() { return startsOpen; }
72 GBool hasKids() { return firstRef.isRef(); }
73 GooList *getKids() { return kids; }
75 private:
77 XRef *xref;
78 Unicode *title;
79 int titleLen;
80 LinkAction *action;
81 Object firstRef;
82 Object lastRef;
83 Object nextRef;
84 GBool startsOpen;
85 GooList *kids; // NULL if this item is closed or has no kids,
86 // otherwise a list of OutlineItem
89 #endif