3 * Copyright 2001 The LyX Team.
4 * See the file COPYING.
6 * \author Edwin Leuven, leuven@fee.uva.nl
12 #pragma implementation
16 #include "ButtonControllerBase.h"
17 #include "ControlPreamble.h"
26 ControlPreamble::ControlPreamble(LyXView & lv, Dialogs & d)
27 : ControlDialog<ControlConnectBD>(lv, d)
29 d_.showPreamble.connect(SigC::slot(this, &ControlPreamble::show));
33 void ControlPreamble::apply()
35 if (!lv_.view()->available())
40 lv_.buffer()->params.preamble = params();
41 lv_.buffer()->markDirty();
42 Liason::setMinibuffer(&lv_, _("LaTeX preamble set"));
46 string & ControlPreamble::params() const
53 void ControlPreamble::setParams()
55 if (params_) delete params_;
56 params_ = new string(lv_.buffer()->params.preamble);
60 void ControlPreamble::clearParams()