OLD | NEW |
1 #ifndef __DEFINED__SkPdfFormFieldActionsDictionary | 1 #ifndef __DEFINED__SkPdfFormFieldActionsDictionary |
2 #define __DEFINED__SkPdfFormFieldActionsDictionary | 2 #define __DEFINED__SkPdfFormFieldActionsDictionary |
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 form field's additional-actions dictionary |
8 class SkPdfFormFieldActionsDictionary : public SkPdfDictionary { | 9 class SkPdfFormFieldActionsDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kFormFieldActionsDictionary_S
kPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kFormFieldActionsDictionary_S
kPdfObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFormFie
ldActionsDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFormFie
ldActionsDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() {retur
n this;} | 14 virtual SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() {retur
n this;} |
14 virtual const SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary()
const {return this;} | 15 virtual const SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary()
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 SkPdfFormFieldActionsDictionary(const PdfMemDocument* podofoDoc = NULL, const
PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfFormFieldActionsDictionary(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 SkPdfFormFieldActionsDictionary& operator=(const SkPdfFormFieldActionsDictiona
ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb
j; return *this;} | 523 SkPdfFormFieldActionsDictionary& operator=(const SkPdfFormFieldActionsDictiona
ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb
j; return *this;} |
523 | 524 |
| 525 /** (Optional; PDF 1.3) A JavaScript action to be performed when the user types
a key- |
| 526 * stroke into a text field or combo box or modifies the selection in a scrolla
ble list box. |
| 527 * This allows the keystroke to be checked for validity and rejected or modifie
d. |
| 528 **/ |
| 529 bool has_K() const { |
| 530 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "
", NULL)); |
| 531 } |
| 532 |
524 SkPdfDictionary* K() const { | 533 SkPdfDictionary* K() const { |
525 SkPdfDictionary* ret; | 534 SkPdfDictionary* ret; |
526 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "
", &ret)) return ret; | 535 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "
", &ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 536 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return NULL; | 537 return NULL; |
529 } | 538 } |
530 | 539 |
| 540 /** (Optional; PDF 1.3) A JavaScript action to be performed before the field is
formatted |
| 541 * to display its current value. This allows the field's value to be modified b
efore format- |
| 542 * ting. |
| 543 **/ |
| 544 bool has_F() const { |
| 545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "
", NULL)); |
| 546 } |
| 547 |
531 SkPdfDictionary* F() const { | 548 SkPdfDictionary* F() const { |
532 SkPdfDictionary* ret; | 549 SkPdfDictionary* ret; |
533 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "
", &ret)) return ret; | 550 if (DictionaryFromDictionary(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 NULL; | 552 return NULL; |
536 } | 553 } |
537 | 554 |
| 555 /** (Optional; PDF 1.3) A JavaScript action to be performed when the field's val
ue is |
| 556 * changed. This allows the new value to be checked for validity. (The name V s
tands for |
| 557 * "validate.") |
| 558 **/ |
| 559 bool has_V() const { |
| 560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "
", NULL)); |
| 561 } |
| 562 |
538 SkPdfDictionary* V() const { | 563 SkPdfDictionary* V() const { |
539 SkPdfDictionary* ret; | 564 SkPdfDictionary* ret; |
540 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "
", &ret)) return ret; | 565 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "
", &ret)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 566 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return NULL; | 567 return NULL; |
543 } | 568 } |
544 | 569 |
| 570 /** (Optional; PDF 1.3) A JavaScript action to be performed in order to recalcul
ate the |
| 571 * value of this field when that of another field changes. (The name C stands f
or |
| 572 * "calculate.") The order in which the document's fields are recalculated is d
efined by the |
| 573 * CO entry in the interactive form dictionary (see Section 8.6.1, "Interactive
Form |
| 574 * Dictionary"). |
| 575 **/ |
| 576 bool has_C() const { |
| 577 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", NULL)); |
| 578 } |
| 579 |
545 SkPdfDictionary* C() const { | 580 SkPdfDictionary* C() const { |
546 SkPdfDictionary* ret; | 581 SkPdfDictionary* ret; |
547 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", &ret)) return ret; | 582 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", &ret)) return ret; |
548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 583 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
549 return NULL; | 584 return NULL; |
550 } | 585 } |
551 | 586 |
552 }; | 587 }; |
553 | 588 |
554 #endif // __DEFINED__SkPdfFormFieldActionsDictionary | 589 #endif // __DEFINED__SkPdfFormFieldActionsDictionary |
OLD | NEW |