OLD | NEW |
1 #ifndef __DEFINED__SkPdfMovieActivationDictionary | 1 #ifndef __DEFINED__SkPdfMovieActivationDictionary |
2 #define __DEFINED__SkPdfMovieActivationDictionary | 2 #define __DEFINED__SkPdfMovieActivationDictionary |
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 // Entries in a movie activation dictionary |
8 class SkPdfMovieActivationDictionary : public SkPdfDictionary { | 9 class SkPdfMovieActivationDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kMovieActivationDictionary_Sk
PdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kMovieActivationDictionary_Sk
PdfObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kMovieAc
tivationDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kMovieAc
tivationDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfMovieActivationDictionary* asMovieActivationDictionary() {return
this;} | 14 virtual SkPdfMovieActivationDictionary* asMovieActivationDictionary() {return
this;} |
14 virtual const SkPdfMovieActivationDictionary* asMovieActivationDictionary() co
nst {return this;} | 15 virtual const SkPdfMovieActivationDictionary* asMovieActivationDictionary() co
nst {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 SkPdfMovieActivationDictionary(const PdfMemDocument* podofoDoc = NULL, const P
dfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfMovieActivationDictionary(const PdfMemDocument* podofoDoc = NULL, const P
dfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfMovieActivationDictionary& operator=(const SkPdfMovieActivationDictionary
& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj;
return *this;} | 523 SkPdfMovieActivationDictionary& operator=(const SkPdfMovieActivationDictionary
& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj;
return *this;} |
523 | 524 |
| 525 /** (Optional) The starting time of the movie segment to be played. Movie time |
| 526 * values are expressed in units of time based on a time scale, which defines t
he |
| 527 * number of units per second; the default time scale is defined in the movie |
| 528 * data itself. The starting time is nominally a 64-bit integer, specified as f
ollows: |
| 529 * * If it is representable as an integer (subject to the implementation limit
for |
| 530 * integers, as described in Appendix C), it should be specified as such. |
| 531 * * If it is not representable as an integer, it should be specified as an 8-
byte |
| 532 * string representing a 64-bit twos-complement integer, most significant |
| 533 * byte first. |
| 534 * * If it is expressed in a time scale different from that of the movie itsel
f, it is |
| 535 * represented as an array of two values: an integer or string denoting the |
| 536 * starting time, as above, followed by an integer specifying the time scale
in |
| 537 * units per second. |
| 538 * If this entry is omitted, the movie is played from the beginning. |
| 539 **/ |
| 540 bool has_Start() const { |
| 541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Start
", "", NULL)); |
| 542 } |
| 543 |
524 SkPdfObject* Start() const { | 544 SkPdfObject* Start() const { |
525 SkPdfObject* ret; | 545 SkPdfObject* ret; |
526 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Start", "
", &ret)) return ret; | 546 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Start", "
", &ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 547 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return NULL; | 548 return NULL; |
529 } | 549 } |
530 | 550 |
| 551 /** (Optional) The duration of the movie segment to be played, specified in the |
| 552 * same form as Start. Negative values specify that the movie is to be played |
| 553 * backward. If this entry is omitted, the movie is played to the end. |
| 554 **/ |
| 555 bool has_Duration() const { |
| 556 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Durat
ion", "", NULL)); |
| 557 } |
| 558 |
531 SkPdfObject* Duration() const { | 559 SkPdfObject* Duration() const { |
532 SkPdfObject* ret; | 560 SkPdfObject* ret; |
533 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Duration"
, "", &ret)) return ret; | 561 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Duration"
, "", &ret)) return ret; |
534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 562 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
535 return NULL; | 563 return NULL; |
536 } | 564 } |
537 | 565 |
| 566 /** (Optional) The initial speed at which to play the movie. If the value of thi
s |
| 567 * entry is negative, the movie is played backward with respect to Start and |
| 568 * Duration. Default value: 1.0. |
| 569 **/ |
| 570 bool has_Rate() const { |
| 571 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rate"
, "", NULL)); |
| 572 } |
| 573 |
538 double Rate() const { | 574 double Rate() const { |
539 double ret; | 575 double ret; |
540 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rate", ""
, &ret)) return ret; | 576 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rate", ""
, &ret)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 577 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return 0; | 578 return 0; |
543 } | 579 } |
544 | 580 |
| 581 /** (Optional) The initial sound volume at which to play the movie, in the range |
| 582 * -1.0 to 1.0. Higher values denote greater volume; negative values mute the |
| 583 * sound. Default value: 1.0. |
| 584 **/ |
| 585 bool has_Volume() const { |
| 586 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volum
e", "", NULL)); |
| 587 } |
| 588 |
545 double Volume() const { | 589 double Volume() const { |
546 double ret; | 590 double ret; |
547 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volume",
"", &ret)) return ret; | 591 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volume",
"", &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 0; | 593 return 0; |
550 } | 594 } |
551 | 595 |
| 596 /** (Optional) A flag specifying whether to display a movie controller bar while |
| 597 * playing the movie. Default value: false. |
| 598 **/ |
| 599 bool has_ShowControls() const { |
| 600 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ShowC
ontrols", "", NULL)); |
| 601 } |
| 602 |
552 bool ShowControls() const { | 603 bool ShowControls() const { |
553 bool ret; | 604 bool ret; |
554 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ShowControl
s", "", &ret)) return ret; | 605 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ShowControl
s", "", &ret)) return ret; |
555 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 606 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
556 return false; | 607 return false; |
557 } | 608 } |
558 | 609 |
| 610 /** (Optional) The play mode for playing the movie: |
| 611 * Once Play once and stop. |
| 612 * Open Play and leave the movie controller bar open. |
| 613 * Repeat Play repeatedly from beginning to end until stopped. |
| 614 * Palindrome Play continuously forward and backward until stopped. |
| 615 * Default value: Once. |
| 616 **/ |
| 617 bool has_Mode() const { |
| 618 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mode"
, "", NULL)); |
| 619 } |
| 620 |
559 std::string Mode() const { | 621 std::string Mode() const { |
560 std::string ret; | 622 std::string ret; |
561 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mode", "",
&ret)) return ret; | 623 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mode", "",
&ret)) return ret; |
562 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 624 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
563 return ""; | 625 return ""; |
564 } | 626 } |
565 | 627 |
| 628 /** (Optional) A flag specifying whether to play the movie synchronously or |
| 629 * asynchronously. If this value is true, the movie player will retain control
until |
| 630 * the movie is completed or dismissed by the user; if false, it will return co
ntrol |
| 631 * to the viewer application immediately after starting the movie. Default valu
e: |
| 632 * false. |
| 633 **/ |
| 634 bool has_Synchronous() const { |
| 635 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synch
ronous", "", NULL)); |
| 636 } |
| 637 |
566 bool Synchronous() const { | 638 bool Synchronous() const { |
567 bool ret; | 639 bool ret; |
568 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synchronous
", "", &ret)) return ret; | 640 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synchronous
", "", &ret)) return ret; |
569 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 641 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
570 return false; | 642 return false; |
571 } | 643 } |
572 | 644 |
| 645 /** (Optional) The magnification (zoom) factor at which to play the movie. The |
| 646 * presence of this entry implies that the movie is to be played in a floating
win- |
| 647 * dow; if the entry is absent, it will be played in the annotation rectangle. |
| 648 * The value of the entry is an array of two integers, [numerator denominator], |
| 649 * denoting a rational magnification factor for the movie. The final window |
| 650 * size, in pixels, is |
| 651 * (numerator / denominator) x Aspect |
| 652 * where the value of Aspect is taken from the movie dictionary (see Table 8.79
). |
| 653 **/ |
| 654 bool has_FWScale() const { |
| 655 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWSca
le", "", NULL)); |
| 656 } |
| 657 |
573 SkPdfArray FWScale() const { | 658 SkPdfArray FWScale() const { |
574 SkPdfArray ret; | 659 SkPdfArray ret; |
575 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWScale",
"", &ret)) return ret; | 660 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWScale",
"", &ret)) return ret; |
576 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 661 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
577 return SkPdfArray(); | 662 return SkPdfArray(); |
578 } | 663 } |
579 | 664 |
| 665 /** (Optional) For floating play windows, the relative position of the window on |
| 666 * the screen. The value is an array of two numbers |
| 667 * [horiz vert] |
| 668 * each in the range 0.0 to 1.0, denoting the relative horizontal and vertical
posi- |
| 669 * tion of the movie window with respect to the screen. For example, the value |
| 670 * [0.5 0.5] centers the window on the screen. Default value: [0.5 0.5]. |
| 671 * CHAPTER 9 |
| 672 **/ |
| 673 bool has_FWPosition() const { |
| 674 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWPos
ition", "", NULL)); |
| 675 } |
| 676 |
580 SkPdfArray FWPosition() const { | 677 SkPdfArray FWPosition() const { |
581 SkPdfArray ret; | 678 SkPdfArray ret; |
582 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWPosition
", "", &ret)) return ret; | 679 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWPosition
", "", &ret)) return ret; |
583 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 680 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
584 return SkPdfArray(); | 681 return SkPdfArray(); |
585 } | 682 } |
586 | 683 |
587 }; | 684 }; |
588 | 685 |
589 #endif // __DEFINED__SkPdfMovieActivationDictionary | 686 #endif // __DEFINED__SkPdfMovieActivationDictionary |
OLD | NEW |