source: trunk/poppler/mypoppler/poppler/OptionalContent.h @ 250

Last change on this file since 250 was 250, checked in by Eugene Romanenko, 13 years ago

PDF plugin: poppler library updated to version 0.8.3

File size: 1.7 KB
Line 
1//========================================================================
2//
3// OptionalContent.h
4//
5// Copyright 2007 Brad Hards <bradh@kde.org>
6//
7// Released under the GPL (version 2, or later, at your option)
8//
9//========================================================================
10
11#ifndef OPTIONALCONTENT_H
12#define OPTIONALCONTENT_H
13
14#ifdef USE_GCC_PRAGMAS
15#pragma interface
16#endif
17
18#include "Object.h"
19#include "CharTypes.h"
20
21class GooString;
22class GooList;
23class XRef;
24
25class OptionalContentGroup; 
26
27//------------------------------------------------------------------------
28
29class OCGs {
30public:
31
32  OCGs(Object *ocgObject, XRef *xref);
33  ~OCGs();
34
35  bool hasOCGs();
36  GooList *getOCGs() const { return optionalContentGroups; }
37
38  OptionalContentGroup* findOcgByRef( const Ref &ref);
39
40  Array* getOrderArray() const { return m_orderArray; }
41  Array* getRBGroupsArray() const { return m_rBGroupsArray; }
42
43  bool optContentIsVisible( Object *dictRef );
44
45private:
46  bool allOn( Array *ocgArray );
47  bool allOff( Array *ocgArray );
48  bool anyOn( Array *ocgArray );
49  bool anyOff( Array *ocgArray );
50
51  GooList *optionalContentGroups;
52
53  Array *m_orderArray;
54  Array *m_rBGroupsArray;
55  XRef *m_xref;
56};
57
58//------------------------------------------------------------------------
59
60class OptionalContentGroup {
61public:
62  enum State { On, Off };
63
64  OptionalContentGroup(Dict *dict, XRef *xrefA);
65
66  OptionalContentGroup(GooString *label);
67
68  ~OptionalContentGroup();
69
70  GooString* name() const;
71
72  Ref ref() const;
73  void setRef(const Ref ref);
74
75  State state() { return m_state; };
76  void setState(State state) { m_state = state; };
77
78private:
79  XRef *xref;
80  GooString *m_name;
81  Ref m_ref;
82  State m_state; 
83};
84
85#endif
Note: See TracBrowser for help on using the repository browser.