OLD | NEW |
1 #ifndef __DEFINED__SkPdfInteractiveFormDictionary | 1 #ifndef __DEFINED__SkPdfInteractiveFormDictionary |
2 #define __DEFINED__SkPdfInteractiveFormDictionary | 2 #define __DEFINED__SkPdfInteractiveFormDictionary |
3 | 3 |
4 #include "SkPdfEnums_autogen.h" | 4 #include "SkPdfEnums_autogen.h" |
5 #include "SkPdfArray_autogen.h" | 5 #include "SkPdfArray_autogen.h" |
6 #include "SkPdfDictionary_autogen.h" | 6 #include "SkPdfDictionary_autogen.h" |
7 | 7 |
| 8 // Entries in the interactive form dictionary |
8 class SkPdfInteractiveFormDictionary : public SkPdfDictionary { | 9 class SkPdfInteractiveFormDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kInteractiveFormDictionary_Sk
PdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kInteractiveFormDictionary_Sk
PdfObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kInterac
tiveFormDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kInterac
tiveFormDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfInteractiveFormDictionary* asInteractiveFormDictionary() {return
this;} | 14 virtual SkPdfInteractiveFormDictionary* asInteractiveFormDictionary() {return
this;} |
14 virtual const SkPdfInteractiveFormDictionary* asInteractiveFormDictionary() co
nst {return this;} | 15 virtual const SkPdfInteractiveFormDictionary* asInteractiveFormDictionary() co
nst {return this;} |
15 | 16 |
16 private: | 17 private: |
17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} | 18 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 515 |
515 public: | 516 public: |
516 private: | 517 private: |
517 public: | 518 public: |
518 SkPdfInteractiveFormDictionary(const PdfMemDocument* podofoDoc = NULL, const P
dfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfInteractiveFormDictionary(const PdfMemDocument* podofoDoc = NULL, const P
dfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfInteractiveFormDictionary& operator=(const SkPdfInteractiveFormDictionary
& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj;
return *this;} | 523 SkPdfInteractiveFormDictionary& operator=(const SkPdfInteractiveFormDictionary
& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj;
return *this;} |
523 | 524 |
| 525 /** (Required) An array of references to the document's root fields (those with |
| 526 * no ancestors in the field hierarchy). |
| 527 **/ |
| 528 bool has_Fields() const { |
| 529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Field
s", "", NULL)); |
| 530 } |
| 531 |
524 SkPdfArray Fields() const { | 532 SkPdfArray Fields() const { |
525 SkPdfArray ret; | 533 SkPdfArray ret; |
526 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "
", &ret)) return ret; | 534 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "
", &ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 535 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return SkPdfArray(); | 536 return SkPdfArray(); |
529 } | 537 } |
530 | 538 |
| 539 /** (Optional) A flag specifying whether to construct appearance streams and |
| 540 * appearance dictionaries for all widget annotations in the document (see |
| 541 * "Variable Text" on page 533). Default value: false. |
| 542 **/ |
| 543 bool has_NeedAppearances() const { |
| 544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NeedA
ppearances", "", NULL)); |
| 545 } |
| 546 |
531 bool NeedAppearances() const { | 547 bool NeedAppearances() const { |
532 bool ret; | 548 bool ret; |
533 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NeedAppeara
nces", "", &ret)) return ret; | 549 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NeedAppeara
nces", "", &ret)) return ret; |
534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 550 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
535 return false; | 551 return false; |
536 } | 552 } |
537 | 553 |
| 554 /** (Optional; PDF 1.3) A set of flags specifying various document-level char- |
| 555 * acteristics related to signature fields (see Table 8.48, below, and "Signatu
re |
| 556 * Fields" on page 547). Default value: 0. |
| 557 **/ |
| 558 bool has_SigFlags() const { |
| 559 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SigFl
ags", "", NULL)); |
| 560 } |
| 561 |
538 long SigFlags() const { | 562 long SigFlags() const { |
539 long ret; | 563 long ret; |
540 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SigFlags",
"", &ret)) return ret; | 564 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SigFlags",
"", &ret)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 565 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return 0; | 566 return 0; |
543 } | 567 } |
544 | 568 |
| 569 /** (Required if any fields in the document have additional-actions dictionaries |
| 570 * containing a C entry; PDF 1.3) An array of indirect references to field dic- |
| 571 * tionaries with calculation actions, defining the calculation order in which |
| 572 * their values will be recalculated when the value of any field changes (see |
| 573 * Section 8.5.2, "Trigger Events"). |
| 574 **/ |
| 575 bool has_CO() const { |
| 576 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO",
"", NULL)); |
| 577 } |
| 578 |
545 SkPdfArray CO() const { | 579 SkPdfArray CO() const { |
546 SkPdfArray ret; | 580 SkPdfArray ret; |
547 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO", "", &
ret)) return ret; | 581 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO", "", &
ret)) return ret; |
548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 582 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
549 return SkPdfArray(); | 583 return SkPdfArray(); |
550 } | 584 } |
551 | 585 |
| 586 /** (Optional) A document-wide default value for the DR attribute of variable |
| 587 * text fields (see "Variable Text" on page 533). |
| 588 **/ |
| 589 bool has_DR() const { |
| 590 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR",
"", NULL)); |
| 591 } |
| 592 |
552 SkPdfDictionary* DR() const { | 593 SkPdfDictionary* DR() const { |
553 SkPdfDictionary* ret; | 594 SkPdfDictionary* ret; |
554 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR",
"", &ret)) return ret; | 595 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR",
"", &ret)) return ret; |
555 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 596 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
556 return NULL; | 597 return NULL; |
557 } | 598 } |
558 | 599 |
| 600 /** (Optional) A document-wide default value for the DA attribute of variable |
| 601 * text fields (see "Variable Text" on page 533). |
| 602 **/ |
| 603 bool has_DA() const { |
| 604 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA",
"", NULL)); |
| 605 } |
| 606 |
559 std::string DA() const { | 607 std::string DA() const { |
560 std::string ret; | 608 std::string ret; |
561 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "",
&ret)) return ret; | 609 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "",
&ret)) return ret; |
562 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 610 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
563 return ""; | 611 return ""; |
564 } | 612 } |
565 | 613 |
| 614 /** (Optional) A document-wide default value for the Q attribute of variable |
| 615 * text fields (see "Variable Text" on page 533). |
| 616 **/ |
| 617 bool has_Q() const { |
| 618 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "
", NULL)); |
| 619 } |
| 620 |
566 long Q() const { | 621 long Q() const { |
567 long ret; | 622 long ret; |
568 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", &re
t)) return ret; | 623 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", &re
t)) return ret; |
569 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 624 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
570 return 0; | 625 return 0; |
571 } | 626 } |
572 | 627 |
573 }; | 628 }; |
574 | 629 |
575 #endif // __DEFINED__SkPdfInteractiveFormDictionary | 630 #endif // __DEFINED__SkPdfInteractiveFormDictionary |
OLD | NEW |