OLD | NEW |
1 #ifndef __DEFINED__SkPdfLaunchActionDictionary | 1 #ifndef __DEFINED__SkPdfLaunchActionDictionary |
2 #define __DEFINED__SkPdfLaunchActionDictionary | 2 #define __DEFINED__SkPdfLaunchActionDictionary |
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 launch action |
8 class SkPdfLaunchActionDictionary : public SkPdfDictionary { | 9 class SkPdfLaunchActionDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kLaunchActionDictionary_SkPdf
ObjectType;} | 11 virtual SkPdfObjectType getType() const { return kLaunchActionDictionary_SkPdf
ObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kLaunchA
ctionDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kLaunchA
ctionDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfLaunchActionDictionary* asLaunchActionDictionary() {return this;} | 14 virtual SkPdfLaunchActionDictionary* asLaunchActionDictionary() {return this;} |
14 virtual const SkPdfLaunchActionDictionary* asLaunchActionDictionary() const {r
eturn this;} | 15 virtual const SkPdfLaunchActionDictionary* asLaunchActionDictionary() const {r
eturn 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 SkPdfLaunchActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO
bject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfLaunchActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO
bject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfLaunchActionDictionary& operator=(const SkPdfLaunchActionDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} | 523 SkPdfLaunchActionDictionary& operator=(const SkPdfLaunchActionDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} |
523 | 524 |
| 525 /** (Required) The type of action that this dictionary describes; must be Launch |
| 526 * for a launch 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 /** (Required if none of the entries Win, Mac, or Unix is present) The applicati
on to |
| 540 * be launched or the document to be opened or printed. If this entry is absent |
| 541 * and the viewer application does not understand any of the alternative entrie
s, |
| 542 * it should do nothing. |
| 543 **/ |
| 544 bool has_F() const { |
| 545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "
", NULL)); |
| 546 } |
| 547 |
531 SkPdfFileSpec F() const { | 548 SkPdfFileSpec F() const { |
532 SkPdfFileSpec ret; | 549 SkPdfFileSpec ret; |
533 if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "",
&ret)) return ret; | 550 if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "",
&ret)) return ret; |
534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 551 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
535 return SkPdfFileSpec(); | 552 return SkPdfFileSpec(); |
536 } | 553 } |
537 | 554 |
| 555 /** (Optional) A dictionary containing Windows-specific launch parameters (see |
| 556 * the Table 8.38; see also implementation note 73 in Appendix H). |
| 557 **/ |
| 558 bool has_Win() const { |
| 559 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Win",
"", NULL)); |
| 560 } |
| 561 |
538 SkPdfDictionary* Win() const { | 562 SkPdfDictionary* Win() const { |
539 SkPdfDictionary* ret; | 563 SkPdfDictionary* ret; |
540 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Win",
"", &ret)) return ret; | 564 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Win",
"", &ret)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 565 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return NULL; | 566 return NULL; |
543 } | 567 } |
544 | 568 |
| 569 /** (Optional) Mac OS'specific launch parameters; not yet defined. |
| 570 **/ |
| 571 bool has_Mac() const { |
| 572 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac",
"", NULL)); |
| 573 } |
| 574 |
545 SkPdfObject* Mac() const { | 575 SkPdfObject* Mac() const { |
546 SkPdfObject* ret; | 576 SkPdfObject* ret; |
547 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "",
&ret)) return ret; | 577 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "",
&ret)) return ret; |
548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 578 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
549 return NULL; | 579 return NULL; |
550 } | 580 } |
551 | 581 |
| 582 /** (Optional) UNIX-specific launch parameters; not yet defined. |
| 583 **/ |
| 584 bool has_Unix() const { |
| 585 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix"
, "", NULL)); |
| 586 } |
| 587 |
552 SkPdfObject* Unix() const { | 588 SkPdfObject* Unix() const { |
553 SkPdfObject* ret; | 589 SkPdfObject* ret; |
554 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix", ""
, &ret)) return ret; | 590 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix", ""
, &ret)) return ret; |
555 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 591 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
556 return NULL; | 592 return NULL; |
557 } | 593 } |
558 | 594 |
| 595 /** (Optional; PDF 1.2) A flag specifying whether to open the destination docu- |
| 596 * ment in a new window. If this flag is false, the destination document will |
| 597 * replace the current document in the same window. If this entry is absent, th
e |
| 598 * viewer application should behave in accordance with the current user prefer- |
| 599 * ence. This entry is ignored if the file designated by the F entry is not a P
DF |
| 600 * document. |
| 601 **/ |
| 602 bool has_NewWindow() const { |
| 603 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWi
ndow", "", NULL)); |
| 604 } |
| 605 |
559 bool NewWindow() const { | 606 bool NewWindow() const { |
560 bool ret; | 607 bool ret; |
561 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWindow",
"", &ret)) return ret; | 608 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWindow",
"", &ret)) return ret; |
562 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 609 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
563 return false; | 610 return false; |
564 } | 611 } |
565 | 612 |
566 }; | 613 }; |
567 | 614 |
568 #endif // __DEFINED__SkPdfLaunchActionDictionary | 615 #endif // __DEFINED__SkPdfLaunchActionDictionary |
OLD | NEW |