]> git.lyx.org Git - lyx.git/blob - src/insets/MailInset.cpp
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / MailInset.cpp
1 /**
2  * \file MailInset.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Angus Leeming
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "MailInset.h"
14
15 #include "BufferView.h"
16
17 #include "frontends/Application.h"
18
19 #include "support/debug.h"
20
21 #include <boost/assert.hpp>
22
23 using namespace std;
24
25 namespace lyx {
26
27
28 void MailInset::showDialog(BufferView * bv) const
29 {
30         BOOST_ASSERT(bv);
31         bv->showDialog(name(), inset2string(bv->buffer()), &inset());
32 }
33
34
35 void MailInset::updateDialog(BufferView * bv) const
36 {
37         BOOST_ASSERT(bv);
38         bv->updateDialog(name(), inset2string(bv->buffer()));
39 }
40
41
42 void MailInset::hideDialog() const
43 {
44         if (theApp())
45                 theApp()->hideDialogs(name(), &inset());
46 }
47
48
49 void print_mailer_error(string const & class_name,
50                         string const & data, int arg_id, string const & arg)
51 {
52         LYXERR0('\n' << class_name << "::string2params(" << data << ")\n"
53                << "Expected arg " << arg_id << " to be \"" << arg << "\"\n");
54 }
55
56
57 } // namespace lyx