source: trunk/poppler/mypoppler/poppler/Outline.h @ 2

Last change on this file since 2 was 2, checked in by Eugene Romanenko, 15 years ago

First import

File size: 1.5 KB
Line 
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#ifdef USE_GCC_PRAGMAS
13#pragma interface
14#endif
15
16#include "Object.h"
17#include "CharTypes.h"
18
19class GooString;
20class GooList;
21class XRef;
22class LinkAction;
23
24//------------------------------------------------------------------------
25
26class Outline {
27public:
28
29  Outline(Object *outlineObj, XRef *xref);
30  ~Outline();
31
32  GooList *getItems() { return items; }
33
34private:
35
36  GooList *items;               // NULL if document has no outline,
37                                // otherwise, a list of OutlineItem
38};
39
40//------------------------------------------------------------------------
41
42class OutlineItem {
43public:
44
45  OutlineItem(Dict *dict, XRef *xrefA);
46  ~OutlineItem();
47
48  static GooList *readItemList(Object *firstItemRef, Object *lastItemRef,
49                             XRef *xrefA);
50
51  void open();
52  void close();
53
54  Unicode *getTitle() { return title; }
55  int getTitleLength() { return titleLen; }
56  LinkAction *getAction() { return action; }
57  GBool isOpen() { return startsOpen; }
58  GBool hasKids() { return firstRef.isRef(); }
59  GooList *getKids() { return kids; }
60
61private:
62
63  XRef *xref;
64  Unicode *title;
65  int titleLen;
66  LinkAction *action;
67  Object firstRef;
68  Object lastRef;
69  Object nextRef;
70  GBool startsOpen;
71  GooList *kids;        // NULL if this item is closed or has no kids,
72                        // otherwise a list of OutlineItem
73};
74
75#endif
Note: See TracBrowser for help on using the repository browser.