OLD | NEW |
1 #ifndef __DEFINED__SkPdfViewerPreferencesDictionary | 1 #ifndef __DEFINED__SkPdfViewerPreferencesDictionary |
2 #define __DEFINED__SkPdfViewerPreferencesDictionary | 2 #define __DEFINED__SkPdfViewerPreferencesDictionary |
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 a viewer preferences dictionary | 9 // Entries in a viewer preferences dictionary |
10 class SkPdfViewerPreferencesDictionary : public SkPdfDictionary { | 10 class SkPdfViewerPreferencesDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfViewerPreferencesDictionary& operator=(const SkPdfViewerPreferencesDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} | 526 SkPdfViewerPreferencesDictionary& operator=(const SkPdfViewerPreferencesDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} |
527 | 527 |
528 /** (Optional) A flag specifying whether to hide the viewer application's tool | 528 /** (Optional) A flag specifying whether to hide the viewer application's tool |
529 * bars when the document is active. Default value: false. | 529 * bars when the document is active. Default value: false. |
530 **/ | 530 **/ |
531 bool has_HideToolbar() const { | 531 bool has_HideToolbar() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideT
oolbar", "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideT
oolbar", "", NULL)); |
533 } | 533 } |
534 | 534 |
535 bool HideToolbar() const { | 535 bool HideToolbar() const; |
536 bool ret; | |
537 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideToolbar
", "", &ret)) return ret; | |
538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
539 return false; | |
540 } | |
541 | |
542 /** (Optional) A flag specifying whether to hide the viewer application's | 536 /** (Optional) A flag specifying whether to hide the viewer application's |
543 * menu bar when the document is active. Default value: false. | 537 * menu bar when the document is active. Default value: false. |
544 **/ | 538 **/ |
545 bool has_HideMenubar() const { | 539 bool has_HideMenubar() const { |
546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideM
enubar", "", NULL)); | 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideM
enubar", "", NULL)); |
547 } | 541 } |
548 | 542 |
549 bool HideMenubar() const { | 543 bool HideMenubar() const; |
550 bool ret; | |
551 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideMenubar
", "", &ret)) return ret; | |
552 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
553 return false; | |
554 } | |
555 | |
556 /** (Optional) A flag specifying whether to hide user interface elements in | 544 /** (Optional) A flag specifying whether to hide user interface elements in |
557 * the document's window (such as scroll bars and navigation controls), | 545 * the document's window (such as scroll bars and navigation controls), |
558 * leaving only the document's contents displayed. Default value: false. | 546 * leaving only the document's contents displayed. Default value: false. |
559 **/ | 547 **/ |
560 bool has_HideWindowUI() const { | 548 bool has_HideWindowUI() const { |
561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideW
indowUI", "", NULL)); | 549 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideW
indowUI", "", NULL)); |
562 } | 550 } |
563 | 551 |
564 bool HideWindowUI() const { | 552 bool HideWindowUI() const; |
565 bool ret; | |
566 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideWindowU
I", "", &ret)) return ret; | |
567 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
568 return false; | |
569 } | |
570 | |
571 /** (Optional) A flag specifying whether to resize the document's window to | 553 /** (Optional) A flag specifying whether to resize the document's window to |
572 * fit the size of the first displayed page. Default value: false. | 554 * fit the size of the first displayed page. Default value: false. |
573 **/ | 555 **/ |
574 bool has_FitWindow() const { | 556 bool has_FitWindow() const { |
575 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FitWi
ndow", "", NULL)); | 557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FitWi
ndow", "", NULL)); |
576 } | 558 } |
577 | 559 |
578 bool FitWindow() const { | 560 bool FitWindow() const; |
579 bool ret; | |
580 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FitWindow",
"", &ret)) return ret; | |
581 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
582 return false; | |
583 } | |
584 | |
585 /** (Optional) A flag specifying whether to position the document's window | 561 /** (Optional) A flag specifying whether to position the document's window |
586 * in the center of the screen. Default value: false. | 562 * in the center of the screen. Default value: false. |
587 **/ | 563 **/ |
588 bool has_CenterWindow() const { | 564 bool has_CenterWindow() const { |
589 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Cente
rWindow", "", NULL)); | 565 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Cente
rWindow", "", NULL)); |
590 } | 566 } |
591 | 567 |
592 bool CenterWindow() const { | 568 bool CenterWindow() const; |
593 bool ret; | |
594 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CenterWindo
w", "", &ret)) return ret; | |
595 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
596 return false; | |
597 } | |
598 | |
599 /** (Optional; PDF 1.4) A flag specifying whether the window's title bar | 569 /** (Optional; PDF 1.4) A flag specifying whether the window's title bar |
600 * should display the document title taken from the Title entry of the docu- | 570 * should display the document title taken from the Title entry of the docu- |
601 * ment information dictionary (see Section 9.2.1, "Document Informa- | 571 * ment information dictionary (see Section 9.2.1, "Document Informa- |
602 * tion Dictionary"). If false, the title bar should instead display the name | 572 * tion Dictionary"). If false, the title bar should instead display the name |
603 * of the PDF file containing the document. Default value: false. | 573 * of the PDF file containing the document. Default value: false. |
604 **/ | 574 **/ |
605 bool has_DisplayDocTitle() const { | 575 bool has_DisplayDocTitle() const { |
606 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Displ
ayDocTitle", "", NULL)); | 576 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Displ
ayDocTitle", "", NULL)); |
607 } | 577 } |
608 | 578 |
609 bool DisplayDocTitle() const { | 579 bool DisplayDocTitle() const; |
610 bool ret; | |
611 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DisplayDocT
itle", "", &ret)) return ret; | |
612 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
613 return false; | |
614 } | |
615 | |
616 /** (Optional) The document's page mode, specifying how to display the | 580 /** (Optional) The document's page mode, specifying how to display the |
617 * document on exiting full-screen mode: | 581 * document on exiting full-screen mode: |
618 * UseNone Neither document outline nor thumbnail images | 582 * UseNone Neither document outline nor thumbnail images |
619 * visible | 583 * visible |
620 * UseOutlines Document outline visible | 584 * UseOutlines Document outline visible |
621 * UseThumbs Thumbnail images visible | 585 * UseThumbs Thumbnail images visible |
622 * This entry is meaningful only if the value of the PageMode entry in the | 586 * This entry is meaningful only if the value of the PageMode entry in the |
623 * catalog dictionary (see Section 3.6.1, "Document Catalog") is FullScreen; | 587 * catalog dictionary (see Section 3.6.1, "Document Catalog") is FullScreen; |
624 * it is ignored otherwise. Default value: UseNone. | 588 * it is ignored otherwise. Default value: UseNone. |
625 **/ | 589 **/ |
626 bool has_NonFullScreenPageMode() const { | 590 bool has_NonFullScreenPageMode() const { |
627 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NonFu
llScreenPageMode", "", NULL)); | 591 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NonFu
llScreenPageMode", "", NULL)); |
628 } | 592 } |
629 | 593 |
630 std::string NonFullScreenPageMode() const { | 594 std::string NonFullScreenPageMode() const; |
631 std::string ret; | |
632 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NonFullScre
enPageMode", "", &ret)) return ret; | |
633 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
634 return ""; | |
635 } | |
636 | |
637 /** (Optional; PDF 1.3) The predominant reading order for text: | 595 /** (Optional; PDF 1.3) The predominant reading order for text: |
638 * L2R Left to right | 596 * L2R Left to right |
639 * R2L Right to left (including vertical writing systems | 597 * R2L Right to left (including vertical writing systems |
640 * such as Chinese, Japanese, and Korean) | 598 * such as Chinese, Japanese, and Korean) |
641 * This entry has no direct effect on the document's contents or page num- | 599 * This entry has no direct effect on the document's contents or page num- |
642 * bering, but can be used to determine the relative positioning of pages | 600 * bering, but can be used to determine the relative positioning of pages |
643 * when displayed side by side or printed n-up. Default value: L2R. | 601 * when displayed side by side or printed n-up. Default value: L2R. |
644 **/ | 602 **/ |
645 bool has_Direction() const { | 603 bool has_Direction() const { |
646 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Direc
tion", "", NULL)); | 604 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Direc
tion", "", NULL)); |
647 } | 605 } |
648 | 606 |
649 std::string Direction() const { | 607 std::string Direction() const; |
650 std::string ret; | |
651 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Direction",
"", &ret)) return ret; | |
652 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
653 return ""; | |
654 } | |
655 | |
656 /** (Optional; PDF 1.4) The name of the page boundary representing the | 608 /** (Optional; PDF 1.4) The name of the page boundary representing the |
657 * area of a page to be displayed when viewing the document on the screen. | 609 * area of a page to be displayed when viewing the document on the screen. |
658 * The value is the key designating the relevant page boundary in the page | 610 * The value is the key designating the relevant page boundary in the page |
659 * object (see "Page Objects" on page 87 and Section 9.10.1, "Page Bound- | 611 * object (see "Page Objects" on page 87 and Section 9.10.1, "Page Bound- |
660 * aries"). If the specified page boundary is not defined in the page object, | 612 * aries"). If the specified page boundary is not defined in the page object, |
661 * its default value will be used, as specified in Table 3.18 on page 88. | 613 * its default value will be used, as specified in Table 3.18 on page 88. |
662 * Default value: CropBox. | 614 * Default value: CropBox. |
663 * Note: This entry is intended primarily for use by prepress applications that | 615 * Note: This entry is intended primarily for use by prepress applications that |
664 * interpret or manipulate the page boundaries as described in Section 9.10.1, | 616 * interpret or manipulate the page boundaries as described in Section 9.10.1, |
665 * "Page Boundaries." Most PDF consumer applications will disregard it. | 617 * "Page Boundaries." Most PDF consumer applications will disregard it. |
666 **/ | 618 **/ |
667 bool has_ViewArea() const { | 619 bool has_ViewArea() const { |
668 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewA
rea", "", NULL)); | 620 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewA
rea", "", NULL)); |
669 } | 621 } |
670 | 622 |
671 std::string ViewArea() const { | 623 std::string ViewArea() const; |
672 std::string ret; | |
673 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewArea",
"", &ret)) return ret; | |
674 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
675 return ""; | |
676 } | |
677 | |
678 /** (Optional; PDF 1.4) The name of the page boundary to which the con- | 624 /** (Optional; PDF 1.4) The name of the page boundary to which the con- |
679 * tents of a page are to be clipped when viewing the document on the | 625 * tents of a page are to be clipped when viewing the document on the |
680 * screen. The value is the key designating the relevant page boundary in | 626 * screen. The value is the key designating the relevant page boundary in |
681 * the page object (see "Page Objects" on page 87 and Section 9.10.1, "Page | 627 * the page object (see "Page Objects" on page 87 and Section 9.10.1, "Page |
682 * Boundaries"). If the specified page boundary is not defined in the page | 628 * Boundaries"). If the specified page boundary is not defined in the page |
683 * object, its default value will be used, as specified in Table 3.18 on page | 629 * object, its default value will be used, as specified in Table 3.18 on page |
684 * 88. Default value: CropBox. | 630 * 88. Default value: CropBox. |
685 * Note: This entry is intended primarily for use by prepress applications that | 631 * Note: This entry is intended primarily for use by prepress applications that |
686 * interpret or manipulate the page boundaries as described in Section 9.10.1, | 632 * interpret or manipulate the page boundaries as described in Section 9.10.1, |
687 * "Page Boundaries." Most PDF consumer applications will disregard it. | 633 * "Page Boundaries." Most PDF consumer applications will disregard it. |
688 **/ | 634 **/ |
689 bool has_ViewClip() const { | 635 bool has_ViewClip() const { |
690 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewC
lip", "", NULL)); | 636 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewC
lip", "", NULL)); |
691 } | 637 } |
692 | 638 |
693 std::string ViewClip() const { | 639 std::string ViewClip() const; |
694 std::string ret; | |
695 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewClip",
"", &ret)) return ret; | |
696 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
697 return ""; | |
698 } | |
699 | |
700 /** (Optional; PDF 1.4) The name of the page boundary representing the | 640 /** (Optional; PDF 1.4) The name of the page boundary representing the |
701 * area of a page to be rendered when printing the document. The value is | 641 * area of a page to be rendered when printing the document. The value is |
702 * the key designating the relevant page boundary in the page object (see | 642 * the key designating the relevant page boundary in the page object (see |
703 * "Page Objects" on page 87 and Section 9.10.1, "Page Boundaries"). If the | 643 * "Page Objects" on page 87 and Section 9.10.1, "Page Boundaries"). If the |
704 * specified page boundary is not defined in the page object, its default value | 644 * specified page boundary is not defined in the page object, its default value |
705 * will be used, as specified in Table 3.18 on page 88. Default value: CropBox. | 645 * will be used, as specified in Table 3.18 on page 88. Default value: CropBox. |
706 * Note: This entry is intended primarily for use by prepress applications that | 646 * Note: This entry is intended primarily for use by prepress applications that |
707 * interpret or manipulate the page boundaries as described in Section 9.10.1, | 647 * interpret or manipulate the page boundaries as described in Section 9.10.1, |
708 * "Page Boundaries." Most PDF consumer applications will disregard it. | 648 * "Page Boundaries." Most PDF consumer applications will disregard it. |
709 **/ | 649 **/ |
710 bool has_PrintArea() const { | 650 bool has_PrintArea() const { |
711 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Print
Area", "", NULL)); | 651 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Print
Area", "", NULL)); |
712 } | 652 } |
713 | 653 |
714 std::string PrintArea() const { | 654 std::string PrintArea() const; |
715 std::string ret; | |
716 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PrintArea",
"", &ret)) return ret; | |
717 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
718 return ""; | |
719 } | |
720 | |
721 /** (Optional; PDF 1.4) The name of the page boundary to which the con- | 655 /** (Optional; PDF 1.4) The name of the page boundary to which the con- |
722 * tents of a page are to be clipped when printing the document. The value | 656 * tents of a page are to be clipped when printing the document. The value |
723 * is the key designating the relevant page boundary in the page object (see | 657 * is the key designating the relevant page boundary in the page object (see |
724 * "Page Objects" on page 87 and Section 9.10.1, "Page Boundaries"). If the | 658 * "Page Objects" on page 87 and Section 9.10.1, "Page Boundaries"). If the |
725 * specified page boundary is not defined in the page object, its default value | 659 * specified page boundary is not defined in the page object, its default value |
726 * will be used, as specified in Table 3.18 on page 88. Default value: CropBox. | 660 * will be used, as specified in Table 3.18 on page 88. Default value: CropBox. |
727 * Note: This entry is intended primarily for use by prepress applications that | 661 * Note: This entry is intended primarily for use by prepress applications that |
728 * interpret or manipulate the page boundaries as described in Section 9.10.1, | 662 * interpret or manipulate the page boundaries as described in Section 9.10.1, |
729 * "Page Boundaries." Most PDF consumer applications will disregard it. | 663 * "Page Boundaries." Most PDF consumer applications will disregard it. |
730 **/ | 664 **/ |
731 bool has_PrintClip() const { | 665 bool has_PrintClip() const { |
732 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Print
Clip", "", NULL)); | 666 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Print
Clip", "", NULL)); |
733 } | 667 } |
734 | 668 |
735 std::string PrintClip() const { | 669 std::string PrintClip() const; |
736 std::string ret; | |
737 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PrintClip",
"", &ret)) return ret; | |
738 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
739 return ""; | |
740 } | |
741 | |
742 }; | 670 }; |
743 | 671 |
744 #endif // __DEFINED__SkPdfViewerPreferencesDictionary | 672 #endif // __DEFINED__SkPdfViewerPreferencesDictionary |
OLD | NEW |