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

Side by Side Diff: experimental/PdfViewer/SkPdfAppearanceCharacteristicsDictionary_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__SkPdfAppearanceCharacteristicsDictionary 1 #ifndef __DEFINED__SkPdfAppearanceCharacteristicsDictionary
2 #define __DEFINED__SkPdfAppearanceCharacteristicsDictionary 2 #define __DEFINED__SkPdfAppearanceCharacteristicsDictionary
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 appearance characteristics dictionary
8 class SkPdfAppearanceCharacteristicsDictionary : public SkPdfDictionary { 9 class SkPdfAppearanceCharacteristicsDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kAppearanceCharacteristicsDic tionary_SkPdfObjectType;} 11 virtual SkPdfObjectType getType() const { return kAppearanceCharacteristicsDic tionary_SkPdfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kAppeara nceCharacteristicsDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kAppeara nceCharacteristicsDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfAppearanceCharacteristicsDictionary* asAppearanceCharacteristicsD ictionary() {return this;} 14 virtual SkPdfAppearanceCharacteristicsDictionary* asAppearanceCharacteristicsD ictionary() {return this;}
14 virtual const SkPdfAppearanceCharacteristicsDictionary* asAppearanceCharacteri sticsDictionary() const {return this;} 15 virtual const SkPdfAppearanceCharacteristicsDictionary* asAppearanceCharacteri sticsDictionary() 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 SkPdfAppearanceCharacteristicsDictionary(const PdfMemDocument* podofoDoc = NUL L, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfAppearanceCharacteristicsDictionary(const PdfMemDocument* podofoDoc = NUL L, 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 SkPdfAppearanceCharacteristicsDictionary& operator=(const SkPdfAppearanceChara cteristicsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoOb j = from.fPodofoObj; return *this;} 523 SkPdfAppearanceCharacteristicsDictionary& operator=(const SkPdfAppearanceChara cteristicsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoOb j = from.fPodofoObj; return *this;}
523 524
525 /** (Optional) The number of degrees by which the widget annotation is rotated
526 * counterclockwise relative to the page. The value must be a multiple of 90.
527 * Default value: 0.
528 **/
529 bool has_R() const {
530 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", " ", NULL));
531 }
532
524 long R() const { 533 long R() const {
525 long ret; 534 long ret;
526 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &re t)) return ret; 535 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &re t)) 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 0; 537 return 0;
529 } 538 }
530 539
540 /** (Optional) An array of numbers in the range 0.0 to 1.0 specifying the color of the
541 * widget annotation's border. The number of array elements determines the colo r
542 * space in which the color is defined:
543 * 0 No color; transparent
544 * 1 DeviceGray
545 * 3 DeviceRGB
546 * 4 DeviceCMYK
547 **/
548 bool has_BC() const {
549 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", NULL));
550 }
551
531 SkPdfArray BC() const { 552 SkPdfArray BC() const {
532 SkPdfArray ret; 553 SkPdfArray ret;
533 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", & ret)) return ret; 554 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", & ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 555 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return SkPdfArray(); 556 return SkPdfArray();
536 } 557 }
537 558
559 /** (Optional) An array of numbers in the range 0.0 to 1.0 specifying the color of the
560 * widget annotation's background. The number of array elements determines the
561 * color space, as described above for BC.
562 **/
563 bool has_BG() const {
564 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", NULL));
565 }
566
538 SkPdfArray BG() const { 567 SkPdfArray BG() const {
539 SkPdfArray ret; 568 SkPdfArray ret;
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", & ret)) return ret; 569 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", & ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 570 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return SkPdfArray(); 571 return SkPdfArray();
543 } 572 }
544 573
574 /** (Optional; button fields only) The widget annotation's normal caption, displ ayed
575 * when it is not interacting with the user.
576 * Note: Unlike the remaining entries listed below, which apply only to widget annota-
577 * tions associated with pushbutton fields (see "Pushbuttons" on page 539), the CA
578 * entry can be used with any type of button field, including checkboxes ("Chec kboxes"
579 * on page 539) and radio buttons ("Radio Buttons" on page 540).
580 **/
581 bool has_CA() const {
582 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", NULL));
583 }
584
545 std::string CA() const { 585 std::string CA() const {
546 std::string ret; 586 std::string ret;
547 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", &ret)) return ret; 587 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", &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; pushbutton fields only) The widget annotation's rollover caption, dis-
593 * played when the user rolls the cursor into its active area without pressing the
594 * mouse button.
595 **/
596 bool has_RC() const {
597 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RC", "", NULL));
598 }
599
552 std::string RC() const { 600 std::string RC() const {
553 std::string ret; 601 std::string ret;
554 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RC", "", &ret)) return ret; 602 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RC", "", &ret)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs 603 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return ""; 604 return "";
557 } 605 }
558 606
607 /** (Optional; pushbutton fields only) The widget annotation's alternate (down)
608 * caption, displayed when the mouse button is pressed within its active area.
609 **/
610 bool has_AC() const {
611 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AC", "", NULL));
612 }
613
559 std::string AC() const { 614 std::string AC() const {
560 std::string ret; 615 std::string ret;
561 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AC", "", &ret)) return ret; 616 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AC", "", &ret)) return ret;
562 // TODO(edisonn): warn about missing required field, assert for known good p dfs 617 // TODO(edisonn): warn about missing required field, assert for known good p dfs
563 return ""; 618 return "";
564 } 619 }
565 620
621 /** (Optional; pushbutton fields only; must be an indirect reference) A form XOb ject
622 * defining the widget annotation's normal icon, displayed when it is not inter -
623 * acting with the user.
624 **/
625 bool has_I() const {
626 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", " ", NULL));
627 }
628
566 SkPdfStream I() const { 629 SkPdfStream I() const {
567 SkPdfStream ret; 630 SkPdfStream ret;
568 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", & ret)) return ret; 631 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", & ret)) return ret;
569 // TODO(edisonn): warn about missing required field, assert for known good p dfs 632 // TODO(edisonn): warn about missing required field, assert for known good p dfs
570 return SkPdfStream(); 633 return SkPdfStream();
571 } 634 }
572 635
636 /** (Optional; pushbutton fields only; must be an indirect reference) A form XOb ject
637 * defining the widget annotation's rollover icon, displayed when the user roll s the
638 * cursor into its active area without pressing the mouse button.
639 **/
640 bool has_RI() const {
641 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", NULL));
642 }
643
573 SkPdfStream RI() const { 644 SkPdfStream RI() const {
574 SkPdfStream ret; 645 SkPdfStream ret;
575 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", &ret)) return ret; 646 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", &ret)) return ret;
576 // TODO(edisonn): warn about missing required field, assert for known good p dfs 647 // TODO(edisonn): warn about missing required field, assert for known good p dfs
577 return SkPdfStream(); 648 return SkPdfStream();
578 } 649 }
579 650
651 /** (Optional; pushbutton fields only; must be an indirect reference) A form XOb ject
652 * defining the widget annotation's alternate (down) icon, displayed when the
653 * mouse button is pressed within its active area.
654 **/
655 bool has_IX() const {
656 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IX", "", NULL));
657 }
658
580 SkPdfStream IX() const { 659 SkPdfStream IX() const {
581 SkPdfStream ret; 660 SkPdfStream ret;
582 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IX", "", &ret)) return ret; 661 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IX", "", &ret)) return ret;
583 // TODO(edisonn): warn about missing required field, assert for known good p dfs 662 // TODO(edisonn): warn about missing required field, assert for known good p dfs
584 return SkPdfStream(); 663 return SkPdfStream();
585 } 664 }
586 665
666 /** (Optional; pushbutton fields only) An icon fit dictionary (see Table 8.73 on page
667 * 566) specifying how to display the widget annotation's icon within its
668 * annotation rectangle. If present, the icon fit dictionary applies to all of the anno-
669 * tation's icons (normal, rollover, and alternate).
670 **/
671 bool has_IF() const {
672 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", NULL));
673 }
674
587 SkPdfDictionary* IF() const { 675 SkPdfDictionary* IF() const {
588 SkPdfDictionary* ret; 676 SkPdfDictionary* ret;
589 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", &ret)) return ret; 677 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", &ret)) return ret;
590 // TODO(edisonn): warn about missing required field, assert for known good p dfs 678 // TODO(edisonn): warn about missing required field, assert for known good p dfs
591 return NULL; 679 return NULL;
592 } 680 }
593 681
682 /** (Optional; pushbutton fields only) A code indicating where to position the t ext of
683 * the widget annotation's caption relative to its icon:
684 * 0 No icon; caption only
685 * 1 No caption; icon only
686 * 2 Caption below the icon
687 * 3 Caption above the icon
688 * 4 Caption to the right of the icon
689 * 5 Caption to the left of the icon
690 * 6 Caption overlaid directly on the icon
691 * Default value: 0.
692 **/
693 bool has_TP() const {
694 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TP", "", NULL));
695 }
696
594 long TP() const { 697 long TP() const {
595 long ret; 698 long ret;
596 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TP", "", &r et)) return ret; 699 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TP", "", &r et)) return ret;
597 // TODO(edisonn): warn about missing required field, assert for known good p dfs 700 // TODO(edisonn): warn about missing required field, assert for known good p dfs
598 return 0; 701 return 0;
599 } 702 }
600 703
601 }; 704 };
602 705
603 #endif // __DEFINED__SkPdfAppearanceCharacteristicsDictionary 706 #endif // __DEFINED__SkPdfAppearanceCharacteristicsDictionary
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfAnnotationDictionary_autogen.h ('k') | experimental/PdfViewer/SkPdfAppearanceDictionary_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698