OLD | NEW |
1 #ifndef __DEFINED__SkPdfRadioButtonFieldDictionary | 1 #ifndef __DEFINED__SkPdfRadioButtonFieldDictionary |
2 #define __DEFINED__SkPdfRadioButtonFieldDictionary | 2 #define __DEFINED__SkPdfRadioButtonFieldDictionary |
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 radio button field |
8 class SkPdfRadioButtonFieldDictionary : public SkPdfDictionary { | 9 class SkPdfRadioButtonFieldDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kRadioButtonFieldDictionary_S
kPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kRadioButtonFieldDictionary_S
kPdfObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kRadioBu
ttonFieldDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kRadioBu
ttonFieldDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfRadioButtonFieldDictionary* asRadioButtonFieldDictionary() {retur
n this;} | 14 virtual SkPdfRadioButtonFieldDictionary* asRadioButtonFieldDictionary() {retur
n this;} |
14 virtual const SkPdfRadioButtonFieldDictionary* asRadioButtonFieldDictionary()
const {return this;} | 15 virtual const SkPdfRadioButtonFieldDictionary* asRadioButtonFieldDictionary()
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 SkPdfRadioButtonFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const
PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfRadioButtonFieldDictionary(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 SkPdfRadioButtonFieldDictionary& operator=(const SkPdfRadioButtonFieldDictiona
ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb
j; return *this;} | 523 SkPdfRadioButtonFieldDictionary& operator=(const SkPdfRadioButtonFieldDictiona
ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb
j; return *this;} |
523 | 524 |
| 525 /** (Optional; inheritable; PDF 1.4) An array of text strings to be used in |
| 526 * place of the V entries for the values of the widget annotations repre- |
| 527 * senting the individual radio buttons. Each element in the array repre- |
| 528 * sents the export value of the corresponding widget annotation in the |
| 529 * Kids array of the radio button field. |
| 530 **/ |
| 531 bool has_Opt() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt",
"", NULL)); |
| 533 } |
| 534 |
524 SkPdfArray Opt() const { | 535 SkPdfArray Opt() const { |
525 SkPdfArray ret; | 536 SkPdfArray ret; |
526 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "",
&ret)) return ret; | 537 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "",
&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 SkPdfArray(); | 539 return SkPdfArray(); |
529 } | 540 } |
530 | 541 |
531 }; | 542 }; |
532 | 543 |
533 #endif // __DEFINED__SkPdfRadioButtonFieldDictionary | 544 #endif // __DEFINED__SkPdfRadioButtonFieldDictionary |
OLD | NEW |