*** empty log message ***

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6445 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-03-11 13:33:14 +00:00
parent 5dbad757dc
commit efbac801e2
2 changed files with 82 additions and 0 deletions

44
src/insets/insethfill.C Normal file
View File

@ -0,0 +1,44 @@
/**
* \file insethfill.C
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author André Pönitz
*
* Full author contact details are available in file CREDITS
*/
#include <config.h>
#include "insethfill.h"
#include "BufferView.h"
#include "support/LOstream.h"
using std::ostream;
InsetHFill::InsetHFill()
: InsetCommand(InsetCommandParams("hfill"))
{}
int InsetHFill::latex(Buffer const *, ostream & os,
bool /*fragile*/, bool /*fs*/) const
{
os << getCommand();
return 0;
}
int InsetHFill::ascii(Buffer const *, ostream & os, int) const
{
os << '\t';
return 0;
}
void InsetHFill::write(Buffer const * buf, ostream & os) const
{
os << "\n\\hfill \n";
}

38
src/insets/insethfill.h Normal file
View File

@ -0,0 +1,38 @@
// -*- C++ -*-
/**
* \file insethfill.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author André Pönitz
*
* Full author contact details are available in file CREDITS
*/
#ifndef INSET_HFILL_H
#define INSET_HFILL_H
#include "insetcommand.h"
class InsetHFill : public InsetCommand {
public:
///
InsetHFill();
///
virtual Inset * clone(Buffer const &, bool = false) const {
return new InsetHFill();
}
///
string const getScreenLabel(Buffer const *) const { return getContents(); }
///
Inset::Code lyxCode() const { return Inset::HFILL_CODE; }
///
int latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
///
int ascii(Buffer const *, std::ostream &, int linelen) const;
///
void write(Buffer const * buf, ostream & os) const;
};
#endif