3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 // Too hard to make concept checks work with this file
14 #ifdef _GLIBCXX_CONCEPT_CHECKS
15 #undef _GLIBCXX_CONCEPT_CHECKS
17 #ifdef _GLIBCPP_CONCEPT_CHECKS
18 #undef _GLIBCPP_CONCEPT_CHECKS
22 #include "ControlERT.h"
25 #include <libglademm.h>
32 GERT::GERT(Dialog & parent)
33 : GViewCB<ControlERT, GViewGladeB>(parent, _("TeX Settings"), false)
39 string const gladeName = findGladeFile("ERT");
40 xml_ = Gnome::Glade::Xml::create(gladeName);
42 Gtk::Button * cancelbutton;
43 xml_->get_widget("Close", cancelbutton);
44 setCancel(cancelbutton);
46 xml_->get_widget("Inline", inlineradio_);
47 xml_->get_widget("Open", openradio_);
48 xml_->get_widget("Collapsed", collapsedradio_);
50 inlineradio_->signal_toggled().connect(
51 sigc::mem_fun(*this, &GERT::apply));
52 openradio_->signal_toggled().connect(
53 sigc::mem_fun(*this, &GERT::apply));
54 collapsedradio_->signal_toggled().connect(
55 sigc::mem_fun(*this, &GERT::apply));
57 bcview().addReadOnly(inlineradio_);
58 bcview().addReadOnly(openradio_);
59 bcview().addReadOnly(collapsedradio_);
67 bc().refreshReadOnly();
69 switch (controller().status()) {
71 openradio_->set_active(true);
73 case InsetERT::Collapsed:
74 collapsedradio_->set_active(true);
76 case InsetERT::Inlined:
77 inlineradio_->set_active(true);
90 if (openradio_->get_active())
91 controller().setStatus(InsetERT::Open);
92 else if (collapsedradio_->get_active())
93 controller().setStatus(InsetERT::Collapsed);
95 controller().setStatus(InsetERT::Inlined);
97 controller().dispatchParams();
100 } // namespace frontend