OLD | NEW |
1 #ifndef __DEFINED__SkPdfTextFieldDictionary | 1 #ifndef __DEFINED__SkPdfTextFieldDictionary |
2 #define __DEFINED__SkPdfTextFieldDictionary | 2 #define __DEFINED__SkPdfTextFieldDictionary |
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 entry specific to a text field |
8 class SkPdfTextFieldDictionary : public SkPdfDictionary { | 9 class SkPdfTextFieldDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kTextFieldDictionary_SkPdfObj
ectType;} | 11 virtual SkPdfObjectType getType() const { return kTextFieldDictionary_SkPdfObj
ectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kTextFie
ldDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kTextFie
ldDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfTextFieldDictionary* asTextFieldDictionary() {return this;} | 14 virtual SkPdfTextFieldDictionary* asTextFieldDictionary() {return this;} |
14 virtual const SkPdfTextFieldDictionary* asTextFieldDictionary() const {return
this;} | 15 virtual const SkPdfTextFieldDictionary* asTextFieldDictionary() 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 SkPdfTextFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObje
ct* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfTextFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObje
ct* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfTextFieldDictionary& operator=(const SkPdfTextFieldDictionary& from) {thi
s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi
s;} | 523 SkPdfTextFieldDictionary& operator=(const SkPdfTextFieldDictionary& from) {thi
s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi
s;} |
523 | 524 |
| 525 /** (Optional; inheritable) The maximum length of the field's text, in character
s. |
| 526 **/ |
| 527 bool has_MaxLen() const { |
| 528 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MaxLe
n", "", NULL)); |
| 529 } |
| 530 |
524 long MaxLen() const { | 531 long MaxLen() const { |
525 long ret; | 532 long ret; |
526 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MaxLen", ""
, &ret)) return ret; | 533 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MaxLen", ""
, &ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return 0; | 535 return 0; |
529 } | 536 } |
530 | 537 |
531 }; | 538 }; |
532 | 539 |
533 #endif // __DEFINED__SkPdfTextFieldDictionary | 540 #endif // __DEFINED__SkPdfTextFieldDictionary |
OLD | NEW |