2003-03-11 13:33:14 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file insethfill.C
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2003-03-11 13:33:14 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
|
|
#include "insethfill.h"
|
|
|
|
|
|
2003-10-10 21:08:55 +00:00
|
|
|
|
#include "support/std_ostream.h"
|
|
|
|
|
|
2003-03-11 13:33:14 +00:00
|
|
|
|
using std::ostream;
|
|
|
|
|
|
2003-09-05 09:01:27 +00:00
|
|
|
|
|
2003-03-11 13:33:14 +00:00
|
|
|
|
InsetHFill::InsetHFill()
|
2003-12-11 15:23:15 +00:00
|
|
|
|
: InsetCommand(InsetCommandParams("hfill"), std::string())
|
2003-03-11 13:33:14 +00:00
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
2003-10-28 11:18:40 +00:00
|
|
|
|
std::auto_ptr<InsetBase> InsetHFill::clone() const
|
|
|
|
|
{
|
|
|
|
|
return std::auto_ptr<InsetBase>(new InsetHFill);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void InsetHFill::metrics(MetricsInfo &, Dimension & dim) const
|
|
|
|
|
{
|
|
|
|
|
dim.wid = 3;
|
|
|
|
|
dim.asc = 3;
|
|
|
|
|
dim.des = 3;
|
2003-11-03 17:47:28 +00:00
|
|
|
|
dim_ = dim;
|
2003-10-28 11:18:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::string const InsetHFill::getScreenLabel(Buffer const &) const
|
|
|
|
|
{
|
|
|
|
|
return getContents();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-08-28 07:41:31 +00:00
|
|
|
|
int InsetHFill::latex(Buffer const &, ostream & os,
|
2003-11-05 12:06:20 +00:00
|
|
|
|
OutputParams const &) const
|
2003-03-11 13:33:14 +00:00
|
|
|
|
{
|
|
|
|
|
os << getCommand();
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-11-05 12:06:20 +00:00
|
|
|
|
int InsetHFill::plaintext(Buffer const &, ostream & os,
|
|
|
|
|
OutputParams const &) const
|
2003-03-11 13:33:14 +00:00
|
|
|
|
{
|
|
|
|
|
os << '\t';
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-10-31 18:45:43 +00:00
|
|
|
|
int InsetHFill::linuxdoc(Buffer const &, std::ostream & os,
|
2003-11-05 12:06:20 +00:00
|
|
|
|
OutputParams const &) const
|
2003-06-07 09:48:11 +00:00
|
|
|
|
{
|
|
|
|
|
os << '\n';
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-10-31 18:45:43 +00:00
|
|
|
|
int InsetHFill::docbook(Buffer const &, std::ostream & os,
|
2003-11-05 12:06:20 +00:00
|
|
|
|
OutputParams const &) const
|
2003-06-07 09:48:11 +00:00
|
|
|
|
{
|
|
|
|
|
os << '\n';
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2003-10-28 11:18:40 +00:00
|
|
|
|
|
2003-08-28 07:41:31 +00:00
|
|
|
|
void InsetHFill::write(Buffer const &, ostream & os) const
|
2003-03-11 13:33:14 +00:00
|
|
|
|
{
|
2004-08-16 11:27:51 +00:00
|
|
|
|
os << "\n\\hfill\n";
|
2003-03-11 13:33:14 +00:00
|
|
|
|
}
|
2004-02-20 10:32:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool InsetHFill::isSpace() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|