OLD | NEW |
1 #ifndef __DEFINED__SkPdfFreeTextAnnotationDictionary | 1 #ifndef __DEFINED__SkPdfFreeTextAnnotationDictionary |
2 #define __DEFINED__SkPdfFreeTextAnnotationDictionary | 2 #define __DEFINED__SkPdfFreeTextAnnotationDictionary |
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 free text annotation | 9 // Additional entries specific to a free text annotation |
10 class SkPdfFreeTextAnnotationDictionary : public SkPdfDictionary { | 10 class SkPdfFreeTextAnnotationDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfFreeTextAnnotationDictionary& operator=(const SkPdfFreeTextAnnotationDict
ionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodo
foObj; return *this;} | 526 SkPdfFreeTextAnnotationDictionary& operator=(const SkPdfFreeTextAnnotationDict
ionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodo
foObj; return *this;} |
527 | 527 |
528 /** (Required) The type of annotation that this dictionary describes; must be | 528 /** (Required) The type of annotation that this dictionary describes; must be |
529 * FreeText for a free text annotation. | 529 * FreeText for a free text annotation. |
530 **/ | 530 **/ |
531 bool has_Subtype() const { | 531 bool has_Subtype() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); |
533 } | 533 } |
534 | 534 |
535 std::string Subtype() const { | 535 std::string Subtype() const; |
536 std::string ret; | |
537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "
", &ret)) return ret; | |
538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
539 return ""; | |
540 } | |
541 | |
542 /** (Required) The text to be displayed. | 536 /** (Required) The text to be displayed. |
543 **/ | 537 **/ |
544 bool has_Contents() const { | 538 bool has_Contents() const { |
545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); | 539 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); |
546 } | 540 } |
547 | 541 |
548 std::string Contents() const { | 542 std::string Contents() const; |
549 std::string ret; | |
550 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents"
, "", &ret)) return ret; | |
551 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
552 return ""; | |
553 } | |
554 | |
555 /** (Required) The default appearance string to be used in formatting the text (
see | 543 /** (Required) The default appearance string to be used in formatting the text (
see |
556 * "Variable Text" on page 533). | 544 * "Variable Text" on page 533). |
557 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r the DA | 545 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r the DA |
558 * entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance Streams." | 546 * entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance Streams." |
559 **/ | 547 **/ |
560 bool has_DA() const { | 548 bool has_DA() const { |
561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA",
"", NULL)); | 549 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA",
"", NULL)); |
562 } | 550 } |
563 | 551 |
564 std::string DA() const { | 552 std::string DA() const; |
565 std::string ret; | |
566 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "",
&ret)) return ret; | |
567 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
568 return ""; | |
569 } | |
570 | |
571 /** (Optional; PDF 1.4) A code specifying the form of quadding (justification) t
o be | 553 /** (Optional; PDF 1.4) A code specifying the form of quadding (justification) t
o be |
572 * used in displaying the annotation's text: | 554 * used in displaying the annotation's text: |
573 * 0 Left-justified | 555 * 0 Left-justified |
574 * 1 Centered | 556 * 1 Centered |
575 * 2 Right-justified | 557 * 2 Right-justified |
576 * Default value: 0 (left-justified). | 558 * Default value: 0 (left-justified). |
577 **/ | 559 **/ |
578 bool has_Q() const { | 560 bool has_Q() const { |
579 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "
", NULL)); | 561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "
", NULL)); |
580 } | 562 } |
581 | 563 |
582 long Q() const { | 564 long Q() const; |
583 long ret; | |
584 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", &re
t)) return ret; | |
585 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
586 return 0; | |
587 } | |
588 | |
589 }; | 565 }; |
590 | 566 |
591 #endif // __DEFINED__SkPdfFreeTextAnnotationDictionary | 567 #endif // __DEFINED__SkPdfFreeTextAnnotationDictionary |
OLD | NEW |