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

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

Issue 1157773012: Cleanup: Make CPDF_Annot::m_pAnnotDict private. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 6 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_annot.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 CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ 7 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_
8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ 8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_
9 9
10 #include "../fpdfapi/fpdf_parser.h" 10 #include "../fpdfapi/fpdf_parser.h"
11 #include "../fpdfapi/fpdf_render.h" 11 #include "../fpdfapi/fpdf_render.h"
12 12
13 class CFieldTree;
14 class CPDF_AAction;
13 class CPDF_Action; 15 class CPDF_Action;
16 class CPDF_ActionFields;
14 class CPDF_Annot; 17 class CPDF_Annot;
15 class CPDF_AnnotList; 18 class CPDF_AnnotList;
19 class CPDF_ApSettings;
16 class CPDF_Bookmark; 20 class CPDF_Bookmark;
17 class CPDF_BookmarkTree; 21 class CPDF_BookmarkTree;
22 class CPDF_DefaultAppearance;
18 class CPDF_Dest; 23 class CPDF_Dest;
24 class CPDF_DocJSActions;
25 class CPDF_FileSpec;
26 class CPDF_FormControl;
27 class CPDF_FormField;
28 class CPDF_FormNotify;
29 class CPDF_IconFit;
30 class CPDF_InterForm;
19 class CPDF_Link; 31 class CPDF_Link;
20 class CPDF_LinkList; 32 class CPDF_LinkList;
33 class CPDF_LWinParam;
21 class CPDF_Metadata; 34 class CPDF_Metadata;
22 class CPDF_NameTree;
23 class CPDF_NumberTree; 35 class CPDF_NumberTree;
36 class CPDF_OCContext;
37 class CPDF_Page;
38 class CPDF_RenderOptions;
24 class CPDF_TextObject; 39 class CPDF_TextObject;
25 class CPDF_ViewerPreferences; 40 class CPDF_ViewerPreferences;
26 class CPDF_Page;
27 class CPDF_RenderOptions;
28 class CXML_Element; 41 class CXML_Element;
29 class CPDF_OCContext; 42
30 class CPDF_DocJSActions; 43 class CPDF_NameTree
31 class CPDF_ActionFields;
32 class CPDF_AAction;
33 class CPDF_FileSpec;
34 class CPDF_IconFit;
35 class CPDF_DefaultAppearance;
36 class CPDF_InterForm;
37 class CPDF_FormField;
38 class CPDF_FormNotify;
39 class CPDF_FormControl;
40 class CPDF_LWinParam;
41 class CFieldTree;
42 class CPDF_ApSettings;
43 class CPDF_NameTree
44 { 44 {
45 public: 45 public:
46 46
47 CPDF_NameTree(CPDF_Dictionary* pRoot) 47 CPDF_NameTree(CPDF_Dictionary* pRoot)
48 { 48 {
49 m_pRoot = pRoot; 49 m_pRoot = pRoot;
50 } 50 }
51 51
52 CPDF_NameTree(CPDF_Document* pDoc, FX_BSTR category); 52 CPDF_NameTree(CPDF_Document* pDoc, FX_BSTR category);
53 53
(...skipping 10 matching lines...) Expand all
64 64
65 CPDF_Dictionary* GetRoot() const 65 CPDF_Dictionary* GetRoot() const
66 { 66 {
67 return m_pRoot; 67 return m_pRoot;
68 } 68 }
69 69
70 protected: 70 protected:
71 71
72 CPDF_Dictionary* m_pRoot; 72 CPDF_Dictionary* m_pRoot;
73 }; 73 };
74 class CPDF_BookmarkTree 74 class CPDF_BookmarkTree
75 { 75 {
76 public: 76 public:
77 CPDF_BookmarkTree(CPDF_Document* pDoc) : m_pDocument(pDoc) {} 77 CPDF_BookmarkTree(CPDF_Document* pDoc) : m_pDocument(pDoc) {}
78 78
79 CPDF_Bookmark GetFirstChild(const CPDF_Bookmark& parent) const ; 79 CPDF_Bookmark GetFirstChild(const CPDF_Bookmark& parent) const ;
80 80
81 CPDF_Bookmark GetNextSibling(const CPDF_Bookmark& bookmark) co nst; 81 CPDF_Bookmark GetNextSibling(const CPDF_Bookmark& bookmark) co nst;
82 82
83 CPDF_Document* GetDocument() const { return m_pDocument; } 83 CPDF_Document* GetDocument() const { return m_pDocument; }
84 84
85 protected: 85 protected:
86 CPDF_Document* m_pDocument; 86 CPDF_Document* m_pDocument;
87 }; 87 };
88 #define PDFBOOKMARK_ITALIC 1 88 #define PDFBOOKMARK_ITALIC 1
89 #define PDFBOOKMARK_BOLD 2 89 #define PDFBOOKMARK_BOLD 2
90 class CPDF_Bookmark 90 class CPDF_Bookmark
91 { 91 {
92 public: 92 public:
93 93
94 CPDF_Bookmark() : m_pDict(NULL) {} 94 CPDF_Bookmark() : m_pDict(NULL) {}
95 95
96 explicit CPDF_Bookmark(CPDF_Dictionary* pDict) : m_pDict(pDict) {} 96 explicit CPDF_Bookmark(CPDF_Dictionary* pDict) : m_pDict(pDict) {}
97 97
98 CPDF_Dictionary* GetDict() const { return m_pDict; } 98 CPDF_Dictionary* GetDict() const { return m_pDict; }
99 99
100 operator bool() const { return m_pDict != NULL; } 100 operator bool() const { return m_pDict != NULL; }
(...skipping 11 matching lines...) Expand all
112 CPDF_Dictionary* m_pDict; 112 CPDF_Dictionary* m_pDict;
113 }; 113 };
114 #define PDFZOOM_XYZ 1 114 #define PDFZOOM_XYZ 1
115 #define PDFZOOM_FITPAGE 2 115 #define PDFZOOM_FITPAGE 2
116 #define PDFZOOM_FITHORZ 3 116 #define PDFZOOM_FITHORZ 3
117 #define PDFZOOM_FITVERT 4 117 #define PDFZOOM_FITVERT 4
118 #define PDFZOOM_FITRECT 5 118 #define PDFZOOM_FITRECT 5
119 #define PDFZOOM_FITBBOX 6 119 #define PDFZOOM_FITBBOX 6
120 #define PDFZOOM_FITBHORZ 7 120 #define PDFZOOM_FITBHORZ 7
121 #define PDFZOOM_FITBVERT 8 121 #define PDFZOOM_FITBVERT 8
122 class CPDF_Dest 122 class CPDF_Dest
123 { 123 {
124 public: 124 public:
125 CPDF_Dest() : m_pObj(nullptr) { } 125 CPDF_Dest() : m_pObj(nullptr) { }
126 explicit CPDF_Dest(CPDF_Object* pObj) : m_pObj(pObj) { } 126 explicit CPDF_Dest(CPDF_Object* pObj) : m_pObj(pObj) { }
127 127
128 operator bool () const { return m_pObj != NULL; } 128 operator bool () const { return m_pObj != NULL; }
129 CPDF_Object* GetObject() const { return m_pObj; } 129 CPDF_Object* GetObject() const { return m_pObj; }
130 130
131 CFX_ByteString GetRemoteName(); 131 CFX_ByteString GetRemoteName();
132 int GetPageIndex(CPDF_Document* pDoc); 132 int GetPageIndex(CPDF_Document* pDoc);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 FX_BOOL GetOCGVE(CPDF_Array *pExpression, FX_BOOL bFromC onfig, int nLevel = 0); 176 FX_BOOL GetOCGVE(CPDF_Array *pExpression, FX_BOOL bFromC onfig, int nLevel = 0);
177 177
178 FX_BOOL LoadOCMDState(const CPDF_Dictionary *pOCMDDict, FX_BOOL bFromConfig); 178 FX_BOOL LoadOCMDState(const CPDF_Dictionary *pOCMDDict, FX_BOOL bFromConfig);
179 179
180 CPDF_Document *m_pDocument; 180 CPDF_Document *m_pDocument;
181 181
182 UsageType m_eUsageType; 182 UsageType m_eUsageType;
183 183
184 CFX_MapPtrTemplate<const CPDF_Dictionary*, void*> m_OCGStates; 184 CFX_MapPtrTemplate<const CPDF_Dictionary*, void*> m_OCGStates;
185 }; 185 };
186 class CPDF_LWinParam 186 class CPDF_LWinParam
187 { 187 {
188 public: 188 public:
189 189
190 CPDF_LWinParam(CPDF_Dictionary* pDict) 190 CPDF_LWinParam(CPDF_Dictionary* pDict)
191 { 191 {
192 m_pDict = pDict; 192 m_pDict = pDict;
193 } 193 }
194 194
195 operator CPDF_Dictionary* () const 195 operator CPDF_Dictionary* () const
196 { 196 {
(...skipping 18 matching lines...) Expand all
215 } 215 }
216 216
217 217
218 inline CFX_ByteString GetParameter() 218 inline CFX_ByteString GetParameter()
219 { 219 {
220 return m_pDict->GetString("P"); 220 return m_pDict->GetString("P");
221 } 221 }
222 222
223 CPDF_Dictionary* m_pDict; 223 CPDF_Dictionary* m_pDict;
224 }; 224 };
225 class CPDF_ActionFields 225 class CPDF_ActionFields
226 { 226 {
227 public: 227 public:
228 228
229 CPDF_ActionFields(const CPDF_Action* pAction) 229 CPDF_ActionFields(const CPDF_Action* pAction)
230 { 230 {
231 m_pAction = (CPDF_Action*)pAction; 231 m_pAction = (CPDF_Action*)pAction;
232 } 232 }
233 233
234 operator CPDF_Action*() const 234 operator CPDF_Action*() const
235 { 235 {
236 return m_pAction; 236 return m_pAction;
237 } 237 }
238 238
239 FX_DWORD GetFieldsCount() const; 239 FX_DWORD GetFieldsCount() const;
240 240
241 void GetAllFields(CFX_PtrArray& field Objects) const; 241 void GetAllFields(CFX_PtrArray& field Objects) const;
242 242
243 CPDF_Object* GetField(FX_DWORD iIndex) const; 243 CPDF_Object* GetField(FX_DWORD iIndex) const;
244 244
245 CPDF_Action* m_pAction; 245 CPDF_Action* m_pAction;
246 }; 246 };
247 247
248 #define PDFNAMED_NEXTPAGE 1 248 #define PDFNAMED_NEXTPAGE 1
249 #define PDFNAMED_PREVPAGE 2 249 #define PDFNAMED_PREVPAGE 2
250 #define PDFNAMED_FIRSTPAGE 3 250 #define PDFNAMED_FIRSTPAGE 3
251 #define PDFNAMED_LASTPAGE 4 251 #define PDFNAMED_LASTPAGE 4
252 #define PDFJS_MAXLENGTH 64 252 #define PDFJS_MAXLENGTH 64
253 class CPDF_Action 253 class CPDF_Action
254 { 254 {
255 public: 255 public:
256 enum ActionType { 256 enum ActionType {
257 Unknown = 0, 257 Unknown = 0,
258 GoTo, 258 GoTo,
259 GoToR, 259 GoToR,
260 GoToE, 260 GoToE,
261 Launch, 261 Launch,
262 Thread, 262 Thread,
263 URI, 263 URI,
(...skipping 18 matching lines...) Expand all
282 282
283 CPDF_Dictionary* GetDict() const { return m_pDict; } 283 CPDF_Dictionary* GetDict() const { return m_pDict; }
284 284
285 CFX_ByteString GetTypeName() const 285 CFX_ByteString GetTypeName() const
286 { 286 {
287 return m_pDict->GetString("S"); 287 return m_pDict->GetString("S");
288 } 288 }
289 289
290 ActionType GetType() const; 290 ActionType GetType() const;
291 291
292
293
294 CPDF_Dest GetDest(CPDF_Document* pDoc) const; 292 CPDF_Dest GetDest(CPDF_Document* pDoc) const;
295 293
296
297
298
299
300 CFX_WideString GetFilePath() const; 294 CFX_WideString GetFilePath() const;
301 295
302
303
304
305 FX_BOOL GetNewWindow() const 296 FX_BOOL GetNewWindow() const
306 { 297 {
307 return m_pDict->GetBoolean("NewWindow"); 298 return m_pDict->GetBoolean("NewWindow");
308 } 299 }
309 300
310
311
312
313 CPDF_LWinParam GetWinParam() const; 301 CPDF_LWinParam GetWinParam() const;
314 302
315
316
317
318 CFX_ByteString GetURI(CPDF_Document* pDoc) const; 303 CFX_ByteString GetURI(CPDF_Document* pDoc) const;
319 304
320
321
322
323 FX_BOOL GetMouseMap() const 305 FX_BOOL GetMouseMap() const
324 { 306 {
325 return m_pDict->GetBoolean("IsMap"); 307 return m_pDict->GetBoolean("IsMap");
326 } 308 }
327 309
328
329
330
331 CPDF_ActionFields GetWidgets() const 310 CPDF_ActionFields GetWidgets() const
332 { 311 {
333 return this; 312 return this;
334 } 313 }
335 314
336
337
338
339 FX_BOOL GetHideStatus() const 315 FX_BOOL GetHideStatus() const
340 { 316 {
341 return m_pDict->GetBoolean("H", TRUE); 317 return m_pDict->GetBoolean("H", TRUE);
342 } 318 }
343 319
344
345
346
347 CFX_ByteString GetNamedAction() const 320 CFX_ByteString GetNamedAction() const
348 { 321 {
349 return m_pDict->GetString("N"); 322 return m_pDict->GetString("N");
350 } 323 }
351 324
352
353
354
355 FX_DWORD GetFlags() const 325 FX_DWORD GetFlags() const
356 { 326 {
357 return m_pDict->GetInteger("Flags"); 327 return m_pDict->GetInteger("Flags");
358 } 328 }
359 329
360
361
362
363 CFX_WideString GetJavaScript() const; 330 CFX_WideString GetJavaScript() const;
364 331
365
366
367
368 CPDF_Dictionary* GetAnnot() const; 332 CPDF_Dictionary* GetAnnot() const;
369 333
370
371
372
373 FX_INT32 GetOperationType() const; 334 FX_INT32 GetOperationType() const;
374 335
375
376
377
378 CPDF_Stream* GetSoundStream() const 336 CPDF_Stream* GetSoundStream() const
379 { 337 {
380 return m_pDict->GetStream("Sound"); 338 return m_pDict->GetStream("Sound");
381 } 339 }
382 340
383 FX_FLOAT GetVolume() const 341 FX_FLOAT GetVolume() const
384 { 342 {
385 return m_pDict->GetNumber("Volume"); 343 return m_pDict->GetNumber("Volume");
386 } 344 }
387 345
388 FX_BOOL IsSynchronous() const 346 FX_BOOL IsSynchronous() const
389 { 347 {
390 return m_pDict->GetBoolean("Synchronous"); 348 return m_pDict->GetBoolean("Synchronous");
391 } 349 }
392 350
393 FX_BOOL IsRepeat() const 351 FX_BOOL IsRepeat() const
394 { 352 {
395 return m_pDict->GetBoolean("Repeat"); 353 return m_pDict->GetBoolean("Repeat");
396 } 354 }
397 355
398 FX_BOOL IsMixPlay() const 356 FX_BOOL IsMixPlay() const
399 { 357 {
400 return m_pDict->GetBoolean("Mix"); 358 return m_pDict->GetBoolean("Mix");
401 } 359 }
402 360
403
404
405
406 FX_DWORD GetSubActionsCount() const; 361 FX_DWORD GetSubActionsCount() const;
407 362
408 CPDF_Action GetSubAction(FX_DWORD iIndex) const; 363 CPDF_Action GetSubAction(FX_DWORD iIndex) const;
409 364
410 protected: 365 protected:
411 CPDF_Dictionary* m_pDict; 366 CPDF_Dictionary* m_pDict;
412 }; 367 };
413 class CPDF_AAction 368 class CPDF_AAction
414 { 369 {
415 public: 370 public:
416 371
417 CPDF_AAction(CPDF_Dictionary* pDict = NULL) 372 CPDF_AAction(CPDF_Dictionary* pDict = NULL)
418 { 373 {
419 m_pDict = pDict; 374 m_pDict = pDict;
420 } 375 }
421 376
422 operator CPDF_Dictionary*() const 377 operator CPDF_Dictionary*() const
423 { 378 {
(...skipping 27 matching lines...) Expand all
451 FX_BOOL ActionExist(AActionType eType) const; 406 FX_BOOL ActionExist(AActionType eType) const;
452 407
453 CPDF_Action GetAction(AActionType eType) const; 408 CPDF_Action GetAction(AActionType eType) const;
454 409
455 FX_POSITION GetStartPos() const; 410 FX_POSITION GetStartPos() const;
456 411
457 CPDF_Action GetNextAction(FX_POSITION& pos, AActionType& eTy pe) const; 412 CPDF_Action GetNextAction(FX_POSITION& pos, AActionType& eTy pe) const;
458 413
459 CPDF_Dictionary* m_pDict; 414 CPDF_Dictionary* m_pDict;
460 }; 415 };
461 class CPDF_DocJSActions 416 class CPDF_DocJSActions
462 { 417 {
463 public: 418 public:
464 CPDF_DocJSActions(CPDF_Document* pDoc); 419 CPDF_DocJSActions(CPDF_Document* pDoc);
465 420
466 421
467 int CountJSActions() const; 422 int CountJSActions() const;
468 423
469 CPDF_Action GetJSAction(int index, CFX_ByteString& csName) c onst; 424 CPDF_Action GetJSAction(int index, CFX_ByteString& csName) c onst;
470 425
471 CPDF_Action GetJSAction(const CFX_ByteString& csName) const; 426 CPDF_Action GetJSAction(const CFX_ByteString& csName) const;
472 427
473 int FindJSAction(const CFX_ByteString& csNam e) const; 428 int FindJSAction(const CFX_ByteString& csNam e) const;
474 429
475 430
476 CPDF_Document* GetDocument() const 431 CPDF_Document* GetDocument() const
477 { 432 {
478 return m_pDocument; 433 return m_pDocument;
479 } 434 }
480 435
481 protected: 436 protected:
482 437
483 CPDF_Document* m_pDocument; 438 CPDF_Document* m_pDocument;
484 }; 439 };
485 class CPDF_FileSpec 440 class CPDF_FileSpec
486 { 441 {
487 public: 442 public:
488 443
489 CPDF_FileSpec(); 444 CPDF_FileSpec();
490 445
491 CPDF_FileSpec(CPDF_Object *pObj) 446 CPDF_FileSpec(CPDF_Object *pObj)
492 { 447 {
493 m_pObj = pObj; 448 m_pObj = pObj;
494 } 449 }
495 450
496 operator CPDF_Object*() const 451 operator CPDF_Object*() const
497 { 452 {
498 return m_pObj; 453 return m_pObj;
499 } 454 }
500 455
501 FX_BOOL IsURL() const; 456 FX_BOOL IsURL() const;
502 457
503 FX_BOOL GetFileName(CFX_WideString &wsFileName) const; 458 FX_BOOL GetFileName(CFX_WideString &wsFileName) const;
504 459
505 CPDF_Stream* GetFileStream() const; 460 CPDF_Stream* GetFileStream() const;
506 461
507 void SetFileName(FX_WSTR wsFileName, FX_BOOL bURL = F ALSE); 462 void SetFileName(FX_WSTR wsFileName, FX_BOOL bURL = F ALSE);
508 protected: 463 protected:
509 464
510 CPDF_Object *m_pObj; 465 CPDF_Object *m_pObj;
511 }; 466 };
512 class CPDF_LinkList 467 class CPDF_LinkList
513 { 468 {
514 public: 469 public:
515 470
516 CPDF_LinkList(CPDF_Document* pDoc) 471 CPDF_LinkList(CPDF_Document* pDoc)
517 { 472 {
518 m_pDocument = pDoc; 473 m_pDocument = pDoc;
519 } 474 }
520 475
521 ~CPDF_LinkList(); 476 ~CPDF_LinkList();
522 477
(...skipping 10 matching lines...) Expand all
533 protected: 488 protected:
534 489
535 CPDF_Document* m_pDocument; 490 CPDF_Document* m_pDocument;
536 491
537 CFX_MapPtrToPtr m_PageMap; 492 CFX_MapPtrToPtr m_PageMap;
538 493
539 CFX_PtrArray* GetPageLinks(CPDF_Page* pPage); 494 CFX_PtrArray* GetPageLinks(CPDF_Page* pPage);
540 495
541 void LoadPageLinks(CPDF_Page* pPage, CFX_PtrA rray* pList); 496 void LoadPageLinks(CPDF_Page* pPage, CFX_PtrA rray* pList);
542 }; 497 };
543 class CPDF_Link 498 class CPDF_Link
544 { 499 {
545 public: 500 public:
546 CPDF_Link() : m_pDict(nullptr) { } 501 CPDF_Link() : m_pDict(nullptr) { }
547 explicit CPDF_Link(CPDF_Dictionary* pDict) : m_pDict(pDict) { } 502 explicit CPDF_Link(CPDF_Dictionary* pDict) : m_pDict(pDict) { }
548 503
549 CPDF_Dictionary* GetDict() const { return m_pDict; } 504 CPDF_Dictionary* GetDict() const { return m_pDict; }
550 505
551 CFX_FloatRect GetRect(); 506 CFX_FloatRect GetRect();
552 CPDF_Dest GetDest(CPDF_Document* pDoc); 507 CPDF_Dest GetDest(CPDF_Document* pDoc);
553 CPDF_Action GetAction(); 508 CPDF_Action GetAction();
554 509
555 protected: 510 protected:
556 CPDF_Dictionary* m_pDict; 511 CPDF_Dictionary* m_pDict;
557 }; 512 };
558 #define ANNOTFLAG_INVISIBLE» » » 1 513
559 #define ANNOTFLAG_HIDDEN» » » 2 514 #define ANNOTFLAG_INVISIBLE 0x0001
560 #define ANNOTFLAG_PRINT»» » » 4 515 #define ANNOTFLAG_HIDDEN 0x0002
561 #define ANNOTFLAG_NOZOOM» » » 8 516 #define ANNOTFLAG_PRINT 0x0004
562 #define ANNOTFLAG_NOROTATE» » » 0x10 517 #define ANNOTFLAG_NOZOOM 0x0008
563 #define ANNOTFLAG_NOVIEW» » » 0x20 518 #define ANNOTFLAG_NOROTATE 0x0010
564 #define ANNOTFLAG_READONLY» » » 0x40 519 #define ANNOTFLAG_NOVIEW 0x0020
565 #define ANNOTFLAG_LOCKED» » » 0x80 520 #define ANNOTFLAG_READONLY 0x0040
566 #define ANNOTFLAG_TOGGLENOVIEW» » 0x100 521 #define ANNOTFLAG_LOCKED 0x0080
522 #define ANNOTFLAG_TOGGLENOVIEW 0x0100
523
567 class CPDF_Annot : public CFX_PrivateData 524 class CPDF_Annot : public CFX_PrivateData
568 { 525 {
569 public: 526 public:
570 527 enum AppearanceMode {
571 CPDF_Annot(CPDF_Dictionary* pDict);
572
573 ~CPDF_Annot();
574
575 CPDF_Dictionary*» m_pAnnotDict;
576
577 CFX_ByteString» » GetSubType() const;
578
579 FX_DWORD» » » GetFlags() const
580 {
581 return m_pAnnotDict->GetInteger("F");
582 }
583
584 void» » » » GetRect(CFX_FloatRect& rect) const;
585
586 enum AppearanceMode»{
587 Normal, 528 Normal,
588 Rollover, 529 Rollover,
589 Down 530 Down
590 }; 531 };
591 532
592 FX_BOOL» » » » DrawAppearance(const CPDF_Page* pPage, C FX_RenderDevice* pDevice, const CFX_AffineMatrix* pUser2Device, 533 CPDF_Annot(CPDF_Dictionary* pDict, CPDF_AnnotList* pList);
593 AppearanceMode mode, const CPDF_RenderOpt ions* pOptions); 534 ~CPDF_Annot();
594 535
595 FX_BOOL» » » » DrawInContext(const CPDF_Page* pPage, co nst CPDF_RenderContext* pContext, 536 CFX_ByteString GetSubType() const;
596 const CFX_AffineMatrix* pUser2Device, Appe aranceMode mode);
597 537
598 void» » » » ClearCachedAP(); 538 FX_DWORD GetFlags() const;
599 539
540 void GetRect(CFX_FloatRect& rect) const;
600 541
601 void» » » » DrawBorder(CFX_RenderDevice* pDevice, co nst CFX_AffineMatrix* pUser2Device, 542 CPDF_Dictionary* GetAnnotDict();
602 const CPDF_RenderOptions* pOptions);
603 543
604 CPDF_PageObject*» GetBorder(FX_BOOL bPrint, const CPDF_RenderOptions* pOpt ions); 544 FX_BOOL DrawAppearance(const CPDF_Page* pPage,
545 CFX_RenderDevice* pDevice,
546 const CFX_AffineMatrix* pUser2Device,
547 AppearanceMode mode,
548 const CPDF_RenderOptions* pOptions);
605 549
550 FX_BOOL DrawInContext(const CPDF_Page* pPage,
551 const CPDF_RenderContext* pContext,
552 const CFX_AffineMatrix* pUser2Device,
553 AppearanceMode mode);
606 554
555 void ClearCachedAP();
607 556
608 int»» » » » CountIRTNotes(); 557 void DrawBorder(CFX_RenderDevice* pDevice,
558 const CFX_AffineMatrix* pUser2Device,
559 const CPDF_RenderOptions* pOptions);
609 560
610 CPDF_Annot*»» » GetIRTNote(int index); 561 CPDF_Form* GetAPForm(const CPDF_Page* pPage, AppearanceMode mode);
611 562
563 private:
564 CPDF_Dictionary* const m_pAnnotDict;
612 565
613 CPDF_Form*» » » GetAPForm(const CPDF_Page* pPage, AppearanceMode mode); 566 CPDF_AnnotList* const m_pList;
614 private:
615 567
616 CFX_MapPtrToPtr» » m_APMap; 568 CFX_MapPtrToPtr m_APMap;
617 protected: 569 };
618 friend class» » CPDF_AnnotList;
619 570
620 CPDF_AnnotList*» » m_pList; 571 class CPDF_AnnotList
621
622 CPDF_Reference*» » NewAnnotRef();
623 };
624 class CPDF_AnnotList
625 { 572 {
626 public: 573 public:
627 574
628 CPDF_AnnotList(CPDF_Page* pPage); 575 CPDF_AnnotList(CPDF_Page* pPage);
629 576
630 ~CPDF_AnnotList(); 577 ~CPDF_AnnotList();
631 578
632 void GetAnnotMatrix(const CPDF_Dictionary* pAnnotDict, const CFX_Matr ix* pUser2Device, CFX_Matrix &matrix) const; 579 void GetAnnotMatrix(const CPDF_Dictionary* pAnnotDict, const CFX_Matr ix* pUser2Device, CFX_Matrix &matrix) const;
633 580
634 void GetAnnotRect(const CPDF_Dictionary* pAnnotDict, const CFX_Matrix * pUser2Device, CPDF_Rect &rtAnnot) const; 581 void GetAnnotRect(const CPDF_Dictionary* pAnnotDict, const CFX_Matrix * pUser2Device, CPDF_Rect &rtAnnot) const;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 633
687 void DisplayPass(const CPDF_Page* pPage, CFX_ RenderDevice* pDevice, 634 void DisplayPass(const CPDF_Page* pPage, CFX_ RenderDevice* pDevice,
688 CPDF_RenderContext* pContext, FX_BOOL bPrint ing, CFX_AffineMatrix* pMatrix, 635 CPDF_RenderContext* pContext, FX_BOOL bPrint ing, CFX_AffineMatrix* pMatrix,
689 FX_BOOL bWidget, CPDF_RenderOptions* pOption s, FX_RECT* clip_rect); 636 FX_BOOL bWidget, CPDF_RenderOptions* pOption s, FX_RECT* clip_rect);
690 friend class CPDF_Annot; 637 friend class CPDF_Annot;
691 }; 638 };
692 #define COLORTYPE_TRANSPARENT 0 639 #define COLORTYPE_TRANSPARENT 0
693 #define COLORTYPE_GRAY 1 640 #define COLORTYPE_GRAY 1
694 #define COLORTYPE_RGB 2 641 #define COLORTYPE_RGB 2
695 #define COLORTYPE_CMYK 3 642 #define COLORTYPE_CMYK 3
696 class CPDF_DefaultAppearance 643 class CPDF_DefaultAppearance
697 { 644 {
698 public: 645 public:
699 646
700 CPDF_DefaultAppearance(const CFX_ByteString& csDA = "") 647 CPDF_DefaultAppearance(const CFX_ByteString& csDA = "")
701 { 648 {
702 m_csDA = csDA; 649 m_csDA = csDA;
703 } 650 }
704 651
705 CPDF_DefaultAppearance(const CPDF_DefaultAppearance& cDA) 652 CPDF_DefaultAppearance(const CPDF_DefaultAppearance& cDA)
706 { 653 {
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 #define FORMFIELD_REQUIRED 0x02 963 #define FORMFIELD_REQUIRED 0x02
1017 #define FORMFIELD_NOEXPORT 0x04 964 #define FORMFIELD_NOEXPORT 0x04
1018 #define FORMRADIO_NOTOGGLEOFF 0x100 965 #define FORMRADIO_NOTOGGLEOFF 0x100
1019 #define FORMRADIO_UNISON 0x200 966 #define FORMRADIO_UNISON 0x200
1020 #define FORMTEXT_MULTILINE 0x100 967 #define FORMTEXT_MULTILINE 0x100
1021 #define FORMTEXT_PASSWORD 0x200 968 #define FORMTEXT_PASSWORD 0x200
1022 #define FORMTEXT_NOSCROLL 0x400 969 #define FORMTEXT_NOSCROLL 0x400
1023 #define FORMTEXT_COMB 0x800 970 #define FORMTEXT_COMB 0x800
1024 #define FORMCOMBO_EDIT 0x100 971 #define FORMCOMBO_EDIT 0x100
1025 #define FORMLIST_MULTISELECT 0x100 972 #define FORMLIST_MULTISELECT 0x100
1026 class CPDF_FormField 973 class CPDF_FormField
1027 { 974 {
1028 public: 975 public:
1029 976
1030 enum Type { 977 enum Type {
1031 Unknown, 978 Unknown,
1032 PushButton, 979 PushButton,
1033 RadioButton, 980 RadioButton,
1034 CheckBox, 981 CheckBox,
1035 Text, 982 Text,
1036 RichText, 983 RichText,
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 CFX_WideString GetCheckValue(FX_BOOL bDefault); 1185 CFX_WideString GetCheckValue(FX_BOOL bDefault);
1239 1186
1240 FX_BOOL SetCheckValue(const CFX_WideStri ng& value, FX_BOOL bDefault, FX_BOOL bNotify); 1187 FX_BOOL SetCheckValue(const CFX_WideStri ng& value, FX_BOOL bDefault, FX_BOOL bNotify);
1241 1188
1242 1189
1243 FX_FLOAT m_FontSize; 1190 FX_FLOAT m_FontSize;
1244 1191
1245 CPDF_Font* m_pFont; 1192 CPDF_Font* m_pFont;
1246 }; 1193 };
1247 CPDF_Object* FPDF_GetFieldAttr(CPDF_Dictionary* pFieldDict, const FX_CHAR* na me, int nLevel = 0); 1194 CPDF_Object* FPDF_GetFieldAttr(CPDF_Dictionary* pFieldDict, const FX_CHAR* na me, int nLevel = 0);
1248 class CPDF_IconFit 1195 class CPDF_IconFit
1249 { 1196 {
1250 public: 1197 public:
1251 1198
1252 CPDF_IconFit(CPDF_Dictionary* pDict = NULL) 1199 CPDF_IconFit(CPDF_Dictionary* pDict = NULL)
1253 { 1200 {
1254 m_pDict = pDict; 1201 m_pDict = pDict;
1255 } 1202 }
1256 1203
1257 operator CPDF_Dictionary*() const 1204 operator CPDF_Dictionary*() const
1258 { 1205 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 CPDF_Dictionary* m_pDict; 1237 CPDF_Dictionary* m_pDict;
1291 }; 1238 };
1292 1239
1293 #define TEXTPOS_CAPTION 0 1240 #define TEXTPOS_CAPTION 0
1294 #define TEXTPOS_ICON 1 1241 #define TEXTPOS_ICON 1
1295 #define TEXTPOS_BELOW 2 1242 #define TEXTPOS_BELOW 2
1296 #define TEXTPOS_ABOVE 3 1243 #define TEXTPOS_ABOVE 3
1297 #define TEXTPOS_RIGHT 4 1244 #define TEXTPOS_RIGHT 4
1298 #define TEXTPOS_LEFT 5 1245 #define TEXTPOS_LEFT 5
1299 #define TEXTPOS_OVERLAID 6 1246 #define TEXTPOS_OVERLAID 6
1300 class CPDF_FormControl 1247 class CPDF_FormControl
1301 { 1248 {
1302 public: 1249 public:
1303 1250
1304 CPDF_FormField::Type GetType() 1251 CPDF_FormField::Type GetType()
1305 { 1252 {
1306 return m_pField->GetType(); 1253 return m_pField->GetType();
1307 } 1254 }
1308 1255
1309 CPDF_InterForm* GetInterForm() const 1256 CPDF_InterForm* GetInterForm() const
1310 { 1257 {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 CPDF_ApSettings GetMK(FX_BOOL bCreate); 1445 CPDF_ApSettings GetMK(FX_BOOL bCreate);
1499 1446
1500 CPDF_InterForm* m_pForm; 1447 CPDF_InterForm* m_pForm;
1501 1448
1502 CPDF_FormField* m_pField; 1449 CPDF_FormField* m_pField;
1503 1450
1504 CPDF_Dictionary* m_pWidgetDict; 1451 CPDF_Dictionary* m_pWidgetDict;
1505 friend class CPDF_InterForm; 1452 friend class CPDF_InterForm;
1506 friend class CPDF_FormField; 1453 friend class CPDF_FormField;
1507 }; 1454 };
1508 class CPDF_FormNotify 1455 class CPDF_FormNotify
1509 { 1456 {
1510 public: 1457 public:
1511 1458
1512 virtual ~CPDF_FormNotify() {} 1459 virtual ~CPDF_FormNotify() {}
1513 1460
1514 virtual int BeforeValueChange(const CPDF_FormField* pField, CFX_Wide String& csValue) 1461 virtual int BeforeValueChange(const CPDF_FormField* pField, CFX_Wide String& csValue)
1515 { 1462 {
1516 return 0; 1463 return 0;
1517 } 1464 }
1518 1465
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 { 1497 {
1551 return 0; 1498 return 0;
1552 } 1499 }
1553 1500
1554 virtual int AfterFormImportData(const CPDF_InterForm* pForm) 1501 virtual int AfterFormImportData(const CPDF_InterForm* pForm)
1555 { 1502 {
1556 return 0; 1503 return 0;
1557 } 1504 }
1558 }; 1505 };
1559 FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict ); 1506 FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict );
1560 class CPDF_PageLabel 1507 class CPDF_PageLabel
1561 { 1508 {
1562 public: 1509 public:
1563 1510
1564 CPDF_PageLabel(CPDF_Document* pDocument) 1511 CPDF_PageLabel(CPDF_Document* pDocument)
1565 { 1512 {
1566 m_pDocument = pDocument; 1513 m_pDocument = pDocument;
1567 } 1514 }
1568 1515
1569 1516
1570 CFX_WideString GetLabel(int nPage) cons t; 1517 CFX_WideString GetLabel(int nPage) cons t;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 1561
1615 FX_INT32 NumCopies() const; 1562 FX_INT32 NumCopies() const;
1616 1563
1617 CPDF_Array* PrintPageRange() const; 1564 CPDF_Array* PrintPageRange() const;
1618 1565
1619 CFX_ByteString Duplex() const; 1566 CFX_ByteString Duplex() const;
1620 1567
1621 protected: 1568 protected:
1622 CPDF_Document* m_pDoc; 1569 CPDF_Document* m_pDoc;
1623 }; 1570 };
1624 class CPDF_ApSettings 1571 class CPDF_ApSettings
1625 { 1572 {
1626 public: 1573 public:
1627 1574
1628 CPDF_ApSettings(CPDF_Dictionary* pDict = NULL) 1575 CPDF_ApSettings(CPDF_Dictionary* pDict = NULL)
1629 { 1576 {
1630 m_pDict = pDict; 1577 m_pDict = pDict;
1631 } 1578 }
1632 1579
1633 operator CPDF_Dictionary* () const 1580 operator CPDF_Dictionary* () const
1634 { 1581 {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1744 1691
1745 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], FX_BSTR csEntry); 1692 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], FX_BSTR csEntry);
1746 1693
1747 CFX_WideString GetCaption(FX_BSTR csEntry); 1694 CFX_WideString GetCaption(FX_BSTR csEntry);
1748 1695
1749 CPDF_Stream* GetIcon(FX_BSTR csEntry); 1696 CPDF_Stream* GetIcon(FX_BSTR csEntry);
1750 friend class CPDF_FormControl; 1697 friend class CPDF_FormControl;
1751 }; 1698 };
1752 1699
1753 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ 1700 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_annot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698