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

Side by Side Diff: experimental/PdfViewer/SkPdfPopUpAnnotationDictionary_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__SkPdfPopUpAnnotationDictionary 1 #ifndef __DEFINED__SkPdfPopUpAnnotationDictionary
2 #define __DEFINED__SkPdfPopUpAnnotationDictionary 2 #define __DEFINED__SkPdfPopUpAnnotationDictionary
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 pop-up annotation
8 class SkPdfPopUpAnnotationDictionary : public SkPdfDictionary { 9 class SkPdfPopUpAnnotationDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kPopUpAnnotationDictionary_Sk PdfObjectType;} 11 virtual SkPdfObjectType getType() const { return kPopUpAnnotationDictionary_Sk PdfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kPopUpAn notationDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kPopUpAn notationDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfPopUpAnnotationDictionary* asPopUpAnnotationDictionary() {return this;} 14 virtual SkPdfPopUpAnnotationDictionary* asPopUpAnnotationDictionary() {return this;}
14 virtual const SkPdfPopUpAnnotationDictionary* asPopUpAnnotationDictionary() co nst {return this;} 15 virtual const SkPdfPopUpAnnotationDictionary* asPopUpAnnotationDictionary() co nst {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 SkPdfPopUpAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL, const P dfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfPopUpAnnotationDictionary(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 SkPdfPopUpAnnotationDictionary& operator=(const SkPdfPopUpAnnotationDictionary & from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} 523 SkPdfPopUpAnnotationDictionary& operator=(const SkPdfPopUpAnnotationDictionary & 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
526 * Popup for a pop-up 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
540 * in human-readable form, useful when extracting the document's contents in
541 * support of accessibility to disabled users or for other purposes (see Sectio n
542 * 9.8.2, "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; must be an indirect reference) The parent annotation with which
556 * this pop-up annotation is associated.
557 * Note: If this entry is present, the parent annotation's Contents, M, C, and T
558 * entries (see Table 8.10 on page 490) override those of the pop-up annotation
559 * itself.
560 **/
561 bool has_Parent() const {
562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren t", "", NULL));
563 }
564
538 SkPdfDictionary* Parent() const { 565 SkPdfDictionary* Parent() const {
539 SkPdfDictionary* ret; 566 SkPdfDictionary* ret;
540 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren t", "", &ret)) return ret; 567 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren t", "", &ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 568 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return NULL; 569 return NULL;
543 } 570 }
544 571
572 /** (Optional) A flag specifying whether the pop-up annotation should initially
573 * be displayed open. Default value: false (closed).
574 **/
575 bool has_Open() const {
576 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Open" , "", NULL));
577 }
578
545 bool Open() const { 579 bool Open() const {
546 bool ret; 580 bool ret;
547 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Open", "", &ret)) return ret; 581 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Open", "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 582 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return false; 583 return false;
550 } 584 }
551 585
552 }; 586 };
553 587
554 #endif // __DEFINED__SkPdfPopUpAnnotationDictionary 588 #endif // __DEFINED__SkPdfPopUpAnnotationDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698