mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 21:49:51 +00:00
3beb3be67c
This patch is house-keeping only. There are no issues associated with it. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3728 a592a061-630c-0410-9148-cb99ea01b6c8
70 lines
1.4 KiB
C
70 lines
1.4 KiB
C
/**
|
|
* \file xforms/FormERT.C
|
|
* Copyright 2001 The LyX Team.
|
|
* See the file COPYING.
|
|
*
|
|
* \author Jürgen Vigna, jug@sad.it
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#ifdef __GNUG__
|
|
#pragma implementation
|
|
#endif
|
|
|
|
#include "xformsBC.h"
|
|
#include "ControlERT.h"
|
|
#include "FormERT.h"
|
|
#include "form_ert.h"
|
|
#include "support/lstrings.h"
|
|
#include "helper_funcs.h"
|
|
#include "debug.h"
|
|
|
|
typedef FormCB<ControlERT, FormDB<FD_form_ert> > base_class;
|
|
|
|
FormERT::FormERT(ControlERT & c)
|
|
: base_class(c, _("ERT Options"))
|
|
{}
|
|
|
|
|
|
void FormERT::build()
|
|
{
|
|
dialog_.reset(build_ert());
|
|
|
|
// Manage the ok, apply and cancel/close buttons
|
|
bc().setOK(dialog_->button_ok);
|
|
bc().setApply(dialog_->button_apply);
|
|
bc().setCancel(dialog_->button_close);
|
|
|
|
bc().addReadOnly(dialog_->radio_open);
|
|
bc().addReadOnly(dialog_->radio_collapsed);
|
|
bc().addReadOnly(dialog_->radio_inlined);
|
|
}
|
|
|
|
|
|
void FormERT::apply()
|
|
{
|
|
if (fl_get_button(dialog_->radio_open))
|
|
controller().params().status = InsetERT::Open;
|
|
else if (fl_get_button(dialog_->radio_collapsed))
|
|
controller().params().status = InsetERT::Collapsed;
|
|
else
|
|
controller().params().status = InsetERT::Inlined;
|
|
}
|
|
|
|
|
|
void FormERT::update()
|
|
{
|
|
switch (controller().params().status) {
|
|
case InsetERT::Open:
|
|
fl_set_button(dialog_->radio_open, 1);
|
|
break;
|
|
case InsetERT::Collapsed:
|
|
fl_set_button(dialog_->radio_collapsed, 1);
|
|
break;
|
|
case InsetERT::Inlined:
|
|
fl_set_button(dialog_->radio_inlined, 1);
|
|
break;
|
|
}
|
|
}
|