| OLD | NEW | 
|---|
| 1 #ifndef __DEFINED__SkPdfWidgetAnnotationDictionary | 1 #ifndef __DEFINED__SkPdfWidgetAnnotationDictionary | 
| 2 #define __DEFINED__SkPdfWidgetAnnotationDictionary | 2 #define __DEFINED__SkPdfWidgetAnnotationDictionary | 
| 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 widget annotation | 
| 8 class SkPdfWidgetAnnotationDictionary : public SkPdfDictionary { | 9 class SkPdfWidgetAnnotationDictionary : public SkPdfDictionary { | 
| 9 public: | 10 public: | 
| 10   virtual SkPdfObjectType getType() const { return kWidgetAnnotationDictionary_S
     kPdfObjectType;} | 11   virtual SkPdfObjectType getType() const { return kWidgetAnnotationDictionary_S
     kPdfObjectType;} | 
| 11   virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kWidgetA
     nnotationDictionary_SkPdfObjectType + 1);} | 12   virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kWidgetA
     nnotationDictionary_SkPdfObjectType + 1);} | 
| 12 public: | 13 public: | 
| 13   virtual SkPdfWidgetAnnotationDictionary* asWidgetAnnotationDictionary() {retur
     n this;} | 14   virtual SkPdfWidgetAnnotationDictionary* asWidgetAnnotationDictionary() {retur
     n this;} | 
| 14   virtual const SkPdfWidgetAnnotationDictionary* asWidgetAnnotationDictionary() 
     const {return this;} | 15   virtual const SkPdfWidgetAnnotationDictionary* asWidgetAnnotationDictionary() 
     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  Loading... | 
| 514 | 515 | 
| 515 public: | 516 public: | 
| 516 private: | 517 private: | 
| 517 public: | 518 public: | 
| 518   SkPdfWidgetAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL, const 
     PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519   SkPdfWidgetAnnotationDictionary(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   SkPdfWidgetAnnotationDictionary& operator=(const SkPdfWidgetAnnotationDictiona
     ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb
     j; return *this;} | 523   SkPdfWidgetAnnotationDictionary& operator=(const SkPdfWidgetAnnotationDictiona
     ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb
     j; return *this;} | 
| 523 | 524 | 
|  | 525 /** (Required) The type of annotation that this dictionary describes; must be Wi
     dget | 
|  | 526  *  for a widget 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) The annotation's highlighting mode, the visual effect to be used 
     when | 
|  | 556  *  the mouse button is pressed or held down inside its active area: | 
|  | 557  *     N    (None) No highlighting. | 
|  | 558  *     I    (Invert) Invert the contents of the annotation rectangle. | 
|  | 559  *     O    (Outline) Invert the annotation's border. | 
|  | 560  *     P    (Push) Display the annotation's down appearance, if any (see Section | 
|  | 561  *          8.4.4, "Appearance Streams"). If no down appearance is defined, offs
     et | 
|  | 562  *          the contents of the annotation rectangle to appear as if it were bei
     ng | 
|  | 563  *          "pushed" below the surface of the page. | 
|  | 564  *     T    (Toggle) Same as P (which is preferred). | 
|  | 565  *  A highlighting mode other than P overrides any down appearance defined for | 
|  | 566  *  the annotation. Default value: I. | 
|  | 567 **/ | 
|  | 568   bool has_H() const { | 
|  | 569     return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "
     ", NULL)); | 
|  | 570   } | 
|  | 571 | 
| 538   std::string H() const { | 572   std::string H() const { | 
| 539     std::string ret; | 573     std::string ret; | 
| 540     if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &re
     t)) return ret; | 574     if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &re
     t)) return ret; | 
| 541     // TODO(edisonn): warn about missing required field, assert for known good p
     dfs | 575     // TODO(edisonn): warn about missing required field, assert for known good p
     dfs | 
| 542     return ""; | 576     return ""; | 
| 543   } | 577   } | 
| 544 | 578 | 
|  | 579 /** (Optional) An appearance characteristics dictionary to be used in constructi
     ng a | 
|  | 580  *  dynamic appearance stream specifying the annotation's visual presentation on | 
|  | 581  *  the page; see "Variable Text" on page 533 for further discussion. | 
|  | 582  *  Note: The name MK for this entry is of historical significance only and has 
     no direct | 
|  | 583  *  meaning. | 
|  | 584 **/ | 
|  | 585   bool has_MK() const { | 
|  | 586     return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MK", 
     "", NULL)); | 
|  | 587   } | 
|  | 588 | 
| 545   SkPdfDictionary* MK() const { | 589   SkPdfDictionary* MK() const { | 
| 546     SkPdfDictionary* ret; | 590     SkPdfDictionary* ret; | 
| 547     if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MK", 
     "", &ret)) return ret; | 591     if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MK", 
     "", &ret)) return ret; | 
| 548     // TODO(edisonn): warn about missing required field, assert for known good p
     dfs | 592     // TODO(edisonn): warn about missing required field, assert for known good p
     dfs | 
| 549     return NULL; | 593     return NULL; | 
| 550   } | 594   } | 
| 551 | 595 | 
| 552 }; | 596 }; | 
| 553 | 597 | 
| 554 #endif  // __DEFINED__SkPdfWidgetAnnotationDictionary | 598 #endif  // __DEFINED__SkPdfWidgetAnnotationDictionary | 
| OLD | NEW | 
|---|