/**
- * \file xforms/FormERT.C
+ * \file FormERT.C
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Jürgen Vigna
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
#include <config.h>
-
-#include "xformsBC.h"
-#include "ControlERT.h"
#include "FormERT.h"
+#include "ControlERT.h"
#include "forms/form_ert.h"
-#include "support/lstrings.h"
-#include "helper_funcs.h"
-#include "debug.h"
-#include FORMS_H_LOCATION
-typedef FormCB<ControlERT, FormDB<FD_ert> > base_class;
+#include "xformsBC.h"
+
+#include "lyx_forms.h"
+
+
+typedef FormController<ControlERT, FormView<FD_ert> > base_class;
-FormERT::FormERT()
- : base_class(_("ERT Options"))
+FormERT::FormERT(Dialog & parent)
+ : base_class(parent, _("TeX Settings"))
{}
dialog_.reset(build_ert(this));
// Manage the ok, apply and cancel/close buttons
- bc().setOK(dialog_->button_ok);
- bc().setApply(dialog_->button_apply);
- bc().setCancel(dialog_->button_close);
+ bcview().setOK(dialog_->button_ok);
+ bcview().setApply(dialog_->button_apply);
+ bcview().setCancel(dialog_->button_close);
- bc().addReadOnly(dialog_->radio_open);
- bc().addReadOnly(dialog_->radio_collapsed);
- bc().addReadOnly(dialog_->radio_inlined);
+ bcview().addReadOnly(dialog_->radio_open);
+ bcview().addReadOnly(dialog_->radio_collapsed);
+ bcview().addReadOnly(dialog_->radio_inlined);
}
void FormERT::apply()
{
if (fl_get_button(dialog_->radio_open))
- controller().params().status = InsetERT::Open;
+ controller().setStatus(InsetERT::Open);
else if (fl_get_button(dialog_->radio_collapsed))
- controller().params().status = InsetERT::Collapsed;
+ controller().setStatus(InsetERT::Collapsed);
else
- controller().params().status = InsetERT::Inlined;
+ controller().setStatus(InsetERT::Inlined);
}
void FormERT::update()
{
- switch (controller().params().status) {
+ switch (controller().status()) {
case InsetERT::Open:
fl_set_button(dialog_->radio_open, 1);
break;