3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS
15 #pragma implementation
18 #include "FormAboutlyx.h"
20 #include "ControlAboutlyx.h"
21 #include "forms/form_aboutlyx.h"
22 #include "xforms_helpers.h"
23 #include FORMS_H_LOCATION
28 typedef FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > base_class;
30 FormAboutlyx::FormAboutlyx()
31 : base_class(_("About LyX"), false)
35 void FormAboutlyx::build()
37 dialog_.reset(build_aboutlyx(this));
40 version_.reset(build_aboutlyx_version(this));
41 fl_set_object_label(version_->text_version,
42 controller().getVersion().c_str());
43 fl_set_object_label(version_->text_copyright,
44 controller().getCopyright().c_str());
46 // create license and warranty tab
47 license_.reset(build_aboutlyx_license(this));
49 string str = formatted(controller().getLicense(),
50 license_->text_license->w - 10);
51 fl_set_object_label(license_->text_license, str.c_str());
53 str = formatted(controller().getDisclaimer(),
54 license_->text_warranty->w - 10);
55 fl_set_object_label(license_->text_warranty, str.c_str());
58 credits_.reset(build_aboutlyx_credits(this));
60 controller().getCredits(ss);
61 fl_add_browser_line(credits_->browser_credits, ss.str().c_str());
64 fl_addto_tabfolder(dialog_->tabfolder,_("Copyright and Version"),
66 fl_addto_tabfolder(dialog_->tabfolder,_("License and Warranty"),
68 fl_addto_tabfolder(dialog_->tabfolder,_("Credits"),
71 // work-around xforms bug re update of folder->x, folder->y coords.
72 setPrehandler(dialog_->tabfolder);
74 // Manage the cancel/close button
75 bc().setCancel(dialog_->button_close);