]> www.fi.muni.cz Git - evince.git/blob - pdf/GDKSplashOutputDev.h
Hungarian translation added by "Last-Translator: \n".
[evince.git] / pdf / GDKSplashOutputDev.h
1 //========================================================================
2 //
3 // GDKSplashOutputDev.h
4 //
5 // Copyright 2003 Glyph & Cog, LLC
6 // Copyright 2004 Red Hat, Inc. (GDK port)
7 //
8 //========================================================================
9
10 #ifndef XSPLASHOUTPUTDEV_H
11 #define XSPLASHOUTPUTDEV_H
12
13 #ifdef USE_GCC_PRAGMAS
14 #pragma interface
15 #endif
16
17 #include <gdk/gdk.h>
18 #include <splash/SplashTypes.h>
19 #include <SplashOutputDev.h>
20 #include <TextOutputDev.h>
21
22 //------------------------------------------------------------------------
23
24 #define xOutMaxRGBCube 6        // max size of RGB color cube
25
26 //------------------------------------------------------------------------
27 // GDKSplashOutputDev
28 //------------------------------------------------------------------------
29
30 class GDKSplashOutputDev: public SplashOutputDev {
31 public:
32
33   GDKSplashOutputDev(GdkScreen *screen,
34                      void (*redrawCbkA)(void *data),
35                      void *redrawCbkDataA);
36   
37   virtual ~GDKSplashOutputDev();
38
39   //----- initialization and control
40
41   // Start a page.
42   virtual void startPage(int pageNum, GfxState *state);
43
44   // End a page.
45   virtual void endPage();
46
47   // Dump page contents to display.
48   virtual void dump();
49
50   //----- update text state
51   virtual void updateFont(GfxState *state);
52
53   //----- text drawing
54   virtual void drawChar(GfxState *state, double x, double y,
55                         double dx, double dy,
56                         double originX, double originY,
57                         CharCode code, Unicode *u, int uLen);
58   virtual GBool beginType3Char(GfxState *state, double x, double y,
59                                double dx, double dy,
60                                CharCode code, Unicode *u, int uLen);
61
62   //----- special access
63
64   // Clear out the document (used when displaying an empty window).
65   void clear();
66
67   // Copy the rectangle (srcX, srcY, width, height) to (destX, destY)
68   // in destDC.
69   void redraw(int srcX, int srcY,
70               GdkDrawable *drawable,
71               int destX, int destY,
72               int width, int height);
73
74   void drawToPixbuf(GdkPixbuf *pixbuf, int pageNum);
75
76   // Find a string.  If <startAtTop> is true, starts looking at the
77   // top of the page; else if <startAtLast> is true, starts looking
78   // immediately after the last find result; else starts looking at
79   // <xMin>,<yMin>.  If <stopAtBottom> is true, stops looking at the
80   // bottom of the page; else if <stopAtLast> is true, stops looking
81   // just before the last find result; else stops looking at
82   // <xMax>,<yMax>.
83   GBool findText(Unicode *s, int len,
84                  GBool startAtTop, GBool stopAtBottom,
85                  GBool startAtLast, GBool stopAtLast,
86                  int *xMin, int *yMin,
87                  int *xMax, int *yMax);
88
89   // Get the text which is inside the specified rectangle.
90   GooString *getText(int xMin, int yMin, int xMax, int yMax);
91
92 private:
93
94   int incrementalUpdate;
95   void (*redrawCbk)(void *data);
96   void *redrawCbkData;
97   TextPage *text;               // text from the current page
98 };
99
100 #endif