Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: core/include/fpdfdoc/fpdf_doc.h

Issue 828203002: Clean up bookmark related codes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Constructor Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_bookmark.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef _FPDF_DOC_H_ 7 #ifndef _FPDF_DOC_H_
8 #define _FPDF_DOC_H_ 8 #define _FPDF_DOC_H_
9 #ifndef _FPDF_PARSER_ 9 #ifndef _FPDF_PARSER_
10 #include "../fpdfapi/fpdf_parser.h" 10 #include "../fpdfapi/fpdf_parser.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return m_pRoot; 69 return m_pRoot;
70 } 70 }
71 71
72 protected: 72 protected:
73 73
74 CPDF_Dictionary* m_pRoot; 74 CPDF_Dictionary* m_pRoot;
75 }; 75 };
76 class CPDF_BookmarkTree : public CFX_Object 76 class CPDF_BookmarkTree : public CFX_Object
77 { 77 {
78 public: 78 public:
79 CPDF_BookmarkTree(CPDF_Document* pDoc) : m_pDocument(pDoc) {}
79 80
80 CPDF_BookmarkTree(CPDF_Document* pDoc) 81 CPDF_Bookmark» » GetFirstChild(const CPDF_Bookmark& parent) const ;
81 {
82 m_pDocument = pDoc;
83 }
84 public:
85 82
83 CPDF_Bookmark GetNextSibling(const CPDF_Bookmark& bookmark) co nst;
86 84
85 CPDF_Document* GetDocument() const { return m_pDocument; }
87 86
88 CPDF_Bookmark GetFirstChild(CPDF_Bookmark parent);
89
90 CPDF_Bookmark GetNextSibling(CPDF_Bookmark bookmark);
91
92
93 CPDF_Document* GetDocument() const
94 {
95 return m_pDocument;
96 }
97 protected: 87 protected:
98
99 CPDF_Document* m_pDocument; 88 CPDF_Document* m_pDocument;
100 }; 89 };
101 #define PDFBOOKMARK_ITALIC 1 90 #define PDFBOOKMARK_ITALIC 1
102 #define PDFBOOKMARK_BOLD 2 91 #define PDFBOOKMARK_BOLD 2
103 class CPDF_Bookmark : public CFX_Object 92 class CPDF_Bookmark : public CFX_Object
104 { 93 {
105 public: 94 public:
106 95
107 CPDF_Bookmark(CPDF_Dictionary* pDict = NULL) 96 CPDF_Bookmark() : m_pDict(NULL) {}
108 {
109 m_pDict = pDict;
110 }
111 97
112 operator CPDF_Dictionary*() const 98 explicit CPDF_Bookmark(CPDF_Dictionary* pDict) : m_pDict(pDict) {}
113 {
114 return m_pDict;
115 }
116 99
100 CPDF_Dictionary* GetDict() const { return m_pDict; }
117 101
102 operator bool() const { return m_pDict != NULL; }
118 103
119 FX_DWORD» » » GetColorRef(); 104 FX_DWORD» » » GetColorRef() const;
120 105
121 FX_DWORD» » » GetFontStyle(); 106 FX_DWORD» » » GetFontStyle() const;
122 107
123 CFX_WideString» » GetTitle(); 108 CFX_WideString» » GetTitle() const;
124 109
110 CPDF_Dest GetDest(CPDF_Document* pDocument) const;
125 111
126 112 CPDF_Action»» » GetAction() const;
127
128 CPDF_Dest» » » GetDest(CPDF_Document* pDocument);
129
130 CPDF_Action»» » GetAction();
131
132 113
133 CPDF_Dictionary* m_pDict; 114 CPDF_Dictionary* m_pDict;
134 }; 115 };
135 #define PDFZOOM_XYZ 1 116 #define PDFZOOM_XYZ 1
136 #define PDFZOOM_FITPAGE 2 117 #define PDFZOOM_FITPAGE 2
137 #define PDFZOOM_FITHORZ 3 118 #define PDFZOOM_FITHORZ 3
138 #define PDFZOOM_FITVERT 4 119 #define PDFZOOM_FITVERT 4
139 #define PDFZOOM_FITRECT 5 120 #define PDFZOOM_FITRECT 5
140 #define PDFZOOM_FITBBOX 6 121 #define PDFZOOM_FITBBOX 6
141 #define PDFZOOM_FITBHORZ 7 122 #define PDFZOOM_FITBHORZ 7
142
143 #define PDFZOOM_FITBVERT 8 123 #define PDFZOOM_FITBVERT 8
144 class CPDF_Dest : public CFX_Object 124 class CPDF_Dest : public CFX_Object
145 { 125 {
146 public: 126 public:
147 127
148 CPDF_Dest(CPDF_Object* pObj = NULL) 128 CPDF_Dest(CPDF_Object* pObj = NULL)
149 { 129 {
150 m_pObj = pObj; 130 m_pObj = pObj;
151 } 131 }
152 132
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 FX_FLOAT GetOriginalColor(int index, FX_BSTR csEn try); 1768 FX_FLOAT GetOriginalColor(int index, FX_BSTR csEn try);
1789 1769
1790 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], FX_BSTR csEntry); 1770 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], FX_BSTR csEntry);
1791 1771
1792 CFX_WideString GetCaption(FX_BSTR csEntry); 1772 CFX_WideString GetCaption(FX_BSTR csEntry);
1793 1773
1794 CPDF_Stream* GetIcon(FX_BSTR csEntry); 1774 CPDF_Stream* GetIcon(FX_BSTR csEntry);
1795 friend class CPDF_FormControl; 1775 friend class CPDF_FormControl;
1796 }; 1776 };
1797 #endif 1777 #endif
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_bookmark.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698