3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS
16 #include "FormAboutlyx.h"
18 #include "ControlAboutlyx.h"
19 #include "forms/form_aboutlyx.h"
20 #include "xforms_helpers.h"
24 #include "lyx_forms.h"
28 #if FL_VERSION == 0 || (FL_REVISION == 0 && FL_FIXLEVEL < 2)
29 bool const scalableTabfolders = false;
31 bool const scalableTabfolders = true;
37 typedef FormController<ControlAboutlyx, FormView<FD_aboutlyx> > base_class;
39 FormAboutlyx::FormAboutlyx(Dialog & parent)
40 : base_class(parent, _("About LyX"), scalableTabfolders)
44 void FormAboutlyx::build()
46 dialog_.reset(build_aboutlyx(this));
49 version_.reset(build_aboutlyx_version(this));
52 vs << controller().getVersion()
53 << '\n' << lyx_version_info;
55 fl_add_browser_line(version_->browser_version, vs.str().c_str());
58 credits_.reset(build_aboutlyx_credits(this));
61 controller().getCredits(crs);
63 fl_add_browser_line(credits_->browser_credits, crs.str().c_str());
66 license_.reset(build_aboutlyx_license(this));
67 int const width = license_->browser_license->w - 10;
70 cs << controller().getCopyright() << "\n\n"
71 << formatted(controller().getLicense(), width) << "\n\n"
72 << formatted(controller().getDisclaimer(), width);
74 fl_add_browser_line(license_->browser_license, cs.str().c_str());
76 // Enable the tabfolder to be rescaled correctly.
77 if (scalableTabfolders)
78 fl_set_tabfolder_autofit(dialog_->tabfolder, FL_FIT);
81 fl_addto_tabfolder(dialog_->tabfolder, _("Version"),
83 fl_addto_tabfolder(dialog_->tabfolder, _("Credits"),
85 fl_addto_tabfolder(dialog_->tabfolder, _("License"),
88 // Manage the cancel/close button
89 bcview().setCancel(dialog_->button_close);