]> git.lyx.org Git - lyx.git/blob - src/insets/insetlatex.h
clear()->erase() ; lots of using directives for cxx
[lyx.git] / src / insets / insetlatex.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *       
7  *          Copyright (C) 1995 Matthias Ettrich
8  *
9  * ====================================================== */
10
11 #ifndef INSET_LATEX_H
12 #define INSET_LATEX_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "lyxinset.h"
19 #include "LString.h"
20
21 /** Latex. Used to insert non-deletable LaTeX-Code automatically
22
23   Behaves as LaTeXDels, but cannot be deleted with the normal
24   delete/backspace operations. This is used when you insert a LaTeX
25   figure (done as "\input "), but you still have to type the filename
26   yourself after the inset. */
27 class InsetLatex : public Inset {
28 public:
29         ///
30         InsetLatex();
31         ///
32         explicit
33         InsetLatex(string const & string);
34         ///
35         ~InsetLatex();
36         ///
37         int Ascent(LyXFont const & font) const;
38         ///
39         int Descent(LyXFont const & font) const;
40         ///
41         int Width(LyXFont const & font) const;
42         ///
43         void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
44         ///
45         void Write(FILE * file);
46         ///
47         void Read(LyXLex & lex);
48         ///
49         int Latex(FILE * file, signed char fragile, bool free_spc);
50         ///
51         int Latex(string & file, signed char fragile, bool free_spc);
52         ///
53         int Ascii(string & file) const;
54         ///
55         int Linuxdoc(string & file);
56         ///
57         int DocBook(string & file);
58         ///
59         bool Deletable() const;
60         ///
61         Inset * Clone() const;
62         ///
63         Inset::Code LyxCode() const;
64 private:
65         ///
66         string contents;
67 };
68
69 #endif