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

Side by Side Diff: experimental/PdfViewer/SkPdfFieldDictionary_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__SkPdfFieldDictionary 1 #ifndef __DEFINED__SkPdfFieldDictionary
2 #define __DEFINED__SkPdfFieldDictionary 2 #define __DEFINED__SkPdfFieldDictionary
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 common to all field dictionaries
8 class SkPdfFieldDictionary : public SkPdfDictionary { 9 class SkPdfFieldDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kFieldDictionary_SkPdfObjectT ype;} 11 virtual SkPdfObjectType getType() const { return kFieldDictionary_SkPdfObjectT ype;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFieldDi ctionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFieldDi ctionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfFieldDictionary* asFieldDictionary() {return this;} 14 virtual SkPdfFieldDictionary* asFieldDictionary() {return this;}
14 virtual const SkPdfFieldDictionary* asFieldDictionary() const {return this;} 15 virtual const SkPdfFieldDictionary* asFieldDictionary() const {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
514 515
515 public: 516 public:
516 private: 517 private:
517 public: 518 public:
518 SkPdfFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfFieldDictionary& operator=(const SkPdfFieldDictionary& from) {this->fPodo foDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} 523 SkPdfFieldDictionary& operator=(const SkPdfFieldDictionary& from) {this->fPodo foDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
523 524
525 /** (Required for terminal fields; inheritable) The type of field that this dict ionary
526 * describes:
527 * Btn Button (see "Button Fields" on page 538)
528 * Tx Text (see "Text Fields" on page 543)
529 * Ch Choice (see "Choice Fields" on page 545)
530 * Sig (PDF 1.3) Signature (see "Signature Fields" on page 547)
531 * Note: This entry may be present in a nonterminal field (one whose descendant s
532 * are themselves fields) in order to provide an inheritable FT value. However, a
533 * nonterminal field does not logically have a type of its own; it is merely a contain-
534 * er for inheritable attributes that are intended for descendant terminal fiel ds of
535 * any type.
536 **/
537 bool has_FT() const {
538 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT", "", NULL));
539 }
540
524 std::string FT() const { 541 std::string FT() const {
525 std::string ret; 542 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT", "", &r et)) return ret; 543 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT", "", &r et)) return ret;
527 // TODO(edisonn): warn about missing required field, assert for known good p dfs 544 // TODO(edisonn): warn about missing required field, assert for known good p dfs
528 return ""; 545 return "";
529 } 546 }
530 547
548 /** (Required if this field is the child of another in the field hierarchy; abse nt other-
549 * wise) The field that is the immediate parent of this one (the field, if any,
550 * whose Kids array includes this field). A field can have at most one parent; that
551 * is, it can be included in the Kids array of at most one other field.
552 **/
553 bool has_Parent() const {
554 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren t", "", NULL));
555 }
556
531 SkPdfDictionary* Parent() const { 557 SkPdfDictionary* Parent() const {
532 SkPdfDictionary* ret; 558 SkPdfDictionary* ret;
533 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren t", "", &ret)) return ret; 559 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren t", "", &ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 560 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return NULL; 561 return NULL;
536 } 562 }
537 563
564 /** (Optional) An array of indirect references to the immediate children of this
565 * field.
566 **/
567 bool has_Kids() const {
568 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids" , "", NULL));
569 }
570
538 SkPdfArray Kids() const { 571 SkPdfArray Kids() const {
539 SkPdfArray ret; 572 SkPdfArray ret;
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret; 573 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 574 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return SkPdfArray(); 575 return SkPdfArray();
543 } 576 }
544 577
578 /** (Optional) The partial field name (see "Field Names," below; see also imple-
579 * mentation notes 82 and 83 in Appendix H).
580 **/
581 bool has_T() const {
582 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", " ", NULL));
583 }
584
545 std::string T() const { 585 std::string T() const {
546 std::string ret; 586 std::string ret;
547 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", & ret)) return ret; 587 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", & ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 588 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return ""; 589 return "";
550 } 590 }
551 591
592 /** (Optional; PDF 1.3) An alternate field name, to be used in place of the actu al
593 * field name wherever the field must be identified in the user interface (such as
594 * in error or status messages referring to the field). This text is also usefu l
595 * when extracting the document's contents in support of accessibility to dis-
596 * abled users or for other purposes (see Section 9.8.2, "Alternate Descrip-
597 * tions").
598 **/
599 bool has_TU() const {
600 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU", "", NULL));
601 }
602
552 std::string TU() const { 603 std::string TU() const {
553 std::string ret; 604 std::string ret;
554 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU", "", &ret)) return ret; 605 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU", "", &ret)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs 606 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return ""; 607 return "";
557 } 608 }
558 609
610 /** (Optional; PDF 1.3) The mapping name to be used when exporting inter-
611 * active form field data from the document.
612 **/
613 bool has_TM() const {
614 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM", "", NULL));
615 }
616
559 std::string TM() const { 617 std::string TM() const {
560 std::string ret; 618 std::string ret;
561 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM", "", &ret)) return ret; 619 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM", "", &ret)) return ret;
562 // TODO(edisonn): warn about missing required field, assert for known good p dfs 620 // TODO(edisonn): warn about missing required field, assert for known good p dfs
563 return ""; 621 return "";
564 } 622 }
565 623
624 /** (Optional; inheritable) A set of flags specifying various characteristics of the
625 * field (see Table 8.50). Default value: 0.
626 **/
627 bool has_Ff() const {
628 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", NULL));
629 }
630
566 long Ff() const { 631 long Ff() const {
567 long ret; 632 long ret;
568 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", &r et)) return ret; 633 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", &r et)) return ret;
569 // TODO(edisonn): warn about missing required field, assert for known good p dfs 634 // TODO(edisonn): warn about missing required field, assert for known good p dfs
570 return 0; 635 return 0;
571 } 636 }
572 637
638 /** (Optional; inheritable) The field's value, whose format varies depending on
639 * the field type; see the descriptions of individual field types for further i nfor-
640 * mation.
641 **/
642 bool has_V() const {
643 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", " ", NULL));
644 }
645
573 SkPdfObject* V() const { 646 SkPdfObject* V() const {
574 SkPdfObject* ret; 647 SkPdfObject* ret;
575 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", & ret)) return ret; 648 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", & ret)) return ret;
576 // TODO(edisonn): warn about missing required field, assert for known good p dfs 649 // TODO(edisonn): warn about missing required field, assert for known good p dfs
577 return NULL; 650 return NULL;
578 } 651 }
579 652
653 /** (Optional; inheritable) The default value to which the field reverts when a
654 * reset-form action is executed (see "Reset-Form Actions" on page 554). The
655 * format of this value is the same as that of V.
656 **/
657 bool has_DV() const {
658 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV", "", NULL));
659 }
660
580 SkPdfObject* DV() const { 661 SkPdfObject* DV() const {
581 SkPdfObject* ret; 662 SkPdfObject* ret;
582 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV", "", &ret)) return ret; 663 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV", "", &ret)) return ret;
583 // TODO(edisonn): warn about missing required field, assert for known good p dfs 664 // TODO(edisonn): warn about missing required field, assert for known good p dfs
584 return NULL; 665 return NULL;
585 } 666 }
586 667
668 /** (Optional; PDF 1.2) An additional-actions dictionary defining the field's
669 * behavior in response to various trigger events (see Section 8.5.2, "Trigger
670 * Events"). This entry has exactly the same meaning as the AA entry in an
671 * annotation dictionary (see Section 8.4.1, "Annotation Dictionaries").
672 **/
673 bool has_AA() const {
674 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
675 }
676
587 SkPdfDictionary* AA() const { 677 SkPdfDictionary* AA() const {
588 SkPdfDictionary* ret; 678 SkPdfDictionary* ret;
589 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret; 679 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
590 // TODO(edisonn): warn about missing required field, assert for known good p dfs 680 // TODO(edisonn): warn about missing required field, assert for known good p dfs
591 return NULL; 681 return NULL;
592 } 682 }
593 683
594 }; 684 };
595 685
596 #endif // __DEFINED__SkPdfFieldDictionary 686 #endif // __DEFINED__SkPdfFieldDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698