blob: e9bce83cdad668bc372735c455ae4789c587e6b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
//========================================================================
//
// Outline.h
//
// Copyright 2002-2013 Glyph & Cog, LLC
//
//========================================================================
#ifndef OUTLINE_H
#define OUTLINE_H
#include <aconf.h>
#ifdef USE_GCC_PRAGMAS
#pragma interface
#endif
#include "Object.h"
#include "CharTypes.h"
class GString;
class GList;
class XRef;
class LinkAction;
class TextString;
//------------------------------------------------------------------------
class Outline {
public:
Outline(Object *outlineObj, XRef *xref);
~Outline();
GList *getItems() { return items; }
private:
GList *items; // NULL if document has no outline
// [OutlineItem]
};
//------------------------------------------------------------------------
class OutlineItem {
public:
OutlineItem(Object *itemRefA, Dict *dict, OutlineItem *parentA, XRef *xrefA);
~OutlineItem();
static GList *readItemList(Object *firstItemRef, Object *lastItemRef,
OutlineItem *parentA, XRef *xrefA);
void open();
void close();
Unicode *getTitle();
int getTitleLength();
TextString *getTitleTextString() { return title; }
LinkAction *getAction() { return action; }
GBool isOpen() { return startsOpen; }
GBool hasKids() { return firstRef.isRef(); }
GList *getKids() { return kids; }
OutlineItem *getParent() { return parent; }
private:
friend class PDFDoc;
XRef *xref;
TextString *title; // may be NULL
LinkAction *action;
Object itemRef;
Object firstRef;
Object lastRef;
Object nextRef;
GBool startsOpen;
int pageNum; // page number (used by
// PDFDoc::getOutlineTargetPage)
GList *kids; // NULL unless this item is open [OutlineItem]
OutlineItem *parent;
};
#endif
|