]> git.lyx.org Git - lyx.git/blob - src/insets/insetlatex.h
4950d09dbad5a03dfc771537aa6db491a295cc15
[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         InsetLatex(string const & string);
33         ///
34         ~InsetLatex();
35         ///
36         int Ascent(LyXFont const &font) const;
37         ///
38         int Descent(LyXFont const &font) const;
39         ///
40         int Width(LyXFont const &font) const;
41         ///
42         void Draw(LyXFont font, LyXScreen &scr, int baseline, float &x);
43         ///
44         void Write(FILE *file);
45         ///
46         void Read(LyXLex &lex);
47         ///
48         int Latex(FILE *file, signed char fragile);
49         ///
50         int Latex(string &file, signed char fragile);
51         ///
52         int Linuxdoc(string &file);
53         ///
54         int DocBook(string &file);
55         ///
56         bool Deletable() const;
57         ///
58         Inset* Clone();
59         ///
60         Inset::Code LyxCode() const;
61 private:
62         ///
63         string contents;
64 };
65
66 #endif