]> git.lyx.org Git - lyx.git/blob - src/insets/inseterror.h
Rename LatexRunParams::fragile as moving_arg.
[lyx.git] / src / insets / inseterror.h
1 // -*- C++ -*-
2 /**
3  * \file inseterror.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef INSET_ERROR_H
13 #define INSET_ERROR_H
14
15 #include "inset.h"
16 #include "LString.h"
17
18 /** Used for error messages from LaTeX runs.
19
20   The edit-operation opens a
21   dialog with the text of the error-message. The inset is displayed as
22   "Error" in a box, and automatically deleted. */
23 class InsetError : public Inset {
24 public:
25         ///
26         explicit
27         InsetError(string const &, bool same_id = false);
28         ///
29         ~InsetError();
30         ///
31         virtual dispatch_result localDispatch(FuncRequest const & cmd);
32         ///
33         void dimension(BufferView *, LyXFont const &, Dimension &) const;
34         ///
35         void draw(BufferView *, LyXFont const &, int, float &) const;
36         ///
37         void write(Buffer const *, std::ostream &) const {}
38         ///
39         void read(Buffer const *, LyXLex &) {}
40         ///
41         int latex(Buffer const *, std::ostream &,
42                   LatexRunParams const &) const { return 0; }
43         ///
44         int ascii(Buffer const *, std::ostream &, int) const { return 0; }
45         ///
46         int linuxdoc(Buffer const *, std::ostream &) const { return 0; }
47         ///
48         int docbook(Buffer const *, std::ostream &, bool) const { return 0; }
49         ///
50         bool autoDelete() const { return true; }
51         /// what appears in the minibuffer when opening
52         string const editMessage() const;
53         ///
54         EDITABLE editable() const { return IS_EDITABLE; }
55         ///
56         Inset * clone(Buffer const &, bool same_id = false) const {
57                 return new InsetError(contents, same_id);
58         }
59         ///
60         Inset::Code lyxCode() const { return Inset::ERROR_CODE; }
61         /// We don't want "begin" and "end inset" in lyx-file
62         bool directWrite() const { return true; };
63         ///
64         string const & getContents() const { return contents; }
65 private:
66         ///
67         string contents;
68 };
69 #endif