]> git.lyx.org Git - lyx.git/blob - src/insets/inseterror.h
get rid of same_id from function signatures
[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 &);
28         ///
29         //explicit
30         //InsetError(string const &, bool same_id);
31         ///
32         ~InsetError();
33         ///
34         virtual dispatch_result localDispatch(FuncRequest const & cmd);
35         ///
36         void dimension(BufferView *, LyXFont const &, Dimension &) const;
37         ///
38         void draw(BufferView *, LyXFont const &, int, float &) const;
39         ///
40         void write(Buffer const *, std::ostream &) const {}
41         ///
42         void read(Buffer const *, LyXLex &) {}
43         ///
44         int latex(Buffer const *, std::ostream &,
45                   LatexRunParams const &) const { return 0; }
46         ///
47         int ascii(Buffer const *, std::ostream &, int) const { return 0; }
48         ///
49         int linuxdoc(Buffer const *, std::ostream &) const { return 0; }
50         ///
51         int docbook(Buffer const *, std::ostream &, bool) const { return 0; }
52         ///
53         bool autoDelete() const { return true; }
54         /// what appears in the minibuffer when opening
55         string const editMessage() const;
56         ///
57         EDITABLE editable() const { return IS_EDITABLE; }
58         ///
59         Inset * clone(Buffer const &) const {
60                 return new InsetError(contents);
61         }
62         ///
63         //Inset * clone(Buffer const &, bool same_id) const {
64         //      return new InsetError(contents, same_id);
65         //}
66         ///
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; };
70         ///
71         string const & getContents() const { return contents; }
72 private:
73         ///
74         string contents;
75 };
76 #endif