4 * Copyright 2001 The LyX Team.
5 * See the file COPYING.
7 * \author Edwin Leuven, leuven@fee.uva.nl
13 #pragma implementation
17 #include "ButtonControllerBase.h"
18 #include "ControlPreamble.h"
27 ControlPreamble::ControlPreamble(LyXView & lv, Dialogs & d)
28 : ControlDialog<ControlConnectBD>(lv, d),
31 d_.showPreamble.connect(SigC::slot(this, &ControlPreamble::show));
35 void ControlPreamble::apply()
37 if (!lv_.view()->available())
42 lv_.buffer()->params.preamble = params();
43 lv_.buffer()->markDirty();
44 Liason::setMinibuffer(&lv_, _("LaTeX preamble set"));
48 string & ControlPreamble::params() const
55 void ControlPreamble::setParams()
57 if (params_) delete params_;
58 params_ = new string(lv_.buffer()->params.preamble);
62 void ControlPreamble::clearParams()