OLD | NEW |
1 #ifndef __DEFINED__SkPdfPageObjectActionsDictionary | 1 #ifndef __DEFINED__SkPdfPageObjectActionsDictionary |
2 #define __DEFINED__SkPdfPageObjectActionsDictionary | 2 #define __DEFINED__SkPdfPageObjectActionsDictionary |
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 page object's additional-actions dictionary |
8 class SkPdfPageObjectActionsDictionary : public SkPdfDictionary { | 9 class SkPdfPageObjectActionsDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kPageObjectActionsDictionary_
SkPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kPageObjectActionsDictionary_
SkPdfObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kPageObj
ectActionsDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kPageObj
ectActionsDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfPageObjectActionsDictionary* asPageObjectActionsDictionary() {ret
urn this;} | 14 virtual SkPdfPageObjectActionsDictionary* asPageObjectActionsDictionary() {ret
urn this;} |
14 virtual const SkPdfPageObjectActionsDictionary* asPageObjectActionsDictionary(
) const {return this;} | 15 virtual const SkPdfPageObjectActionsDictionary* asPageObjectActionsDictionary(
) const {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 SkPdfPageObjectActionsDictionary(const PdfMemDocument* podofoDoc = NULL, const
PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfPageObjectActionsDictionary(const PdfMemDocument* podofoDoc = NULL, const
PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfPageObjectActionsDictionary& operator=(const SkPdfPageObjectActionsDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} | 523 SkPdfPageObjectActionsDictionary& operator=(const SkPdfPageObjectActionsDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} |
523 | 524 |
| 525 /** (Optional; PDF 1.2) An action to be performed when the page is opened (for e
xample, |
| 526 * when the user navigates to it from the next or previous page or via a link a
nnotation or |
| 527 * outline item). This action is independent of any that may be defined by the
Open- |
| 528 * Action entry in the document catalog (see Section 3.6.1, "Document Catalog")
, and is |
| 529 * executed after such an action. (See implementation note 72 in Appendix H.) |
| 530 **/ |
| 531 bool has_O() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "
", NULL)); |
| 533 } |
| 534 |
524 SkPdfDictionary* O() const { | 535 SkPdfDictionary* O() const { |
525 SkPdfDictionary* ret; | 536 SkPdfDictionary* ret; |
526 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "
", &ret)) return ret; | 537 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "
", &ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return NULL; | 539 return NULL; |
529 } | 540 } |
530 | 541 |
| 542 /** (Optional; PDF 1.2) An action to be performed when the page is closed (for e
xample, |
| 543 * when the user navigates to the next or previous page or follows a link annot
ation or an |
| 544 * outline item). This action applies to the page being closed, and is executed
before any |
| 545 * other page is opened. (See implementation note 72 in Appendix H.) |
| 546 **/ |
| 547 bool has_C() const { |
| 548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", NULL)); |
| 549 } |
| 550 |
531 SkPdfDictionary* C() const { | 551 SkPdfDictionary* C() const { |
532 SkPdfDictionary* ret; | 552 SkPdfDictionary* ret; |
533 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", &ret)) return ret; | 553 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", &ret)) return ret; |
534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 554 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
535 return NULL; | 555 return NULL; |
536 } | 556 } |
537 | 557 |
538 }; | 558 }; |
539 | 559 |
540 #endif // __DEFINED__SkPdfPageObjectActionsDictionary | 560 #endif // __DEFINED__SkPdfPageObjectActionsDictionary |
OLD | NEW |