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

Side by Side Diff: experimental/PdfViewer/SkPdfHideActionDictionary_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__SkPdfHideActionDictionary 1 #ifndef __DEFINED__SkPdfHideActionDictionary
2 #define __DEFINED__SkPdfHideActionDictionary 2 #define __DEFINED__SkPdfHideActionDictionary
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 hide action
8 class SkPdfHideActionDictionary : public SkPdfDictionary { 9 class SkPdfHideActionDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kHideActionDictionary_SkPdfOb jectType;} 11 virtual SkPdfObjectType getType() const { return kHideActionDictionary_SkPdfOb jectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kHideAct ionDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kHideAct ionDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfHideActionDictionary* asHideActionDictionary() {return this;} 14 virtual SkPdfHideActionDictionary* asHideActionDictionary() {return this;}
14 virtual const SkPdfHideActionDictionary* asHideActionDictionary() const {retur n this;} 15 virtual const SkPdfHideActionDictionary* asHideActionDictionary() const {retur n 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 SkPdfHideActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObj ect* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfHideActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObj ect* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfHideActionDictionary& operator=(const SkPdfHideActionDictionary& from) {t his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t his;} 523 SkPdfHideActionDictionary& operator=(const SkPdfHideActionDictionary& from) {t his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t his;}
523 524
525 /** (Required) The type of action that this dictionary describes; must be Hide f or a hide
526 * action.
527 **/
528 bool has_S() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", " ", NULL));
530 }
531
524 std::string S() const { 532 std::string S() const {
525 std::string ret; 533 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret; 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) 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 /** (Required) The annotation or annotations to be hidden or shown, specified in any
540 * of the following forms:
541 * * An indirect reference to an annotation dictionary
542 * * A string giving the fully qualified field name of an interactive form fie ld whose
543 * associated widget annotation or annotations are to be affected (see "Fiel d
544 * Names" on page 532)
545 * * An array of such dictionaries or strings
546 **/
547 bool has_T() const {
548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", " ", NULL));
549 }
550
531 bool isTADictionary() const { 551 bool isTADictionary() const {
532 SkPdfObject* ret = NULL; 552 SkPdfObject* ret = NULL;
533 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return false; 553 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return false;
534 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; 554 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
535 } 555 }
536 556
537 SkPdfDictionary* getTAsDictionary() const { 557 SkPdfDictionary* getTAsDictionary() const {
538 SkPdfDictionary* ret = NULL; 558 SkPdfDictionary* ret = NULL;
539 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", " ", &ret)) return ret; 559 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", " ", &ret)) return ret;
540 // 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
(...skipping 19 matching lines...) Expand all
560 return ret->podofo()->GetDataType() == ePdfDataType_Array; 580 return ret->podofo()->GetDataType() == ePdfDataType_Array;
561 } 581 }
562 582
563 SkPdfArray getTAsArray() const { 583 SkPdfArray getTAsArray() const {
564 SkPdfArray ret = SkPdfArray(); 584 SkPdfArray ret = SkPdfArray();
565 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &r et)) return ret; 585 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &r et)) return ret;
566 // TODO(edisonn): warn about missing required field, assert for known good p dfs 586 // TODO(edisonn): warn about missing required field, assert for known good p dfs
567 return SkPdfArray(); 587 return SkPdfArray();
568 } 588 }
569 589
590 /** (Optional) A flag indicating whether to hide the annotation (true) or show i t (false).
591 * Default value: true.
592 **/
593 bool has_H() const {
594 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", " ", NULL));
595 }
596
570 bool H() const { 597 bool H() const {
571 bool ret; 598 bool ret;
572 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &re t)) return ret; 599 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &re t)) return ret;
573 // TODO(edisonn): warn about missing required field, assert for known good p dfs 600 // TODO(edisonn): warn about missing required field, assert for known good p dfs
574 return false; 601 return false;
575 } 602 }
576 603
577 }; 604 };
578 605
579 #endif // __DEFINED__SkPdfHideActionDictionary 606 #endif // __DEFINED__SkPdfHideActionDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698