2003-11-12 14:38:26 +00:00
|
|
|
/**
|
2007-09-05 15:29:04 +00:00
|
|
|
* \file InsetFlex.cpp
|
2003-11-12 14:38:26 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Angus Leeming
|
|
|
|
* \author Martin Vermeer
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author Jürgen Spitzmüller
|
2003-11-12 14:38:26 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2007-09-05 15:29:04 +00:00
|
|
|
#include "InsetFlex.h"
|
2003-11-12 14:38:26 +00:00
|
|
|
|
2007-04-26 04:41:58 +00:00
|
|
|
#include "Buffer.h"
|
|
|
|
#include "BufferParams.h"
|
2007-04-26 11:30:54 +00:00
|
|
|
#include "Lexer.h"
|
2008-06-18 18:54:31 +00:00
|
|
|
|
|
|
|
#include "support/gettext.h"
|
2003-11-12 14:38:26 +00:00
|
|
|
|
2008-04-09 09:36:08 +00:00
|
|
|
#include <ostream>
|
2003-11-12 14:38:26 +00:00
|
|
|
|
2007-12-12 10:16:00 +00:00
|
|
|
using namespace std;
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
2003-11-12 14:38:26 +00:00
|
|
|
|
|
|
|
|
2008-04-05 20:24:05 +00:00
|
|
|
InsetFlex::InsetFlex(Buffer const & buf, string const & layoutName)
|
2008-10-26 02:25:57 +00:00
|
|
|
: InsetCollapsable(buf), name_(layoutName)
|
2003-11-12 14:38:26 +00:00
|
|
|
{
|
2008-04-05 20:24:05 +00:00
|
|
|
// again, because now the name is initialized
|
|
|
|
setLayout(buf.params().documentClassPtr());
|
2008-10-26 02:25:57 +00:00
|
|
|
status_= Collapsed;
|
2003-11-12 14:38:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-09-05 15:29:04 +00:00
|
|
|
InsetFlex::InsetFlex(InsetFlex const & in)
|
2007-11-05 10:14:19 +00:00
|
|
|
: InsetCollapsable(in), name_(in.name_)
|
2007-11-03 00:56:48 +00:00
|
|
|
{}
|
2003-11-12 14:38:26 +00:00
|
|
|
|
|
|
|
|
2008-02-27 20:43:16 +00:00
|
|
|
docstring InsetFlex::editMessage() const
|
2003-11-12 14:38:26 +00:00
|
|
|
{
|
2007-09-08 13:01:29 +00:00
|
|
|
return _("Opened Flex Inset");
|
2003-11-12 14:38:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-02-27 20:43:16 +00:00
|
|
|
void InsetFlex::write(ostream & os) const
|
2003-11-12 14:38:26 +00:00
|
|
|
{
|
2008-02-14 03:42:54 +00:00
|
|
|
os << "Flex " <<
|
2008-02-14 03:49:12 +00:00
|
|
|
(name_.empty() ? "undefined" : name_) << "\n";
|
2008-02-27 20:43:16 +00:00
|
|
|
InsetCollapsable::write(os);
|
2003-11-12 14:38:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
} // namespace lyx
|