3 * Copyright 2001 The LyX Team.
4 * See the file COPYING.
6 * \author Edwin Leuven, leuven@fee.uva.nl
7 * \author Angus Leeming, a.leeming@.ac.uk
11 #pragma implementation
17 #include "ControlAboutlyx.h"
18 #include "FormAboutlyx.h"
19 #include "form_aboutlyx.h"
20 #include "xforms_helpers.h"
25 typedef FormCB<ControlAboutlyx, FormDB<FD_form_aboutlyx> > base_class;
27 FormAboutlyx::FormAboutlyx(ControlAboutlyx & c)
28 : base_class(c, _("About LyX"), false)
31 FL_FORM * FormAboutlyx::form() const
33 if (dialog_.get()) return dialog_->form;
37 void FormAboutlyx::build()
39 dialog_.reset(build_aboutlyx());
42 version_.reset(build_tab_version());
43 fl_set_object_label(version_->text_version,
44 controller().getVersion().c_str());
45 fl_set_object_label(version_->text_copyright,
46 controller().getCopyright().c_str());
48 // create license and warranty tab
49 license_.reset(build_tab_license());
51 string str = formatted(controller().getLicense(),
52 license_->text_license->w-10);
53 fl_set_object_label(license_->text_license, str.c_str());
55 str = formatted(controller().getDisclaimer(),
56 license_->text_warranty->w-10);
57 fl_set_object_label(license_->text_warranty, str.c_str());
60 credits_.reset(build_tab_credits());
62 fl_add_browser_line(credits_->browser_credits,
63 controller().getCredits(ss).str().c_str());
66 fl_addto_tabfolder(dialog_->tabbed_folder,_("Copyright and Version"),
68 fl_addto_tabfolder(dialog_->tabbed_folder,_("License and Warranty"),
70 fl_addto_tabfolder(dialog_->tabbed_folder,_("Credits"),
73 // Manage the cancel/close button
74 bc().setCancel(dialog_->close);