OLD | NEW |
1 #ifndef __DEFINED__SkPdfMovieActionDictionary | 1 #ifndef __DEFINED__SkPdfMovieActionDictionary |
2 #define __DEFINED__SkPdfMovieActionDictionary | 2 #define __DEFINED__SkPdfMovieActionDictionary |
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 movie action |
8 class SkPdfMovieActionDictionary : public SkPdfDictionary { | 9 class SkPdfMovieActionDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kMovieActionDictionary_SkPdfO
bjectType;} | 11 virtual SkPdfObjectType getType() const { return kMovieActionDictionary_SkPdfO
bjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kMovieAc
tionDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kMovieAc
tionDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfMovieActionDictionary* asMovieActionDictionary() {return this;} | 14 virtual SkPdfMovieActionDictionary* asMovieActionDictionary() {return this;} |
14 virtual const SkPdfMovieActionDictionary* asMovieActionDictionary() const {ret
urn this;} | 15 virtual const SkPdfMovieActionDictionary* asMovieActionDictionary() const {ret
urn 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 SkPdfMovieActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfOb
ject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfMovieActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfOb
ject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfMovieActionDictionary& operator=(const SkPdfMovieActionDictionary& from)
{this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return
*this;} | 523 SkPdfMovieActionDictionary& operator=(const SkPdfMovieActionDictionary& from)
{this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return
*this;} |
523 | 524 |
| 525 /** (Required) The type of action that this dictionary describes; must be Movie |
| 526 * for a movie 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 /** (Optional) An indirect reference to a movie annotation identifying the movie |
| 540 * to be played. |
| 541 **/ |
| 542 bool has_Annot() const { |
| 543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annot
", "", NULL)); |
| 544 } |
| 545 |
531 SkPdfDictionary* Annot() const { | 546 SkPdfDictionary* Annot() const { |
532 SkPdfDictionary* ret; | 547 SkPdfDictionary* ret; |
533 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annot
", "", &ret)) return ret; | 548 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annot
", "", &ret)) return ret; |
534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 549 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
535 return NULL; | 550 return NULL; |
536 } | 551 } |
537 | 552 |
| 553 /** (Optional) The title of a movie annotation identifying the movie to be |
| 554 * played. |
| 555 * Note: The dictionary must include either an Annot or a T entry, but not both
. |
| 556 **/ |
| 557 bool has_T() const { |
| 558 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "
", NULL)); |
| 559 } |
| 560 |
538 std::string T() const { | 561 std::string T() const { |
539 std::string ret; | 562 std::string ret; |
540 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &
ret)) return ret; | 563 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &
ret)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 564 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return ""; | 565 return ""; |
543 } | 566 } |
544 | 567 |
| 568 /** (Optional) The operation to be performed on the movie: |
| 569 * Play Start playing the movie, using the play mode specified by th
e |
| 570 * dictionary's Mode entry (see Table 8.79 on page 571). If the |
| 571 * movie is currently paused, it is repositioned to the beginni
ng |
| 572 * before playing (or to the starting point specified by the di
c- |
| 573 * tionary's Start entry, if present). |
| 574 * Stop Stop playing the movie. |
| 575 * Pause Pause a playing movie. |
| 576 * Resume Resume a paused movie. |
| 577 * Default value: Play. |
| 578 **/ |
| 579 bool has_Operation() const { |
| 580 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opera
tion", "", NULL)); |
| 581 } |
| 582 |
545 std::string Operation() const { | 583 std::string Operation() const { |
546 std::string ret; | 584 std::string ret; |
547 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Operation",
"", &ret)) return ret; | 585 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Operation",
"", &ret)) return ret; |
548 // 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 |
549 return ""; | 587 return ""; |
550 } | 588 } |
551 | 589 |
552 }; | 590 }; |
553 | 591 |
554 #endif // __DEFINED__SkPdfMovieActionDictionary | 592 #endif // __DEFINED__SkPdfMovieActionDictionary |
OLD | NEW |