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
32 typedef FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > base_class;
34 FormAboutlyx::FormAboutlyx()
35 : base_class(_("About LyX"), false)
39 void FormAboutlyx::build()
41 dialog_.reset(build_aboutlyx(this));
44 version_.reset(build_aboutlyx_version(this));
47 vs << controller().getVersion()
48 << '\n' << lyx_version_info;
50 fl_add_browser_line(version_->browser_version, vs.str().c_str());
53 credits_.reset(build_aboutlyx_credits(this));
56 controller().getCredits(crs);
58 fl_add_browser_line(credits_->browser_credits, crs.str().c_str());
61 license_.reset(build_aboutlyx_license(this));
62 int const width = license_->browser_license->w - 10;
65 cs << controller().getCopyright() << "\n\n"
66 << formatted(controller().getLicense(), width) << "\n\n"
67 << formatted(controller().getDisclaimer(), width);
69 fl_add_browser_line(license_->browser_license, cs.str().c_str());
72 fl_addto_tabfolder(dialog_->tabfolder, _("Version"),
74 fl_addto_tabfolder(dialog_->tabfolder, _("Credits"),
76 fl_addto_tabfolder(dialog_->tabfolder, _("License"),
79 // work-around xforms bug re update of folder->x, folder->y coords.
80 setPrehandler(dialog_->tabfolder);
82 // Manage the cancel/close button
83 bc().setCancel(dialog_->button_close);