]> git.ipfire.org Git - thirdparty/cups.git/blame - pdftops/Outline.h
Merge changes from CUPS 1.4svn-r7199.
[thirdparty/cups.git] / pdftops / Outline.h
CommitLineData
ef416fc2 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 <config.h>
13
14#ifdef USE_GCC_PRAGMAS
15#pragma interface
16#endif
17
18#include "Object.h"
19#include "CharTypes.h"
20
21class GString;
22class GList;
23class XRef;
24class LinkAction;
25
26//------------------------------------------------------------------------
27
28class Outline {
29public:
30
31 Outline(Object *outlineObj, XRef *xref);
32 ~Outline();
33
34 GList *getItems() { return items; }
35
36private:
37
38 GList *items; // NULL if document has no outline
39 // [OutlineItem]
40};
41
42//------------------------------------------------------------------------
43
44class OutlineItem {
45public:
46
47 OutlineItem(Dict *dict, XRef *xrefA);
48 ~OutlineItem();
49
50 static GList *readItemList(Object *firstItemRef, Object *lastItemRef,
51 XRef *xrefA);
52
53 void open();
54 void close();
55
56 Unicode *getTitle() { return title; }
57 int getTitleLength() { return titleLen; }
58 LinkAction *getAction() { return action; }
59 GBool isOpen() { return startsOpen; }
60 GBool hasKids() { return firstRef.isRef(); }
61 GList *getKids() { return kids; }
62
63private:
64
65 XRef *xref;
66 Unicode *title;
67 int titleLen;
68 LinkAction *action;
69 Object firstRef;
70 Object lastRef;
71 Object nextRef;
72 GBool startsOpen;
73 GList *kids; // NULL unless this item is open [OutlineItem]
74};
75
76#endif