]> git.lyx.org Git - lyx.git/blob - src/mathed/TextPainter.h
make it compile again (hopefully)
[lyx.git] / src / mathed / TextPainter.h
1 // -*- C++ -*-
2 /**
3  * \file TextPainter.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef TEXTPAINTER_H
13 #define TEXTPAINTER_H
14
15
16 #include "support/docstream.h"
17
18 #include <vector>
19
20 // FIXME: Abdel 16/10/2006
21 // This TextPainter class is never used, this is dead code.
22 /* Georg explanation of current situation:
23 AFAIK the text painter was used to export math formulas as ASCII art.
24 The text painter is     like a real painter, but operating on a very coarse
25 grid of character cells where each cell can be filled with an ASCII character.
26 I don't know why it is currently disabled. I do know that we have a bugzilla
27 request for reenabling it.
28 */
29
30 class TextPainter {
31         public:
32                 ///
33                 TextPainter(int xmax, int ymax);
34                 ///
35                 void draw(int x, int y, lyx::char_type const * str);
36                 ///
37                 void draw(int x, int y, lyx::char_type c);
38                 ///
39                 void show(lyx::odocstream & os, int offset = 0) const;
40                 ///
41                 int textheight() const { return ymax_; }
42                 ///
43                 void horizontalLine(int x, int y, int len, lyx::char_type c = '-');
44                 ///
45                 void verticalLine(int x, int y, int len, lyx::char_type c = '|');
46
47         private:
48                 ///
49                 typedef std::vector<lyx::char_type> data_type;
50                 ///
51                 lyx::char_type at(int x, int y) const;
52                 ///
53                 lyx::char_type & at(int x, int y);
54
55                 /// xsize of the painter area
56                 int xmax_;
57                 /// ysize of the painter area
58                 int ymax_;
59                 /// the image
60                 data_type data_;
61 };
62
63 #endif