OLD | NEW |
1 #ifndef __DEFINED__SkPdfSoundAnnotationDictionary | 1 #ifndef __DEFINED__SkPdfSoundAnnotationDictionary |
2 #define __DEFINED__SkPdfSoundAnnotationDictionary | 2 #define __DEFINED__SkPdfSoundAnnotationDictionary |
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 sound annotation | 9 // Additional entries specific to a sound annotation |
10 class SkPdfSoundAnnotationDictionary : public SkPdfDictionary { | 10 class SkPdfSoundAnnotationDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfSoundAnnotationDictionary& operator=(const SkPdfSoundAnnotationDictionary
& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj;
return *this;} | 526 SkPdfSoundAnnotationDictionary& operator=(const SkPdfSoundAnnotationDictionary
& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj;
return *this;} |
527 | 527 |
528 /** (Required) The type of annotation that this dictionary describes; must be So
und | 528 /** (Required) The type of annotation that this dictionary describes; must be So
und |
529 * for a sound annotation. | 529 * for a sound 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 /** (Required) A sound object defining the sound to be played when the annotatio
n | 536 /** (Required) A sound object defining the sound to be played when the annotatio
n |
543 * is activated (see Section 8.7, "Sounds"). | 537 * is activated (see Section 8.7, "Sounds"). |
544 **/ | 538 **/ |
545 bool has_Sound() const { | 539 bool has_Sound() const { |
546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound
", "", NULL)); | 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound
", "", NULL)); |
547 } | 541 } |
548 | 542 |
549 SkPdfStream* Sound() const { | 543 SkPdfStream* Sound() const; |
550 SkPdfStream* ret; | |
551 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound", "
", &ret)) return ret; | |
552 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
553 return NULL; | |
554 } | |
555 | |
556 /** (Optional) Text to be displayed in a pop-up window for the annotation in pla
ce | 544 /** (Optional) Text to be displayed in a pop-up window for the annotation in pla
ce |
557 * of the sound, useful when extracting the document's contents in support of | 545 * of the sound, useful when extracting the document's contents in support of |
558 * accessibility to disabled users or for other purposes (see Section 9.8.2, "A
lternate | 546 * accessibility to disabled users or for other purposes (see Section 9.8.2, "A
lternate |
559 * Descriptions"). | 547 * Descriptions"). |
560 **/ | 548 **/ |
561 bool has_Contents() const { | 549 bool has_Contents() const { |
562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); | 550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); |
563 } | 551 } |
564 | 552 |
565 std::string Contents() const { | 553 std::string Contents() const; |
566 std::string ret; | |
567 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents"
, "", &ret)) return ret; | |
568 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
569 return ""; | |
570 } | |
571 | |
572 /** (Optional) The name of an icon to be used in displaying the annotation. View
er | 554 /** (Optional) The name of an icon to be used in displaying the annotation. View
er |
573 * applications should provide predefined icon appearances for at least the sta
n- | 555 * applications should provide predefined icon appearances for at least the sta
n- |
574 * dard names Speaker and Microphone; additional names may be supported as | 556 * dard names Speaker and Microphone; additional names may be supported as |
575 * well. Default value: Speaker. | 557 * well. Default value: Speaker. |
576 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r the | 558 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r the |
577 * Name entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance Stream
s." | 559 * Name entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance Stream
s." |
578 **/ | 560 **/ |
579 bool has_Name() const { | 561 bool has_Name() const { |
580 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name"
, "", NULL)); | 562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name"
, "", NULL)); |
581 } | 563 } |
582 | 564 |
583 std::string Name() const { | 565 std::string Name() const; |
584 std::string ret; | |
585 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "",
&ret)) return ret; | |
586 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
587 return ""; | |
588 } | |
589 | |
590 }; | 566 }; |
591 | 567 |
592 #endif // __DEFINED__SkPdfSoundAnnotationDictionary | 568 #endif // __DEFINED__SkPdfSoundAnnotationDictionary |
OLD | NEW |