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.
14 #include "ControlNote.h"
15 #include "forms/form_note.h"
20 #include "insets/insetnote.h"
22 #include "lyx_forms.h"
25 typedef FormController<ControlNote, FormView<FD_note> > base_class;
27 FormNote::FormNote(Dialog & parent)
28 : base_class(parent, _("Note"))
32 void FormNote::build()
34 dialog_.reset(build_note(this));
36 note_gui_tokens(ids_, gui_names_);
38 for (int i = 0; i < 3; ++i) {
39 fl_addto_choice(dialog_->choice_type, gui_names_[i].c_str());
42 string str = _("Lyx Note: LyX internal only\n"
43 "Comment: Export to LaTeX but don't print\n"
44 "Greyed Out: Print as grey text");
45 tooltips().init(dialog_->choice_type, str);
47 bcview().setOK(dialog_->button_ok);
48 bcview().setApply(dialog_->button_apply);
49 bcview().setCancel(dialog_->button_cancel);
53 void FormNote::update()
55 string type(controller().params().type);
56 for (int i = 0; i < 3; ++i) {
58 fl_set_choice_text(dialog_->choice_type, gui_names_[i].c_str());
63 void FormNote::apply()
65 int i = fl_get_choice(dialog_->choice_type);
66 controller().params().type = ids_[i - 1];