| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfVariableTextFieldDictionary | 1 #ifndef __DEFINED__SkPdfVariableTextFieldDictionary |
| 2 #define __DEFINED__SkPdfVariableTextFieldDictionary | 2 #define __DEFINED__SkPdfVariableTextFieldDictionary |
| 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 common to all fields containing variable text |
| 8 class SkPdfVariableTextFieldDictionary : public SkPdfDictionary { | 9 class SkPdfVariableTextFieldDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kVariableTextFieldDictionary_
SkPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kVariableTextFieldDictionary_
SkPdfObjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kVariabl
eTextFieldDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kVariabl
eTextFieldDictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfVariableTextFieldDictionary* asVariableTextFieldDictionary() {ret
urn this;} | 14 virtual SkPdfVariableTextFieldDictionary* asVariableTextFieldDictionary() {ret
urn this;} |
| 14 virtual const SkPdfVariableTextFieldDictionary* asVariableTextFieldDictionary(
) const {return this;} | 15 virtual const SkPdfVariableTextFieldDictionary* asVariableTextFieldDictionary(
) 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 SkPdfVariableTextFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const
PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfVariableTextFieldDictionary(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 SkPdfVariableTextFieldDictionary& operator=(const SkPdfVariableTextFieldDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} | 523 SkPdfVariableTextFieldDictionary& operator=(const SkPdfVariableTextFieldDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} |
| 523 | 524 |
| 525 /** (Required; inheritable) A resource dictionary (see Section 3.7.2, "Resource
Diction- |
| 526 * aries") containing default resources (such as fonts, patterns, or color spac
es) to be used |
| 527 * by the appearance stream. At a minimum, this dictionary must contain a Font
entry |
| 528 * specifying the resource name and font dictionary of the default font for dis
playing the |
| 529 * field's text. (See implementation note 84 in Appendix H.) |
| 530 **/ |
| 531 bool has_DR() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR",
"", NULL)); |
| 533 } |
| 534 |
| 524 SkPdfDictionary* DR() const { | 535 SkPdfDictionary* DR() const { |
| 525 SkPdfDictionary* ret; | 536 SkPdfDictionary* ret; |
| 526 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR",
"", &ret)) return ret; | 537 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR",
"", &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 /** (Required; inheritable) The default appearance string, containing a sequence
of valid |
| 543 * page-content graphics or text state operators defining such properties as th
e field's text |
| 544 * size and color. |
| 545 **/ |
| 546 bool has_DA() const { |
| 547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA",
"", NULL)); |
| 548 } |
| 549 |
| 531 std::string DA() const { | 550 std::string DA() const { |
| 532 std::string ret; | 551 std::string ret; |
| 533 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "",
&ret)) return ret; | 552 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "",
&ret)) return ret; |
| 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 535 return ""; | 554 return ""; |
| 536 } | 555 } |
| 537 | 556 |
| 557 /** (Optional; inheritable) A code specifying the form of quadding (justificatio
n) to be |
| 558 * used in displaying the text: |
| 559 * 0 Left-justified |
| 560 * 1 Centered |
| 561 * 2 Right-justified |
| 562 * Default value: 0 (left-justified). |
| 563 **/ |
| 564 bool has_Q() const { |
| 565 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "
", NULL)); |
| 566 } |
| 567 |
| 538 long Q() const { | 568 long Q() const { |
| 539 long ret; | 569 long ret; |
| 540 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", &re
t)) return ret; | 570 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", &re
t)) return ret; |
| 541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 571 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 542 return 0; | 572 return 0; |
| 543 } | 573 } |
| 544 | 574 |
| 545 }; | 575 }; |
| 546 | 576 |
| 547 #endif // __DEFINED__SkPdfVariableTextFieldDictionary | 577 #endif // __DEFINED__SkPdfVariableTextFieldDictionary |
| OLD | NEW |