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 FORMS_H_LOCATION
27 typedef FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > base_class;
29 FormAboutlyx::FormAboutlyx()
30 : base_class(_("About LyX"), false)
34 void FormAboutlyx::build()
36 dialog_.reset(build_aboutlyx(this));
39 version_.reset(build_aboutlyx_version(this));
42 vs << controller().getVersion()
43 << '\n' << lyx_version_info;
45 fl_add_browser_line(version_->browser_version, vs.str().c_str());
48 credits_.reset(build_aboutlyx_credits(this));
51 controller().getCredits(crs);
53 fl_add_browser_line(credits_->browser_credits, crs.str().c_str());
56 license_.reset(build_aboutlyx_license(this));
57 int const width = license_->browser_license->w - 10;
60 cs << controller().getCopyright() << "\n\n"
61 << formatted(controller().getLicense(), width) << "\n\n"
62 << formatted(controller().getDisclaimer(), width);
64 fl_add_browser_line(license_->browser_license, cs.str().c_str());
67 fl_addto_tabfolder(dialog_->tabfolder, _("Version"),
69 fl_addto_tabfolder(dialog_->tabfolder, _("Credits"),
71 fl_addto_tabfolder(dialog_->tabfolder, _("License"),
74 // work-around xforms bug re update of folder->x, folder->y coords.
75 setPrehandler(dialog_->tabfolder);
77 // Manage the cancel/close button
78 bc().setCancel(dialog_->button_close);