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.
14 #include "ControlERT.h"
15 #include "forms/form_ert.h"
19 #include "lyx_forms.h"
24 typedef FormController<ControlERT, FormView<FD_ert> > base_class;
26 FormERT::FormERT(Dialog & parent)
27 : base_class(parent, _("TeX Settings"))
33 dialog_.reset(build_ert(this));
35 // Manage the ok, apply and cancel/close buttons
36 bcview().setOK(dialog_->button_ok);
37 bcview().setApply(dialog_->button_apply);
38 bcview().setCancel(dialog_->button_close);
40 bcview().addReadOnly(dialog_->radio_open);
41 bcview().addReadOnly(dialog_->radio_collapsed);
42 bcview().addReadOnly(dialog_->radio_inlined);
48 if (fl_get_button(dialog_->radio_open))
49 controller().setStatus(InsetERT::Open);
50 else if (fl_get_button(dialog_->radio_collapsed))
51 controller().setStatus(InsetERT::Collapsed);
53 controller().setStatus(InsetERT::Inlined);
57 void FormERT::update()
59 switch (controller().status()) {
61 fl_set_button(dialog_->radio_open, 1);
63 case InsetERT::Collapsed:
64 fl_set_button(dialog_->radio_collapsed, 1);
66 case InsetERT::Inlined:
67 fl_set_button(dialog_->radio_inlined, 1);
72 } // namespace frontend