OLD | NEW |
1 #ifndef __DEFINED__SkPdfOutlineDictionary | 1 #ifndef __DEFINED__SkPdfOutlineDictionary |
2 #define __DEFINED__SkPdfOutlineDictionary | 2 #define __DEFINED__SkPdfOutlineDictionary |
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 // Entries in the outline dictionary | 9 // Entries in the outline dictionary |
10 class SkPdfOutlineDictionary : public SkPdfDictionary { | 10 class SkPdfOutlineDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfOutlineDictionary& operator=(const SkPdfOutlineDictionary& from) {this->f
PodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} | 526 SkPdfOutlineDictionary& operator=(const SkPdfOutlineDictionary& from) {this->f
PodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} |
527 | 527 |
528 /** (Optional) The type of PDF object that this dictionary describes; if present
, | 528 /** (Optional) The type of PDF object that this dictionary describes; if present
, |
529 * must be Outlines for an outline dictionary. | 529 * must be Outlines for an outline dictionary. |
530 **/ | 530 **/ |
531 bool has_Type() const { | 531 bool has_Type() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
533 } | 533 } |
534 | 534 |
535 std::string Type() const { | 535 std::string Type() const; |
536 std::string ret; | |
537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | |
538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
539 return ""; | |
540 } | |
541 | |
542 /** (Required; must be an indirect reference) An outline item dictionary represe
nt- | 536 /** (Required; must be an indirect reference) An outline item dictionary represe
nt- |
543 * ing the first top-level item in the outline. | 537 * ing the first top-level item in the outline. |
544 **/ | 538 **/ |
545 bool has_First() const { | 539 bool has_First() const { |
546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "First
", "", NULL)); | 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "First
", "", NULL)); |
547 } | 541 } |
548 | 542 |
549 SkPdfDictionary* First() const { | 543 SkPdfDictionary* First() const; |
550 SkPdfDictionary* ret; | |
551 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "First
", "", &ret)) return ret; | |
552 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
553 return NULL; | |
554 } | |
555 | |
556 /** (Required; must be an indirect reference) An outline item dictionary represe
nt- | 544 /** (Required; must be an indirect reference) An outline item dictionary represe
nt- |
557 * ing the last top-level item in the outline. | 545 * ing the last top-level item in the outline. |
558 **/ | 546 **/ |
559 bool has_Last() const { | 547 bool has_Last() const { |
560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Last"
, "", NULL)); | 548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Last"
, "", NULL)); |
561 } | 549 } |
562 | 550 |
563 SkPdfDictionary* Last() const { | 551 SkPdfDictionary* Last() const; |
564 SkPdfDictionary* ret; | |
565 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Last"
, "", &ret)) return ret; | |
566 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
567 return NULL; | |
568 } | |
569 | |
570 /** (Required if the document has any open outline entries) The total number of | 552 /** (Required if the document has any open outline entries) The total number of |
571 * open items at all levels of the outline. This entry should be omitted if the
re | 553 * open items at all levels of the outline. This entry should be omitted if the
re |
572 * are no open outline items. | 554 * are no open outline items. |
573 **/ | 555 **/ |
574 bool has_Count() const { | 556 bool has_Count() const { |
575 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count
", "", NULL)); | 557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count
", "", NULL)); |
576 } | 558 } |
577 | 559 |
578 long Count() const { | 560 long Count() const; |
579 long ret; | |
580 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count", "",
&ret)) return ret; | |
581 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
582 return 0; | |
583 } | |
584 | |
585 }; | 561 }; |
586 | 562 |
587 #endif // __DEFINED__SkPdfOutlineDictionary | 563 #endif // __DEFINED__SkPdfOutlineDictionary |
OLD | NEW |