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

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

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

Powered by Google App Engine
This is Rietveld 408576698