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

Side by Side Diff: experimental/PdfViewer/SkPdfALinkAnnotationDictionary_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
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfActionDictionary_autogen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef __DEFINED__SkPdfALinkAnnotationDictionary 1 #ifndef __DEFINED__SkPdfALinkAnnotationDictionary
2 #define __DEFINED__SkPdfALinkAnnotationDictionary 2 #define __DEFINED__SkPdfALinkAnnotationDictionary
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 // Additional entries specific to a link annotation
8 class SkPdfALinkAnnotationDictionary : public SkPdfDictionary { 9 class SkPdfALinkAnnotationDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kALinkAnnotationDictionary_Sk PdfObjectType;} 11 virtual SkPdfObjectType getType() const { return kALinkAnnotationDictionary_Sk PdfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kALinkAn notationDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kALinkAn notationDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return this;} 14 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return this;}
14 virtual const SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() co nst {return this;} 15 virtual const SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() co nst {return this;}
15 16
16 private: 17 private:
17 virtual SkPdfActionDictionary* asActionDictionary() {return NULL;} 18 virtual SkPdfActionDictionary* asActionDictionary() {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 SkPdfALinkAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL, const P dfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfALinkAnnotationDictionary(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 SkPdfALinkAnnotationDictionary& operator=(const SkPdfALinkAnnotationDictionary & from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} 523 SkPdfALinkAnnotationDictionary& operator=(const SkPdfALinkAnnotationDictionary & from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
523 524
525 /** (Required) The type of annotation that this dictionary describes; must be Li nk
526 * for a link annotation.
527 **/
528 bool has_Subtype() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty pe", "", NULL));
530 }
531
524 std::string Subtype() const { 532 std::string Subtype() const {
525 std::string ret; 533 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", " ", &ret)) return ret; 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", " ", &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 ""; 536 return "";
529 } 537 }
530 538
539 /** (Optional; PDF 1.4) An alternate representation of the annotation's contents in
540 * human-readable form, useful when extracting the document's contents in sup-
541 * port of accessibility to disabled users or for other purposes (see Section 9 .8.2,
542 * "Alternate Descriptions").
543 **/
544 bool has_Contents() const {
545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte nts", "", NULL));
546 }
547
531 std::string Contents() const { 548 std::string Contents() const {
532 std::string ret; 549 std::string ret;
533 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents" , "", &ret)) return ret; 550 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents" , "", &ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 551 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return ""; 552 return "";
536 } 553 }
537 554
555 /** (Optional; not permitted if an A entry is present) A destination to be displ ayed
556 * when the annotation is activated (see Section 8.2.1, "Destinations"; see als o
557 * implementation note 66 in Appendix H).
558 **/
559 bool has_Dest() const {
560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest" , "", NULL));
561 }
562
538 bool isDestAArray() const { 563 bool isDestAArray() const {
539 SkPdfObject* ret = NULL; 564 SkPdfObject* ret = NULL;
540 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", " ", &ret)) return false; 565 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", " ", &ret)) return false;
541 return ret->podofo()->GetDataType() == ePdfDataType_Array; 566 return ret->podofo()->GetDataType() == ePdfDataType_Array;
542 } 567 }
543 568
544 SkPdfArray getDestAsArray() const { 569 SkPdfArray getDestAsArray() const {
545 SkPdfArray ret = SkPdfArray(); 570 SkPdfArray ret = SkPdfArray();
546 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return ret; 571 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return ret;
547 // TODO(edisonn): warn about missing required field, assert for known good p dfs 572 // TODO(edisonn): warn about missing required field, assert for known good p dfs
(...skipping 19 matching lines...) Expand all
567 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()- >GetDataType() == ePdfDataType_HexString; 592 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()- >GetDataType() == ePdfDataType_HexString;
568 } 593 }
569 594
570 std::string getDestAsString() const { 595 std::string getDestAsString() const {
571 std::string ret = ""; 596 std::string ret = "";
572 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "" , &ret)) return ret; 597 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "" , &ret)) return ret;
573 // TODO(edisonn): warn about missing required field, assert for known good p dfs 598 // TODO(edisonn): warn about missing required field, assert for known good p dfs
574 return ""; 599 return "";
575 } 600 }
576 601
602 /** (Optional; PDF 1.2) The annotation's highlighting mode, the visual effect to be
603 * used when the mouse button is pressed or held down inside its active area:
604 * N (None) No highlighting.
605 * I (Invert) Invert the contents of the annotation rectangle.
606 * O (Outline) Invert the annotation's border.
607 * P (Push) Display the annotation's down appearance, if any (see Sectio n
608 * 8.4.4, "Appearance Streams"). If no down appearance is defined, off set
609 * the contents of the annotation rectangle to appear as if it were be ing
610 * "pushed" below the surface of the page.
611 * A highlighting mode other than P overrides any down appearance defined for
612 * the annotation. Default value: I.
613 * Note: In PDF 1.1, highlighting is always done by inverting colors inside the anno-
614 * tation rectangle.
615 **/
616 bool has_H() const {
617 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", " ", NULL));
618 }
619
577 std::string H() const { 620 std::string H() const {
578 std::string ret; 621 std::string ret;
579 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &re t)) return ret; 622 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &re t)) return ret;
580 // TODO(edisonn): warn about missing required field, assert for known good p dfs 623 // TODO(edisonn): warn about missing required field, assert for known good p dfs
581 return ""; 624 return "";
582 } 625 }
583 626
627 /** (Optional; PDF 1.3) A URI action (see "URI Actions" on page 523) formerly
628 * associated with this annotation. When Web Capture (Section 9.9, "Web Cap-
629 * ture") changes an annotation from a URI to a go-to action ("Go-To Actions"
630 * on page 519), it uses this entry to save the data from the original URI acti on so
631 * that it can be changed back in case the target page for the go-to action is subse-
632 * quently deleted.
633 **/
634 bool has_PA() const {
635 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PA", "", NULL));
636 }
637
584 SkPdfDictionary* PA() const { 638 SkPdfDictionary* PA() const {
585 SkPdfDictionary* ret; 639 SkPdfDictionary* ret;
586 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PA", "", &ret)) return ret; 640 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PA", "", &ret)) return ret;
587 // TODO(edisonn): warn about missing required field, assert for known good p dfs 641 // TODO(edisonn): warn about missing required field, assert for known good p dfs
588 return NULL; 642 return NULL;
589 } 643 }
590 644
591 }; 645 };
592 646
593 #endif // __DEFINED__SkPdfALinkAnnotationDictionary 647 #endif // __DEFINED__SkPdfALinkAnnotationDictionary
OLDNEW
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfActionDictionary_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698