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"
|
2006-10-20 16:12:49 +00:00
|
|
|
|
#include "gettext.h"
|
|
|
|
|
|
2003-10-10 21:08:55 +00:00
|
|
|
|
#include "support/std_ostream.h"
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
namespace lyx {
|
2006-10-11 19:40:50 +00:00
|
|
|
|
|
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
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
2004-11-23 23:04:52 +00:00
|
|
|
|
std::auto_ptr<InsetBase> InsetHFill::doClone() const
|
2003-10-28 11:18:40 +00:00
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-10-11 19:40:50 +00:00
|
|
|
|
docstring const InsetHFill::getScreenLabel(Buffer const &) const
|
2003-10-28 11:18:40 +00:00
|
|
|
|
{
|
2006-10-20 16:12:49 +00:00
|
|
|
|
return _("Horizontal Fill");
|
2003-10-28 11:18:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-10-19 16:51:30 +00:00
|
|
|
|
int InsetHFill::latex(Buffer const &, odocstream & os,
|
2003-11-05 12:06:20 +00:00
|
|
|
|
OutputParams const &) const
|
2003-03-11 13:33:14 +00:00
|
|
|
|
{
|
2006-10-19 17:09:59 +00:00
|
|
|
|
os << getCommand() << "{}";
|
2003-03-11 13:33:14 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-10-19 16:51:30 +00:00
|
|
|
|
int InsetHFill::plaintext(Buffer const &, odocstream & os,
|
2003-11-05 12:06:20 +00:00
|
|
|
|
OutputParams const &) const
|
2003-03-11 13:33:14 +00:00
|
|
|
|
{
|
|
|
|
|
os << '\t';
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-10-19 21:00:33 +00:00
|
|
|
|
int InsetHFill::docbook(Buffer const &, odocstream & 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;
|
|
|
|
|
}
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|