Change the translation of the "Help" menu item to "?", so that the menu can be displa...
[reactos.git] / rosapps / smartpdf / poppler / poppler / ArthurOutputDev.h
1 //========================================================================
2 //
3 // ArthurOutputDev.h
4 //
5 // Copyright 2003 Glyph & Cog, LLC
6 // Copyright 2004 Red Hat, INC
7 //
8 //========================================================================
9
10 #ifndef CAIROOUTPUTDEV_H
11 #define CAIROOUTPUTDEV_H
12
13 #ifdef USE_GCC_PRAGMAS
14 #pragma interface
15 #endif
16
17 #include "goo/gtypes.h"
18 #include "OutputDev.h"
19 #include "GfxState.h"
20
21 #include <QtGui/QPainter>
22
23 class GfxState;
24 class GfxPath;
25 class Gfx8BitFont;
26 struct GfxRGB;
27
28 class SplashFont;
29 class SplashFontEngine;
30 class SplashGlyphBitmap;
31
32 //------------------------------------------------------------------------
33 // ArthurOutputDev - Qt 4 QPainter renderer
34 //------------------------------------------------------------------------
35
36 class ArthurOutputDev: public OutputDev {
37 public:
38
39 // Constructor.
40 ArthurOutputDev(QPainter *painter );
41
42 // Destructor.
43 virtual ~ArthurOutputDev();
44
45 //----- get info about output device
46
47 // Does this device use upside-down coordinates?
48 // (Upside-down means (0,0) is the top left corner of the page.)
49 virtual GBool upsideDown() { return gTrue; }
50
51 // Does this device use drawChar() or drawString()?
52 virtual GBool useDrawChar() { return gTrue; }
53
54 // Does this device use beginType3Char/endType3Char? Otherwise,
55 // text in Type 3 fonts will be drawn with drawChar/drawString.
56 virtual GBool interpretType3Chars() { return gTrue; }
57
58 //----- initialization and control
59
60 // Start a page.
61 virtual void startPage(int pageNum, GfxState *state);
62
63 // End a page.
64 virtual void endPage();
65
66 //----- link borders
67 virtual void drawLink(Link *link, Catalog *catalog);
68
69 //----- save/restore graphics state
70 virtual void saveState(GfxState *state);
71 virtual void restoreState(GfxState *state);
72
73 //----- update graphics state
74 virtual void updateAll(GfxState *state);
75 virtual void updateCTM(GfxState *state, double m11, double m12,
76 double m21, double m22, double m31, double m32);
77 virtual void updateLineDash(GfxState *state);
78 virtual void updateFlatness(GfxState *state);
79 virtual void updateLineJoin(GfxState *state);
80 virtual void updateLineCap(GfxState *state);
81 virtual void updateMiterLimit(GfxState *state);
82 virtual void updateLineWidth(GfxState *state);
83 virtual void updateFillColor(GfxState *state);
84 virtual void updateStrokeColor(GfxState *state);
85 virtual void updateFillOpacity(GfxState *state);
86 virtual void updateStrokeOpacity(GfxState *state);
87
88 //----- update text state
89 virtual void updateFont(GfxState *state);
90
91 //----- path painting
92 virtual void stroke(GfxState *state);
93 virtual void fill(GfxState *state);
94 virtual void eoFill(GfxState *state);
95
96 //----- path clipping
97 virtual void clip(GfxState *state);
98 virtual void eoClip(GfxState *state);
99
100 //----- text drawing
101 // virtual void drawString(GfxState *state, GooString *s);
102 virtual void drawChar(GfxState *state, double x, double y,
103 double dx, double dy,
104 double originX, double originY,
105 CharCode code, int nBytes, Unicode *u, int uLen);
106 virtual GBool beginType3Char(GfxState *state, double x, double y,
107 double dx, double dy,
108 CharCode code, Unicode *u, int uLen);
109 virtual void endType3Char(GfxState *state);
110 virtual void endTextObject(GfxState *state);
111
112 //----- image drawing
113 virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
114 int width, int height, GBool invert,
115 GBool inlineImg);
116 virtual void drawImage(GfxState *state, Object *ref, Stream *str,
117 int width, int height, GfxImageColorMap *colorMap,
118 int *maskColors, GBool inlineImg);
119
120 //----- Type 3 font operators
121 virtual void type3D0(GfxState *state, double wx, double wy);
122 virtual void type3D1(GfxState *state, double wx, double wy,
123 double llx, double lly, double urx, double ury);
124
125 //----- special access
126
127 // Called to indicate that a new PDF document has been loaded.
128 void startDoc(XRef *xrefA);
129
130 GBool isReverseVideo() { return gFalse; }
131
132 private:
133 QPainter *m_painter;
134 QFont m_currentFont;
135 QPen m_currentPen;
136 QBrush m_currentBrush;
137 GBool m_needFontUpdate; // set when the font needs to be updated
138 QImage *m_image;
139 SplashFontEngine *m_fontEngine;
140 SplashFont *m_font; // current font
141 XRef *xref; // xref table for current document
142 };
143
144 #endif