2001-03-08 12:58:40 +00:00
|
|
|
/**
|
|
|
|
* \file FormCredits.C
|
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
* See the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Edwin Leuven, leuven@fee.uva.nl
|
2001-03-22 11:24:36 +00:00
|
|
|
* \author Angus Leeming, a.leeming@.ac.uk
|
2001-03-08 12:58:40 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2001-03-22 11:24:36 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "xformsBC.h"
|
|
|
|
#include "ControlCredits.h"
|
2001-03-08 12:58:40 +00:00
|
|
|
#include "FormCredits.h"
|
2001-03-22 11:24:36 +00:00
|
|
|
#include "form_credits.h"
|
2001-03-08 12:58:40 +00:00
|
|
|
#include "xforms_helpers.h"
|
|
|
|
|
2001-03-22 11:24:36 +00:00
|
|
|
using std::vector;
|
2001-03-16 12:08:14 +00:00
|
|
|
|
2001-03-22 11:24:36 +00:00
|
|
|
typedef FormCB<ControlCredits, FormDB<FD_form_credits> > base_class;
|
2001-03-08 12:58:40 +00:00
|
|
|
|
2001-03-22 11:24:36 +00:00
|
|
|
FormCredits::FormCredits(ControlCredits & c)
|
|
|
|
: base_class(c, _("Credits"))
|
|
|
|
{}
|
2001-03-08 12:58:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
void FormCredits::build()
|
|
|
|
{
|
2001-03-22 11:24:36 +00:00
|
|
|
dialog_.reset(build_credits());
|
|
|
|
|
|
|
|
// Manage the cancel/close button
|
|
|
|
bc().setCancel(dialog_->button_cancel);
|
|
|
|
bc().refresh();
|
|
|
|
|
|
|
|
vector<string> data = controller().getCredits();
|
2001-03-08 12:58:40 +00:00
|
|
|
|
2001-03-22 11:24:36 +00:00
|
|
|
/* read the credits into the browser */
|
|
|
|
for (vector<string>::const_iterator it = data.begin();
|
|
|
|
it < data.end(); ++it) {
|
|
|
|
fl_add_browser_line(dialog_->browser_credits, it->c_str());
|
|
|
|
}
|
2001-03-08 12:58:40 +00:00
|
|
|
}
|