3 * Copyright 2001 The LyX Team.
4 * See the file COPYING.
6 * \author Edwin Leuven, leuven@fee.uva.nl
7 * \author Angus Leeming <leeming@lyx.org>
13 #pragma implementation
16 #include "FormAboutlyx.h"
18 #include "ControlAboutlyx.h"
19 #include "forms/form_aboutlyx.h"
20 #include "xforms_helpers.h"
21 #include FORMS_H_LOCATION
26 typedef FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > base_class;
28 FormAboutlyx::FormAboutlyx()
29 : base_class(_("About LyX"), false)
33 void FormAboutlyx::build()
35 dialog_.reset(build_aboutlyx(this));
38 version_.reset(build_aboutlyx_version(this));
39 fl_set_object_label(version_->text_version,
40 controller().getVersion().c_str());
41 fl_set_object_label(version_->text_copyright,
42 controller().getCopyright().c_str());
44 // create license and warranty tab
45 license_.reset(build_aboutlyx_license(this));
47 string str = formatted(controller().getLicense(),
48 license_->text_license->w - 10);
49 fl_set_object_label(license_->text_license, str.c_str());
51 str = formatted(controller().getDisclaimer(),
52 license_->text_warranty->w - 10);
53 fl_set_object_label(license_->text_warranty, str.c_str());
56 credits_.reset(build_aboutlyx_credits(this));
58 fl_add_browser_line(credits_->browser_credits,
59 controller().getCredits(ss).str().c_str());
62 fl_addto_tabfolder(dialog_->tabfolder,_("Copyright and Version"),
64 fl_addto_tabfolder(dialog_->tabfolder,_("License and Warranty"),
66 fl_addto_tabfolder(dialog_->tabfolder,_("Credits"),
69 // Manage the cancel/close button
70 bc().setCancel(dialog_->button_close);