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 #pragma implementation
19 #include "FormAboutlyx.h"
21 #include "ControlAboutlyx.h"
22 #include "forms/form_aboutlyx.h"
23 #include "xforms_helpers.h"
27 #include FORMS_H_LOCATION
30 typedef FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > base_class;
32 FormAboutlyx::FormAboutlyx()
33 : base_class(_("About LyX"), false)
37 void FormAboutlyx::build()
39 dialog_.reset(build_aboutlyx(this));
42 version_.reset(build_aboutlyx_version(this));
45 vs << controller().getVersion()
46 << '\n' << lyx_version_info;
48 fl_add_browser_line(version_->browser_version, vs.str().c_str());
51 credits_.reset(build_aboutlyx_credits(this));
54 controller().getCredits(crs);
56 fl_add_browser_line(credits_->browser_credits, crs.str().c_str());
59 license_.reset(build_aboutlyx_license(this));
60 int const width = license_->browser_license->w - 10;
63 cs << controller().getCopyright() << "\n\n"
64 << formatted(controller().getLicense(), width) << "\n\n"
65 << formatted(controller().getDisclaimer(), width);
67 fl_add_browser_line(license_->browser_license, cs.str().c_str());
70 fl_addto_tabfolder(dialog_->tabfolder, _("Version"),
72 fl_addto_tabfolder(dialog_->tabfolder, _("Credits"),
74 fl_addto_tabfolder(dialog_->tabfolder, _("License"),
77 // work-around xforms bug re update of folder->x, folder->y coords.
78 setPrehandler(dialog_->tabfolder);
80 // Manage the cancel/close button
81 bc().setCancel(dialog_->button_close);