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

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

Issue 17856004: refactoring for pdf viewer lib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 "SkPdfUtils.h" 4 #include "SkPdfUtils.h"
5 #include "SkPdfEnums_autogen.h" 5 #include "SkPdfEnums_autogen.h"
6 #include "SkPdfArray_autogen.h" 6 #include "SkPdfArray_autogen.h"
7 #include "SkPdfDictionary_autogen.h" 7 #include "SkPdfDictionary_autogen.h"
8 8
9 // Additional entries specific to a choice field 9 // Additional entries specific to a choice field
10 class SkPdfChoiceFieldDictionary : public SkPdfDictionary { 10 class SkPdfChoiceFieldDictionary : public SkPdfDictionary {
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 /** (Required; inheritable) An array of options to be presented to the user. Eac h element of 528 /** (Required; inheritable) An array of options to be presented to the user. Eac h element of
529 * the array is either a text string representing one of the available options or a two-element 529 * the array is either a text string representing one of the available options or a two-element
530 * array consisting of a text string together with a default appearance string for construct- 530 * array consisting of a text string together with a default appearance string for construct-
531 * ing the item's appearance dynamically at viewing time (see "Variable Text" o n page 533; 531 * ing the item's appearance dynamically at viewing time (see "Variable Text" o n page 533;
532 * see also implementation note 85 in Appendix H). 532 * see also implementation note 85 in Appendix H).
533 **/ 533 **/
534 bool has_Opt() const { 534 bool has_Opt() const {
535 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL)); 535 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
536 } 536 }
537 537
538 SkPdfArray* Opt() const { 538 SkPdfArray* Opt() const;
539 SkPdfArray* ret;
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return NULL;
543 }
544
545 /** (Optional; inheritable) For scrollable list boxes, the top index (the index in the Opt array 539 /** (Optional; inheritable) For scrollable list boxes, the top index (the index in the Opt array
546 * of the first option visible in the list). 540 * of the first option visible in the list).
547 **/ 541 **/
548 bool has_TI() const { 542 bool has_TI() const {
549 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", NULL)); 543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", NULL));
550 } 544 }
551 545
552 long TI() const { 546 long TI() const;
553 long ret;
554 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", &r et)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return 0;
557 }
558
559 /** (Sometimes required, otherwise optional; inheritable; PDF 1.4) For choice fi elds that allow 547 /** (Sometimes required, otherwise optional; inheritable; PDF 1.4) For choice fi elds that allow
560 * multiple selection (MultiSelect flag set), an array of integers, sorted in a scending order, 548 * multiple selection (MultiSelect flag set), an array of integers, sorted in a scending order,
561 * representing the zero-based indices in the Opt array of the currently select ed option 549 * representing the zero-based indices in the Opt array of the currently select ed option
562 * items. This entry is required when two or more elements in the Opt array hav e different 550 * items. This entry is required when two or more elements in the Opt array hav e different
563 * names but the same export value, or when the value of the choice field is an array; in 551 * names but the same export value, or when the value of the choice field is an array; in
564 * other cases, it is permitted but not required. If the items identified by th is entry differ 552 * other cases, it is permitted but not required. If the items identified by th is entry differ
565 * from those in the V entry of the field dictionary (see below), the V entry t akes precedence. 553 * from those in the V entry of the field dictionary (see below), the V entry t akes precedence.
566 **/ 554 **/
567 bool has_I() const { 555 bool has_I() const {
568 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", " ", NULL)); 556 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", " ", NULL));
569 } 557 }
570 558
571 SkPdfArray* I() const { 559 SkPdfArray* I() const;
572 SkPdfArray* ret;
573 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", &r et)) return ret;
574 // TODO(edisonn): warn about missing required field, assert for known good p dfs
575 return NULL;
576 }
577
578 }; 560 };
579 561
580 #endif // __DEFINED__SkPdfChoiceFieldDictionary 562 #endif // __DEFINED__SkPdfChoiceFieldDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698