summaryrefslogtreecommitdiffstats
path: root/kviewshell/renderedDocumentPagePrinter.h
blob: f0b78f911a74c65e0a9d37ce78783b71ecd74155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// -*- C++ -*-
//
// Class: RenderedDocumentPagePrinter
//
// Widget for displaying TeX DVI files.
// Part of KDVI- A previewer for TeX DVI files.
//
// (C) 2005 Stefan Kebekus. Distributed under the GPL.


#ifndef _rendereddocumentpageprinter_h_
#define _rendereddocumentpageprinter_h_

#include "renderedDocumentPage.h"
#include <tqpainter.h>

class KPrinter;


class RenderedDocumentPagePrinter: public RenderedDocumentPage
{
public:
  RenderedDocumentPagePrinter(KPrinter *kp);

  virtual ~RenderedDocumentPagePrinter() { delete printerPainter; }

  /** Returns a pointer to the paintDevice, in this implementation
      either a TQPrinter. The pointer returned is valid as long as
      *this RenderedDocumentPage exists. This method is used by the
      renderer to draw on the page. */
  virtual TQPainter *getPainter() { return printerPainter; }

  virtual TQSize size();

  /** This method does nothing. In particular, it does NOT delete the
      TQPainter. The TQPainter is deleted automatically when this
      RenderedDocumentPagePrinter is destructed. */
  virtual void returnPainter(TQPainter *) {;}

private:
  KPrinter *printer;
  TQPainter *printerPainter;
};


#endif