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"
19 #include "lyx_forms.h"
20 #include "insets/insetnote.h"
28 typedef FormController<ControlNote, FormView<FD_note> > base_class;
30 FormNote::FormNote(Dialog & parent)
31 : base_class(parent, _("Note"))
35 void FormNote::build()
37 dialog_.reset(build_note(this));
39 note_gui_tokens(ids_, gui_names_);
41 for (int i = 0; i < 3; ++i) {
44 for (int i = 0; i < 3; ++i) {
45 fl_addto_choice(dialog_->choice_type, gui_names_[i].c_str());
48 string str = _("Lyx Note: LyX internal only\n"
49 "Comment: Export to LaTeX but don't print\n"
50 "Greyed Out: Print as grey text");
51 tooltips().init(dialog_->choice_type, str);
53 bcview().setOK(dialog_->button_ok);
54 bcview().setApply(dialog_->button_apply);
55 bcview().setCancel(dialog_->button_cancel);
59 void FormNote::update()
61 string type(controller().params().type);
62 for (int i = 0; i < 3; ++i) {
64 fl_set_choice_text(dialog_->choice_type, gui_names_[i].c_str());
69 void FormNote::apply()
71 int i = fl_get_choice(dialog_->choice_type);
72 controller().params().type = ids_[i - 1];