| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfFileAttachmentAnnotationDictionary | 1 #ifndef __DEFINED__SkPdfFileAttachmentAnnotationDictionary |
| 2 #define __DEFINED__SkPdfFileAttachmentAnnotationDictionary | 2 #define __DEFINED__SkPdfFileAttachmentAnnotationDictionary |
| 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 file attachment annotation |
| 8 class SkPdfFileAttachmentAnnotationDictionary : public SkPdfDictionary { | 9 class SkPdfFileAttachmentAnnotationDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kFileAttachmentAnnotationDict
ionary_SkPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kFileAttachmentAnnotationDict
ionary_SkPdfObjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFileAtt
achmentAnnotationDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFileAtt
achmentAnnotationDictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfFileAttachmentAnnotationDictionary* asFileAttachmentAnnotationDic
tionary() {return this;} | 14 virtual SkPdfFileAttachmentAnnotationDictionary* asFileAttachmentAnnotationDic
tionary() {return this;} |
| 14 virtual const SkPdfFileAttachmentAnnotationDictionary* asFileAttachmentAnnotat
ionDictionary() const {return this;} | 15 virtual const SkPdfFileAttachmentAnnotationDictionary* asFileAttachmentAnnotat
ionDictionary() 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 SkPdfFileAttachmentAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL
, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfFileAttachmentAnnotationDictionary(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 SkPdfFileAttachmentAnnotationDictionary& operator=(const SkPdfFileAttachmentAn
notationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj
= from.fPodofoObj; return *this;} | 523 SkPdfFileAttachmentAnnotationDictionary& operator=(const SkPdfFileAttachmentAn
notationDictionary& 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 * FileAttachment for a file attachment 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 /** (Required) The file associated with this annotation. |
| 540 **/ |
| 541 bool has_FS() const { |
| 542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS",
"", NULL)); |
| 543 } |
| 544 |
| 531 SkPdfFileSpec FS() const { | 545 SkPdfFileSpec FS() const { |
| 532 SkPdfFileSpec ret; | 546 SkPdfFileSpec ret; |
| 533 if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS", ""
, &ret)) return ret; | 547 if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS", ""
, &ret)) return ret; |
| 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 535 return SkPdfFileSpec(); | 549 return SkPdfFileSpec(); |
| 536 } | 550 } |
| 537 | 551 |
| 552 /** (Required) The text to be displayed in the pop-up window when the annota- |
| 553 * tion is opened. Carriage returns may be used to separate the text into para- |
| 554 * graphs. |
| 555 **/ |
| 556 bool has_Contents() const { |
| 557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); |
| 558 } |
| 559 |
| 538 std::string Contents() const { | 560 std::string Contents() const { |
| 539 std::string ret; | 561 std::string ret; |
| 540 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents"
, "", &ret)) return ret; | 562 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents"
, "", &ret)) return ret; |
| 541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 563 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 542 return ""; | 564 return ""; |
| 543 } | 565 } |
| 544 | 566 |
| 567 /** (Optional) The name of an icon to be used in displaying the annotation. |
| 568 * Viewer applications should provide predefined icon appearances for at least |
| 569 * the following standard names: |
| 570 * Graph PushPin |
| 571 * Paperclip Tag |
| 572 * Additional names may be supported as well. Default value: PushPin. |
| 573 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r |
| 574 * the Name entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance |
| 575 * Streams." |
| 576 **/ |
| 577 bool has_Name() const { |
| 578 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name"
, "", NULL)); |
| 579 } |
| 580 |
| 545 std::string Name() const { | 581 std::string Name() const { |
| 546 std::string ret; | 582 std::string ret; |
| 547 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "",
&ret)) return ret; | 583 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "",
&ret)) return ret; |
| 548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 584 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 549 return ""; | 585 return ""; |
| 550 } | 586 } |
| 551 | 587 |
| 552 }; | 588 }; |
| 553 | 589 |
| 554 #endif // __DEFINED__SkPdfFileAttachmentAnnotationDictionary | 590 #endif // __DEFINED__SkPdfFileAttachmentAnnotationDictionary |
| OLD | NEW |