OLD | NEW |
1 #ifndef __DEFINED__SkPdfWidgetAnnotationDictionary | 1 #ifndef __DEFINED__SkPdfWidgetAnnotationDictionary |
2 #define __DEFINED__SkPdfWidgetAnnotationDictionary | 2 #define __DEFINED__SkPdfWidgetAnnotationDictionary |
3 | 3 |
4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
8 | 8 |
9 // Additional entries specific to a widget annotation | 9 // Additional entries specific to a widget annotation |
10 class SkPdfWidgetAnnotationDictionary : public SkPdfDictionary { | 10 class SkPdfWidgetAnnotationDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfWidgetAnnotationDictionary& operator=(const SkPdfWidgetAnnotationDictiona
ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb
j; return *this;} | 526 SkPdfWidgetAnnotationDictionary& operator=(const SkPdfWidgetAnnotationDictiona
ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb
j; return *this;} |
527 | 527 |
528 /** (Required) The type of annotation that this dictionary describes; must be Wi
dget | 528 /** (Required) The type of annotation that this dictionary describes; must be Wi
dget |
529 * for a widget annotation. | 529 * for a widget annotation. |
530 **/ | 530 **/ |
531 bool has_Subtype() const { | 531 bool has_Subtype() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); |
533 } | 533 } |
534 | 534 |
535 std::string Subtype() const { | 535 std::string Subtype() const; |
536 std::string ret; | |
537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "
", &ret)) return ret; | |
538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
539 return ""; | |
540 } | |
541 | |
542 /** (Optional; PDF 1.4) An alternate representation of the annotation's contents
in | 536 /** (Optional; PDF 1.4) An alternate representation of the annotation's contents
in |
543 * human-readable form, useful when extracting the document's contents in sup- | 537 * human-readable form, useful when extracting the document's contents in sup- |
544 * port of accessibility to disabled users or for other purposes (see Section 9
.8.2, | 538 * port of accessibility to disabled users or for other purposes (see Section 9
.8.2, |
545 * "Alternate Descriptions"). | 539 * "Alternate Descriptions"). |
546 **/ | 540 **/ |
547 bool has_Contents() const { | 541 bool has_Contents() const { |
548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); | 542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); |
549 } | 543 } |
550 | 544 |
551 std::string Contents() const { | 545 std::string Contents() const; |
552 std::string ret; | |
553 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents"
, "", &ret)) return ret; | |
554 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
555 return ""; | |
556 } | |
557 | |
558 /** (Optional) The annotation's highlighting mode, the visual effect to be used
when | 546 /** (Optional) The annotation's highlighting mode, the visual effect to be used
when |
559 * the mouse button is pressed or held down inside its active area: | 547 * the mouse button is pressed or held down inside its active area: |
560 * N (None) No highlighting. | 548 * N (None) No highlighting. |
561 * I (Invert) Invert the contents of the annotation rectangle. | 549 * I (Invert) Invert the contents of the annotation rectangle. |
562 * O (Outline) Invert the annotation's border. | 550 * O (Outline) Invert the annotation's border. |
563 * P (Push) Display the annotation's down appearance, if any (see Section | 551 * P (Push) Display the annotation's down appearance, if any (see Section |
564 * 8.4.4, "Appearance Streams"). If no down appearance is defined, offs
et | 552 * 8.4.4, "Appearance Streams"). If no down appearance is defined, offs
et |
565 * the contents of the annotation rectangle to appear as if it were bei
ng | 553 * the contents of the annotation rectangle to appear as if it were bei
ng |
566 * "pushed" below the surface of the page. | 554 * "pushed" below the surface of the page. |
567 * T (Toggle) Same as P (which is preferred). | 555 * T (Toggle) Same as P (which is preferred). |
568 * A highlighting mode other than P overrides any down appearance defined for | 556 * A highlighting mode other than P overrides any down appearance defined for |
569 * the annotation. Default value: I. | 557 * the annotation. Default value: I. |
570 **/ | 558 **/ |
571 bool has_H() const { | 559 bool has_H() const { |
572 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "
", NULL)); | 560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "
", NULL)); |
573 } | 561 } |
574 | 562 |
575 std::string H() const { | 563 std::string H() const; |
576 std::string ret; | |
577 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &re
t)) return ret; | |
578 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
579 return ""; | |
580 } | |
581 | |
582 /** (Optional) An appearance characteristics dictionary to be used in constructi
ng a | 564 /** (Optional) An appearance characteristics dictionary to be used in constructi
ng a |
583 * dynamic appearance stream specifying the annotation's visual presentation on | 565 * dynamic appearance stream specifying the annotation's visual presentation on |
584 * the page; see "Variable Text" on page 533 for further discussion. | 566 * the page; see "Variable Text" on page 533 for further discussion. |
585 * Note: The name MK for this entry is of historical significance only and has
no direct | 567 * Note: The name MK for this entry is of historical significance only and has
no direct |
586 * meaning. | 568 * meaning. |
587 **/ | 569 **/ |
588 bool has_MK() const { | 570 bool has_MK() const { |
589 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MK",
"", NULL)); | 571 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MK",
"", NULL)); |
590 } | 572 } |
591 | 573 |
592 SkPdfDictionary* MK() const { | 574 SkPdfDictionary* MK() const; |
593 SkPdfDictionary* ret; | |
594 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MK",
"", &ret)) return ret; | |
595 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
596 return NULL; | |
597 } | |
598 | |
599 }; | 575 }; |
600 | 576 |
601 #endif // __DEFINED__SkPdfWidgetAnnotationDictionary | 577 #endif // __DEFINED__SkPdfWidgetAnnotationDictionary |
OLD | NEW |