~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to src/xpdflib/outline.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2004-06-08 00:44:02 UTC
  • Revision ID: james.westby@ubuntu.com-20040608004402-72yu51xlh7vt6p9m
Tags: upstream-6.0pre16
ImportĀ upstreamĀ versionĀ 6.0pre16

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- C++ -*-
 
2
//========================================================================
 
3
//
 
4
// Outline.h
 
5
//
 
6
// Copyright 2002 Glyph & Cog, LLC
 
7
//
 
8
//========================================================================
 
9
 
 
10
#ifndef OUTLINE_H
 
11
#define OUTLINE_H
 
12
 
 
13
#include "aconf.h"
 
14
 
 
15
#ifdef USE_GCC_PRAGMAS
 
16
#pragma interface
 
17
#endif
 
18
 
 
19
#include "object.h"
 
20
#include "chartypes.h"
 
21
 
 
22
class GString;
 
23
class GList;
 
24
class XRef;
 
25
class LinkAction;
 
26
 
 
27
//------------------------------------------------------------------------
 
28
 
 
29
class Outline {
 
30
public:
 
31
 
 
32
  Outline(Object *outlineObj, XRef *xref);
 
33
  ~Outline();
 
34
 
 
35
  GList *getItems() { return items; }
 
36
 
 
37
private:
 
38
 
 
39
  GList *items;                 // NULL if document has no outline
 
40
                                //   [OutlineItem]
 
41
};
 
42
 
 
43
//------------------------------------------------------------------------
 
44
 
 
45
class OutlineItem {
 
46
public:
 
47
 
 
48
  OutlineItem(Dict *dict, XRef *xrefA);
 
49
  ~OutlineItem();
 
50
 
 
51
  static GList *readItemList(Object *itemRef, 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
 
 
63
private:
 
64
 
 
65
  XRef *xref;
 
66
  Unicode *title;
 
67
  int titleLen;
 
68
  LinkAction *action;
 
69
  Object firstRef;
 
70
  Object nextRef;
 
71
  GBool startsOpen;
 
72
  GList *kids;                  // NULL unless this item is open [OutlineItem]
 
73
};
 
74
 
 
75
#endif