Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: experimental/PdfViewer/SkPdfChoiceFieldDictionary_autogen.h

Issue 16975013: Deal with ca and CA transparency operators in pdf. add comments to generated classes. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #ifndef __DEFINED__SkPdfChoiceFieldDictionary 1 #ifndef __DEFINED__SkPdfChoiceFieldDictionary
2 #define __DEFINED__SkPdfChoiceFieldDictionary 2 #define __DEFINED__SkPdfChoiceFieldDictionary
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 specific to a choice field
8 class SkPdfChoiceFieldDictionary : public SkPdfDictionary { 9 class SkPdfChoiceFieldDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kChoiceFieldDictionary_SkPdfO bjectType;} 11 virtual SkPdfObjectType getType() const { return kChoiceFieldDictionary_SkPdfO bjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kChoiceF ieldDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kChoiceF ieldDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfChoiceFieldDictionary* asChoiceFieldDictionary() {return this;} 14 virtual SkPdfChoiceFieldDictionary* asChoiceFieldDictionary() {return this;}
14 virtual const SkPdfChoiceFieldDictionary* asChoiceFieldDictionary() const {ret urn this;} 15 virtual const SkPdfChoiceFieldDictionary* asChoiceFieldDictionary() const {ret urn 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
514 515
515 public: 516 public:
516 private: 517 private:
517 public: 518 public:
518 SkPdfChoiceFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfOb ject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfChoiceFieldDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfOb ject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfChoiceFieldDictionary& operator=(const SkPdfChoiceFieldDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} 523 SkPdfChoiceFieldDictionary& operator=(const SkPdfChoiceFieldDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
523 524
525 /** (Required; inheritable) An array of options to be presented to the user. Eac h element of
526 * the array is either a text string representing one of the available options or a two-element
527 * array consisting of a text string together with a default appearance string for construct-
528 * ing the item's appearance dynamically at viewing time (see "Variable Text" o n page 533;
529 * see also implementation note 85 in Appendix H).
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
542 /** (Optional; inheritable) For scrollable list boxes, the top index (the index in the Opt array
543 * of the first option visible in the list).
544 **/
545 bool has_TI() const {
546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", NULL));
547 }
548
531 long TI() const { 549 long TI() const {
532 long ret; 550 long ret;
533 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", &r et)) return ret; 551 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", &r et)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 552 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return 0; 553 return 0;
536 } 554 }
537 555
556 /** (Sometimes required, otherwise optional; inheritable; PDF 1.4) For choice fi elds that allow
557 * multiple selection (MultiSelect flag set), an array of integers, sorted in a scending order,
558 * representing the zero-based indices in the Opt array of the currently select ed option
559 * items. This entry is required when two or more elements in the Opt array hav e different
560 * names but the same export value, or when the value of the choice field is an array; in
561 * other cases, it is permitted but not required. If the items identified by th is entry differ
562 * from those in the V entry of the field dictionary (see below), the V entry t akes precedence.
563 **/
564 bool has_I() const {
565 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", " ", NULL));
566 }
567
538 SkPdfArray I() const { 568 SkPdfArray I() const {
539 SkPdfArray ret; 569 SkPdfArray ret;
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", &r et)) return ret; 570 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", &r et)) 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 SkPdfArray(); 572 return SkPdfArray();
543 } 573 }
544 574
545 }; 575 };
546 576
547 #endif // __DEFINED__SkPdfChoiceFieldDictionary 577 #endif // __DEFINED__SkPdfChoiceFieldDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698