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

Side by Side Diff: experimental/PdfViewer/SkPdfFDFFieldDictionary_autogen.h

Issue 16975013: Deal with ca and CA transparency operators in pdf. add comments to generated classes. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 #ifndef __DEFINED__SkPdfFDFFieldDictionary 1 #ifndef __DEFINED__SkPdfFDFFieldDictionary
2 #define __DEFINED__SkPdfFDFFieldDictionary 2 #define __DEFINED__SkPdfFDFFieldDictionary
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 an FDF field dictionary
8 class SkPdfFDFFieldDictionary : public SkPdfDictionary { 9 class SkPdfFDFFieldDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kFDFFieldDictionary_SkPdfObje ctType;} 11 virtual SkPdfObjectType getType() const { return kFDFFieldDictionary_SkPdfObje ctType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFDFFiel dDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFDFFiel dDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfFDFFieldDictionary* asFDFFieldDictionary() {return this;} 14 virtual SkPdfFDFFieldDictionary* asFDFFieldDictionary() {return this;}
14 virtual const SkPdfFDFFieldDictionary* asFDFFieldDictionary() const {return th is;} 15 virtual const SkPdfFDFFieldDictionary* asFDFFieldDictionary() const {return th is;}
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
514 515
515 public: 516 public:
516 private: 517 private:
517 public: 518 public:
518 SkPdfFDFFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObjec t* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfFDFFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObjec t* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfFDFFieldDictionary& operator=(const SkPdfFDFFieldDictionary& from) {this- >fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this; } 523 SkPdfFDFFieldDictionary& operator=(const SkPdfFDFFieldDictionary& from) {this- >fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this; }
523 524
525 /** (Optional) An array containing the immediate children of this field.
526 * Note: Unlike the children of fields in a PDF file, which must be specified a s indirect
527 * object references, those of an FDF field may be either direct or indirect ob jects.
528 **/
529 bool has_Kids() const {
530 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids" , "", NULL));
531 }
532
524 SkPdfArray Kids() const { 533 SkPdfArray Kids() const {
525 SkPdfArray ret; 534 SkPdfArray ret;
526 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret; 535 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret;
527 // TODO(edisonn): warn about missing required field, assert for known good p dfs 536 // TODO(edisonn): warn about missing required field, assert for known good p dfs
528 return SkPdfArray(); 537 return SkPdfArray();
529 } 538 }
530 539
540 /** (Required) The partial field name (see "Field Names" on page 532).
541 **/
542 bool has_T() const {
543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", " ", NULL));
544 }
545
531 std::string T() const { 546 std::string T() const {
532 std::string ret; 547 std::string ret;
533 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", & ret)) return ret; 548 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", & ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 549 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return ""; 550 return "";
536 } 551 }
537 552
553 /** (Optional) The field's value, whose format varies depending on the field typ e; see
554 * the descriptions of individual field types in Section 8.6.3 for further info rmation.
555 **/
556 bool has_V() const {
557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", " ", NULL));
558 }
559
538 SkPdfObject* V() const { 560 SkPdfObject* V() const {
539 SkPdfObject* ret; 561 SkPdfObject* ret;
540 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", & ret)) return ret; 562 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", & ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 563 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return NULL; 564 return NULL;
543 } 565 }
544 566
567 /** (Optional) A set of flags specifying various characteristics of the field (s ee Tables
568 * 8.50 on page 532, 8.53 on page 538, 8.56 on page 543, and 8.58 on page 546). When
569 * imported into an interactive form, the value of this entry replaces that of the Ff
570 * entry in the form's corresponding field dictionary. If this field is present , the SetFf
571 * and ClrFf entries, if any, are ignored.
572 **/
573 bool has_Ff() const {
574 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", NULL));
575 }
576
545 long Ff() const { 577 long Ff() const {
546 long ret; 578 long ret;
547 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", &r et)) return ret; 579 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", &r et)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 580 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return 0; 581 return 0;
550 } 582 }
551 583
584 /** (Optional) A set of flags to be set (turned on) in the Ff entry of the form' s cor-
585 * responding field dictionary. Bits equal to 1 in SetFf cause the correspondin g bits in
586 * Ff to be set to 1. This entry is ignored if an Ff entry is present in the FD F field
587 * dictionary.
588 **/
589 bool has_SetFf() const {
590 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetFf ", "", NULL));
591 }
592
552 long SetFf() const { 593 long SetFf() const {
553 long ret; 594 long ret;
554 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetFf", "", &ret)) return ret; 595 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetFf", "", &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 0; 597 return 0;
557 } 598 }
558 599
600 /** (Optional) A set of flags to be cleared (turned off) in the Ff entry of the form's cor-
601 * responding field dictionary. Bits equal to 1 in ClrFf cause the correspondin g bits in
602 * Ff to be set to 0. If a SetFf entry is also present in the FDF field diction ary, it is
603 * applied before this entry. This entry is ignored if an Ff entry is present i n the FDF
604 * field dictionary.
605 **/
606 bool has_ClrFf() const {
607 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrFf ", "", NULL));
608 }
609
559 long ClrFf() const { 610 long ClrFf() const {
560 long ret; 611 long ret;
561 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrFf", "", &ret)) return ret; 612 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrFf", "", &ret)) return ret;
562 // TODO(edisonn): warn about missing required field, assert for known good p dfs 613 // TODO(edisonn): warn about missing required field, assert for known good p dfs
563 return 0; 614 return 0;
564 } 615 }
565 616
617 /** (Optional) A set of flags specifying various characteristics of the field's widget anno-
618 * tation (see Section 8.4.2, "Annotation Flags"). When imported into an intera ctive
619 * form, the value of this entry replaces that of the F entry in the form's cor responding
620 * annotation dictionary. If this field is present, the SetF and ClrF entries, if any, are
621 * ignored.
622 **/
623 bool has_F() const {
624 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", " ", NULL));
625 }
626
566 long F() const { 627 long F() const {
567 long ret; 628 long ret;
568 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &re t)) return ret; 629 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &re t)) return ret;
569 // TODO(edisonn): warn about missing required field, assert for known good p dfs 630 // TODO(edisonn): warn about missing required field, assert for known good p dfs
570 return 0; 631 return 0;
571 } 632 }
572 633
634 /** (Optional) A set of flags to be set (turned on) in the F entry of the form's corre-
635 * sponding widget annotation dictionary. Bits equal to 1 in SetF cause the cor re-
636 * sponding bits in F to be set to 1. This entry is ignored if an F entry is pr esent in the
637 * FDF field dictionary.
638 **/
639 bool has_SetF() const {
640 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetF" , "", NULL));
641 }
642
573 long SetF() const { 643 long SetF() const {
574 long ret; 644 long ret;
575 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetF", "", &ret)) return ret; 645 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetF", "", &ret)) return ret;
576 // TODO(edisonn): warn about missing required field, assert for known good p dfs 646 // TODO(edisonn): warn about missing required field, assert for known good p dfs
577 return 0; 647 return 0;
578 } 648 }
579 649
650 /** (Optional) A set of flags to be cleared (turned off) in the F entry of the f orm's corre-
651 * sponding widget annotation dictionary. Bits equal to 1 in ClrF cause the cor re-
652 * sponding bits in F to be set to 0. If a SetF entry is also present in the FD F field
653 * dictionary, it is applied before this entry. This entry is ignored if an F e ntry is
654 * present in the FDF field dictionary.
655 **/
656 bool has_ClrF() const {
657 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrF" , "", NULL));
658 }
659
580 long ClrF() const { 660 long ClrF() const {
581 long ret; 661 long ret;
582 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrF", "", &ret)) return ret; 662 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrF", "", &ret)) return ret;
583 // TODO(edisonn): warn about missing required field, assert for known good p dfs 663 // TODO(edisonn): warn about missing required field, assert for known good p dfs
584 return 0; 664 return 0;
585 } 665 }
586 666
667 /** (Optional) An appearance dictionary specifying the appearance of a pushbutto n
668 * field (see "Pushbuttons" on page 539). The appearance dictionary's contents are as
669 * shown in Table 8.13 on page 497, except that the values of the N, R, and D e ntries
670 * must all be streams.
671 **/
672 bool has_AP() const {
673 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", NULL));
674 }
675
587 SkPdfDictionary* AP() const { 676 SkPdfDictionary* AP() const {
588 SkPdfDictionary* ret; 677 SkPdfDictionary* ret;
589 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", &ret)) return ret; 678 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", &ret)) return ret;
590 // TODO(edisonn): warn about missing required field, assert for known good p dfs 679 // TODO(edisonn): warn about missing required field, assert for known good p dfs
591 return NULL; 680 return NULL;
592 } 681 }
593 682
683 /** (Optional; PDF 1.3) A dictionary holding references to external PDF files co ntain-
684 * ing the pages to use for the appearances of a pushbutton field. This diction ary is
685 * similar to an appearance dictionary (see Table 8.13 on page 497), except tha t the
686 * values of the N, R, and D entries must all be named page reference dictionar ies
687 * (Table 8.76 on page 568). This entry is ignored if an AP entry is present.
688 **/
689 bool has_APRef() const {
690 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "APRef ", "", NULL));
691 }
692
594 SkPdfDictionary* APRef() const { 693 SkPdfDictionary* APRef() const {
595 SkPdfDictionary* ret; 694 SkPdfDictionary* ret;
596 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "APRef ", "", &ret)) return ret; 695 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "APRef ", "", &ret)) return ret;
597 // TODO(edisonn): warn about missing required field, assert for known good p dfs 696 // TODO(edisonn): warn about missing required field, assert for known good p dfs
598 return NULL; 697 return NULL;
599 } 698 }
600 699
700 /** (Optional; PDF 1.3; button fields only) An icon fit dictionary (see Table 8. 73) speci-
701 * fying how to display a button field's icon within the annotation rectangle o f its wid-
702 * get annotation.
703 **/
704 bool has_IF() const {
705 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", NULL));
706 }
707
601 SkPdfDictionary* IF() const { 708 SkPdfDictionary* IF() const {
602 SkPdfDictionary* ret; 709 SkPdfDictionary* ret;
603 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", &ret)) return ret; 710 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", &ret)) return ret;
604 // TODO(edisonn): warn about missing required field, assert for known good p dfs 711 // TODO(edisonn): warn about missing required field, assert for known good p dfs
605 return NULL; 712 return NULL;
606 } 713 }
607 714
715 /** (Required; choice fields only) An array of options to be presented to the us er. Each
716 * element of the array can take either of two forms:
717 * * A text string representing one of the available options
718 * * A two-element array consisting of a text string representing one of the a vailable
719 * options and a default appearance string for constructing the item's appea rance
720 * dynamically at viewing time (see "Variable Text" on page 533)
721 **/
722 bool has_Opt() const {
723 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
724 }
725
608 SkPdfArray Opt() const { 726 SkPdfArray Opt() const {
609 SkPdfArray ret; 727 SkPdfArray ret;
610 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret; 728 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
611 // TODO(edisonn): warn about missing required field, assert for known good p dfs 729 // TODO(edisonn): warn about missing required field, assert for known good p dfs
612 return SkPdfArray(); 730 return SkPdfArray();
613 } 731 }
614 732
733 /** (Optional) An action to be performed when this field's widget annotation is activat-
734 * ed (see Section 8.5, "Actions").
735 **/
736 bool has_A() const {
737 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", " ", NULL));
738 }
739
615 SkPdfDictionary* A() const { 740 SkPdfDictionary* A() const {
616 SkPdfDictionary* ret; 741 SkPdfDictionary* ret;
617 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", " ", &ret)) return ret; 742 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", " ", &ret)) return ret;
618 // TODO(edisonn): warn about missing required field, assert for known good p dfs 743 // TODO(edisonn): warn about missing required field, assert for known good p dfs
619 return NULL; 744 return NULL;
620 } 745 }
621 746
747 /** (Optional) An additional-actions dictionary defining the field's behavior in re-
748 * sponse to various trigger events (see Section 8.5.2, "Trigger Events").
749 **/
750 bool has_AA() const {
751 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
752 }
753
622 SkPdfDictionary* AA() const { 754 SkPdfDictionary* AA() const {
623 SkPdfDictionary* ret; 755 SkPdfDictionary* ret;
624 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret; 756 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
625 // TODO(edisonn): warn about missing required field, assert for known good p dfs 757 // TODO(edisonn): warn about missing required field, assert for known good p dfs
626 return NULL; 758 return NULL;
627 } 759 }
628 760
629 }; 761 };
630 762
631 #endif // __DEFINED__SkPdfFDFFieldDictionary 763 #endif // __DEFINED__SkPdfFDFFieldDictionary
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfFDFDictionary_autogen.h ('k') | experimental/PdfViewer/SkPdfFDFFileAnnotationDictionary_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698