2001-07-13 14:03:48 +00:00
|
|
|
/**
|
|
|
|
* \file FormAboutlyx.C
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-07-13 14:03:48 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Edwin Leuven
|
2002-10-21 17:38:09 +00:00
|
|
|
* \author Angus Leeming
|
2002-10-22 15:00:45 +00:00
|
|
|
* \author Rob Lahaye
|
2002-09-05 14:10:50 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2001-07-13 14:03:48 +00:00
|
|
|
*/
|
|
|
|
|
2002-03-11 17:00:41 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
2001-07-13 14:03:48 +00:00
|
|
|
|
2002-06-24 20:28:12 +00:00
|
|
|
#include "FormAboutlyx.h"
|
2001-07-13 14:03:48 +00:00
|
|
|
#include "xformsBC.h"
|
|
|
|
#include "ControlAboutlyx.h"
|
2002-06-13 13:43:51 +00:00
|
|
|
#include "forms/form_aboutlyx.h"
|
2001-07-13 14:03:48 +00:00
|
|
|
#include "xforms_helpers.h"
|
|
|
|
#include "Lsstream.h"
|
2002-10-22 15:00:45 +00:00
|
|
|
#include "version.h"
|
|
|
|
|
|
|
|
#include FORMS_H_LOCATION
|
|
|
|
|
2001-07-13 14:03:48 +00:00
|
|
|
|
2002-06-13 13:43:51 +00:00
|
|
|
typedef FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > base_class;
|
2001-07-13 14:03:48 +00:00
|
|
|
|
2002-08-12 14:28:43 +00:00
|
|
|
FormAboutlyx::FormAboutlyx()
|
|
|
|
: base_class(_("About LyX"), false)
|
2001-07-13 14:03:48 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
void FormAboutlyx::build()
|
|
|
|
{
|
2002-06-13 13:43:51 +00:00
|
|
|
dialog_.reset(build_aboutlyx(this));
|
2001-07-13 14:03:48 +00:00
|
|
|
|
|
|
|
// create version tab
|
2002-06-13 13:43:51 +00:00
|
|
|
version_.reset(build_aboutlyx_version(this));
|
2001-07-13 14:03:48 +00:00
|
|
|
|
2002-10-22 15:00:45 +00:00
|
|
|
ostringstream vs;
|
|
|
|
vs << controller().getVersion()
|
|
|
|
<< '\n' << lyx_version_info;
|
|
|
|
|
|
|
|
fl_add_browser_line(version_->browser_version, vs.str().c_str());
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-10-22 15:00:45 +00:00
|
|
|
// create credits tab
|
2002-11-04 02:12:42 +00:00
|
|
|
credits_.reset(build_aboutlyx_credits(this));
|
2001-07-13 14:03:48 +00:00
|
|
|
|
2002-10-22 15:00:45 +00:00
|
|
|
ostringstream crs;
|
|
|
|
controller().getCredits(crs);
|
2001-07-13 14:03:48 +00:00
|
|
|
|
2002-10-22 15:00:45 +00:00
|
|
|
fl_add_browser_line(credits_->browser_credits, crs.str().c_str());
|
|
|
|
|
|
|
|
// create license tab
|
|
|
|
license_.reset(build_aboutlyx_license(this));
|
|
|
|
int const width = license_->browser_license->w - 10;
|
|
|
|
|
|
|
|
ostringstream cs;
|
|
|
|
cs << controller().getCopyright() << "\n\n"
|
|
|
|
<< formatted(controller().getLicense(), width) << "\n\n"
|
|
|
|
<< formatted(controller().getDisclaimer(), width);
|
|
|
|
|
|
|
|
fl_add_browser_line(license_->browser_license, cs.str().c_str());
|
2001-07-13 14:03:48 +00:00
|
|
|
|
|
|
|
// stack tabs
|
2002-10-22 15:00:45 +00:00
|
|
|
fl_addto_tabfolder(dialog_->tabfolder, _("Version"),
|
2002-03-21 16:59:12 +00:00
|
|
|
version_->form);
|
2002-10-22 15:00:45 +00:00
|
|
|
fl_addto_tabfolder(dialog_->tabfolder, _("Credits"),
|
2002-03-21 16:59:12 +00:00
|
|
|
credits_->form);
|
2002-11-04 02:12:42 +00:00
|
|
|
fl_addto_tabfolder(dialog_->tabfolder, _("License"),
|
2002-10-22 15:00:45 +00:00
|
|
|
license_->form);
|
2001-07-13 14:03:48 +00:00
|
|
|
|
2002-10-03 17:20:28 +00:00
|
|
|
// work-around xforms bug re update of folder->x, folder->y coords.
|
|
|
|
setPrehandler(dialog_->tabfolder);
|
|
|
|
|
2001-07-13 14:03:48 +00:00
|
|
|
// Manage the cancel/close button
|
2002-03-12 14:11:15 +00:00
|
|
|
bc().setCancel(dialog_->button_close);
|
2001-07-13 14:03:48 +00:00
|
|
|
}
|