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