X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=pdf%2Fxpdf%2FPage.h;h=8b339eb49a7719600ce48e1dd3bda2ece7703b2e;hb=d57c02ebc09bfd1a0cac44140ec7a80dbe43877e;hp=7207b20687cad1e3e874e84695f2043afbf72875;hpb=2a393c134fe3fe8eb85bf818cb7ad6ae4396322a;p=evince.git diff --git a/pdf/xpdf/Page.h b/pdf/xpdf/Page.h index 7207b206..8b339eb4 100644 --- a/pdf/xpdf/Page.h +++ b/pdf/xpdf/Page.h @@ -2,14 +2,16 @@ // // Page.h // -// Copyright 1996-2002 Glyph & Cog, LLC +// Copyright 1996-2003 Glyph & Cog, LLC // //======================================================================== #ifndef PAGE_H #define PAGE_H -#ifdef __GNUC__ +#include + +#ifdef USE_GCC_PRAGMAS #pragma interface #endif @@ -20,11 +22,19 @@ class XRef; class OutputDev; class Links; class Catalog; +class Annots; +class Annot; //------------------------------------------------------------------------ -struct PDFRectangle { +class PDFRectangle { +public: double x1, y1, x2, y2; + + PDFRectangle() { x1 = y1 = x2 = y2 = 0; } + PDFRectangle(double x1A, double y1A, double x2A, double y2A) + { x1 = x1A; y1 = y1A; x2 = x2A; y2 = y2A; } + GBool isValid() { return x1 != 0 || y1 != 0 || x2 != 0 || y2 != 0; } }; //------------------------------------------------------------------------ @@ -97,8 +107,7 @@ class Page { public: // Constructor. - Page(XRef *xrefA, int numA, Dict *pageDict, PageAttrs *attrsA, - GBool printCommandsA); + Page(XRef *xrefA, int numA, Dict *pageDict, PageAttrs *attrsA); // Destructor. ~Page(); @@ -133,9 +142,25 @@ public: // Get contents. Object *getContents(Object *obj) { return contents.fetch(xref, obj); } + // Get thumb. + Object *getThumb(Object *obj) { return thumb.fetch(xref, obj); } + // Display a page. void display(OutputDev *out, double dpi, int rotate, - Links *links, Catalog *catalog); + Links *links, Catalog *catalog, + GBool (*abortCheckCbk)(void *data) = NULL, + void *abortCheckCbkData = NULL, + GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, + void *annotDisplayDecideCbkData = NULL); + + // Display part of a page. + void displaySlice(OutputDev *out, double dpi, int rotate, + int sliceX, int sliceY, int sliceW, int sliceH, + Links *links, Catalog *catalog, + GBool (*abortCheckCbk)(void *data) = NULL, + void *abortCheckCbkData = NULL, + GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, + void *annotDisplayDecideCbkData = NULL); private: @@ -144,7 +169,7 @@ private: PageAttrs *attrs; // page attributes Object annots; // annotations array Object contents; // page contents - GBool printCommands; // print the drawing commands (for debugging) + Object thumb; // page thumbnail GBool ok; // true if page is valid };