3 * See the file COPYING.
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS
14 #pragma implementation
17 #include "FormAboutlyx.h"
19 #include "ControlAboutlyx.h"
20 #include "forms/form_aboutlyx.h"
21 #include "xforms_helpers.h"
22 #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));
40 fl_set_object_label(version_->text_version,
41 controller().getVersion().c_str());
42 fl_set_object_label(version_->text_copyright,
43 controller().getCopyright().c_str());
45 // create license and warranty tab
46 license_.reset(build_aboutlyx_license(this));
48 string str = formatted(controller().getLicense(),
49 license_->text_license->w - 10);
50 fl_set_object_label(license_->text_license, str.c_str());
52 str = formatted(controller().getDisclaimer(),
53 license_->text_warranty->w - 10);
54 fl_set_object_label(license_->text_warranty, str.c_str());
57 credits_.reset(build_aboutlyx_credits(this));
59 fl_add_browser_line(credits_->browser_credits,
60 controller().getCredits(ss).str().c_str());
63 fl_addto_tabfolder(dialog_->tabfolder,_("Copyright and Version"),
65 fl_addto_tabfolder(dialog_->tabfolder,_("License and Warranty"),
67 fl_addto_tabfolder(dialog_->tabfolder,_("Credits"),
70 // Manage the cancel/close button
71 bc().setCancel(dialog_->button_close);