filters

Outline.h
1//========================================================================
2//
3// Outline.h
4//
5// Copyright 2002 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
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 *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
62private:
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