2003-03-11 13:33:14 +00:00
|
|
|
|
/**
|
2007-04-25 01:24:38 +00:00
|
|
|
|
* \file InsetHFill.cpp
|
2003-03-11 13:33:14 +00:00
|
|
|
|
* 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>
|
|
|
|
|
|
2007-04-25 01:24:38 +00:00
|
|
|
|
#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-09-05 09:01:27 +00:00
|
|
|
|
|
2003-03-11 13:33:14 +00:00
|
|
|
|
InsetHFill::InsetHFill()
|
2007-10-19 17:22:55 +00:00
|
|
|
|
: InsetCommand(InsetCommandParams(HFILL_CODE), std::string())
|
2003-03-11 13:33:14 +00:00
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
2007-08-30 18:03:17 +00:00
|
|
|
|
Inset * InsetHFill::clone() const
|
2003-10-28 11:18:40 +00:00
|
|
|
|
{
|
2007-08-30 18:03:17 +00:00
|
|
|
|
return new InsetHFill;
|
2003-10-28 11:18:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-09-21 20:39:47 +00:00
|
|
|
|
void InsetHFill::metrics(MetricsInfo &, Dimension & dim) const
|
2003-10-28 11:18:40 +00:00
|
|
|
|
{
|
|
|
|
|
dim.wid = 3;
|
|
|
|
|
dim.asc = 3;
|
|
|
|
|
dim.des = 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
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::plaintext(Buffer const &, odocstream & os,
|
2007-05-28 22:27:45 +00:00
|
|
|
|
OutputParams const &) const
|
2003-03-11 13:33:14 +00:00
|
|
|
|
{
|
2007-02-15 16:07:36 +00:00
|
|
|
|
os << " ";
|
2007-05-28 22:27:45 +00:00
|
|
|
|
return 5;
|
2003-03-11 13:33:14 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2007-08-30 18:03:17 +00:00
|
|
|
|
void InsetHFill::write(Buffer const &, std::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
|