2003-08-17 11:28:23 +00:00
|
|
|
/**
|
|
|
|
* \file ControlBranch.C
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Angus Leeming
|
|
|
|
* \author Martin Vermeer
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2003-08-17 11:28:23 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "ControlBranch.h"
|
2003-12-14 16:33:56 +00:00
|
|
|
|
|
|
|
#include "buffer.h"
|
|
|
|
#include "bufferparams.h"
|
|
|
|
#include "BranchList.h"
|
2003-08-17 11:28:23 +00:00
|
|
|
#include "funcrequest.h"
|
|
|
|
#include "insets/insetbranch.h"
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
|
|
|
using std::string;
|
2003-12-14 16:33:56 +00:00
|
|
|
using std::vector;
|
2003-10-06 15:43:21 +00:00
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
2003-10-06 15:43:21 +00:00
|
|
|
|
2003-08-17 11:28:23 +00:00
|
|
|
ControlBranch::ControlBranch(Dialog & parent)
|
|
|
|
: Dialog::Controller(parent)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
bool ControlBranch::initialiseParams(string const & data)
|
|
|
|
{
|
|
|
|
InsetBranchParams params;
|
|
|
|
InsetBranchMailer::string2params(data, params);
|
|
|
|
params_.reset(new InsetBranchParams(params));
|
2003-09-09 18:27:24 +00:00
|
|
|
|
2003-08-17 11:28:23 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ControlBranch::clearParams()
|
|
|
|
{
|
|
|
|
params_.reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ControlBranch::dispatchParams()
|
|
|
|
{
|
2003-12-10 14:49:51 +00:00
|
|
|
string const lfun = InsetBranchMailer::params2string(params());
|
2005-04-26 09:37:52 +00:00
|
|
|
kernel().dispatch(FuncRequest(getLfun(), lfun));
|
2003-08-17 11:28:23 +00:00
|
|
|
}
|
2003-12-14 16:33:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
BranchList const & ControlBranch::branchlist() const
|
|
|
|
{
|
|
|
|
return kernel().buffer().params().branchlist();
|
|
|
|
}
|
2004-05-19 15:11:37 +00:00
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|