3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Martin Vermeer
8 * Full author contact details are available in file CREDITS
15 #include "ControlNote.h"
17 #include "forms/form_note.h"
18 #include "xforms_helpers.h" // formatted
19 #include "lyx_forms.h"
20 #include "insets/insetnote.h"
23 typedef FormController<ControlNote, FormView<FD_note> > base_class;
25 FormNote::FormNote(Dialog & parent)
26 : base_class(parent, _("Note"))
30 void FormNote::build()
32 dialog_.reset(build_note(this));
34 fl_addto_choice(dialog_->choice_type, predefineds().c_str());
36 bcview().setOK(dialog_->button_ok);
37 bcview().setApply(dialog_->button_apply);
38 bcview().setCancel(dialog_->button_cancel);
42 void FormNote::update()
44 string type(controller().params().type);
45 fl_set_choice_text(dialog_->choice_type, type.c_str());
49 void FormNote::apply()
51 controller().params().type = fl_get_choice_text(dialog_->choice_type);