4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS
18 /** Used for error messages from LaTeX runs.
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 {
27 InsetError(string const &);
30 //InsetError(string const &, bool same_id);
34 virtual dispatch_result localDispatch(FuncRequest const & cmd);
36 void dimension(BufferView *, LyXFont const &, Dimension &) const;
38 void draw(BufferView *, LyXFont const &, int, float &) const;
40 void write(Buffer const *, std::ostream &) const {}
42 void read(Buffer const *, LyXLex &) {}
44 int latex(Buffer const *, std::ostream &,
45 LatexRunParams const &) const { return 0; }
47 int ascii(Buffer const *, std::ostream &, int) const { return 0; }
49 int linuxdoc(Buffer const *, std::ostream &) const { return 0; }
51 int docbook(Buffer const *, std::ostream &, bool) const { return 0; }
53 bool autoDelete() const { return true; }
54 /// what appears in the minibuffer when opening
55 string const editMessage() const;
57 EDITABLE editable() const { return IS_EDITABLE; }
59 Inset * clone(Buffer const &) const {
60 return new InsetError(contents);
63 //Inset * clone(Buffer const &, bool same_id) const {
64 // return new InsetError(contents, same_id);
67 Inset::Code lyxCode() const { return Inset::ERROR_CODE; }
68 /// We don't want "begin" and "end inset" in lyx-file
69 bool directWrite() const { return true; };
71 string const & getContents() const { return contents; }