]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormInset.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / FormInset.C
1 /**
2  * \file FormInset.C
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 FORMS_H_LOCATION
14
15 #ifdef __GNUG__
16 #pragma implementation
17 #endif
18
19 #include "FormInset.h"
20
21 #include "frontends/Dialogs.h"
22
23 #include <boost/bind.hpp>
24
25 FormInset::FormInset(LyXView & lv, Dialogs & d, string const & t)
26         : FormBaseBD(lv, d, t)
27 {}
28
29
30 void FormInset::connect()
31 {
32         u_ = d_.updateBufferDependent.
33                 connect(boost::bind(&FormInset::updateSlot, this, _1));
34         h_ = d_.hideBufferDependent.
35                 connect(boost::bind(&FormInset::hide, this));
36         FormBaseDeprecated::connect();
37 }
38
39
40 void FormInset::disconnect()
41 {
42         ih_.disconnect();
43         FormBaseBD::disconnect();
44 }
45
46
47 void FormInset::updateSlot(bool switched)
48 {
49         if (switched)
50                 hide();
51         else
52                 update();
53 }